mapbox-gl-controls
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -120,3 +120,5 @@ import mapboxgl from 'mapbox-gl'; | ||
.addTo(this.map); | ||
this.coordinates.push([event.lngLat.lng, event.lngLat.lat]); | ||
const newCoordinate = [event.lngLat.lng, event.lngLat.lat]; | ||
this.coordinates.push(newCoordinate); | ||
this.map.fire('ruler.change', { coordinates: this.coordinates }); | ||
this.updateLabels(); | ||
@@ -123,0 +125,0 @@ lineSource.setData(lineStringFeature(this.coordinates)); |
{ | ||
"name": "mapbox-gl-controls", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"main": "./lib/index.js", | ||
@@ -32,6 +32,6 @@ "description": "Controls for mapbox-gl", | ||
}, | ||
"homepage": "https://bravecow.github.io/mapbox-gl-controls/", | ||
"repository": "bravecow/mapbox-gl-controls", | ||
"homepage": "https://korywka.github.io/mapbox-gl-controls/", | ||
"repository": "korywka/mapbox-gl-controls", | ||
"keywords": ["mapbox"], | ||
"license": "MIT" | ||
} |
# Mapbox Controls | ||
[![Preview](./docs/map.png)](https://bravecow.github.io/mapbox-gl-controls/) | ||
[![Preview](./docs/map.png)](https://korywka.github.io/mapbox-gl-controls/) | ||
@@ -13,3 +13,3 @@ ### Usage | ||
### Ruler Control [[options](https://github.com/bravecow/mapbox-gl-controls/blob/master/src/RulerControl/RulerControl.ts#L19)] | ||
### Ruler Control [[options](https://github.com/korywka/mapbox-gl-controls/blob/master/src/RulerControl/RulerControl.ts#L19)] | ||
@@ -30,3 +30,3 @@ ```javascript | ||
### Styles Control [[options](https://github.com/bravecow/mapbox-gl-controls/blob/master/src/StylesControl/StylesControl.ts#L5)] | ||
### Styles Control [[options](https://github.com/korywka/mapbox-gl-controls/blob/master/src/StylesControl/StylesControl.ts#L5)] | ||
@@ -58,3 +58,3 @@ Adds style switcher similar to Google Maps. | ||
### Compass Control [[options](https://github.com/bravecow/mapbox-gl-controls/blob/master/src/CompassControl/CompassControl.ts#L5)] | ||
### Compass Control [[options](https://github.com/korywka/mapbox-gl-controls/blob/master/src/CompassControl/CompassControl.ts#L5)] | ||
@@ -75,3 +75,3 @@ ```javascript | ||
### Language Control [[options](https://github.com/bravecow/mapbox-gl-controls/blob/master/src/LanguageControl/LanguageControl.ts#L7)] | ||
### Language Control [[options](https://github.com/korywka/mapbox-gl-controls/blob/master/src/LanguageControl/LanguageControl.ts#L7)] | ||
@@ -108,3 +108,3 @@ Localize map. Language can be set dynamically with `.setLanguage(lang)` method. | ||
### Tooltip Control [[options](https://github.com/bravecow/mapbox-gl-controls/blob/master/src/TooltipControl/TooltipControl.ts#L4)] | ||
### Tooltip Control [[options](https://github.com/korywka/mapbox-gl-controls/blob/master/src/TooltipControl/TooltipControl.ts#L4)] | ||
@@ -111,0 +111,0 @@ Shows tooltip on hover on some layer or whole map. |
@@ -172,4 +172,6 @@ import mapboxgl, { GeoJSONSource, Marker } from 'mapbox-gl'; | ||
.addTo(this.map); | ||
const newCoordinate = [event.lngLat.lng, event.lngLat.lat]; | ||
this.coordinates.push([event.lngLat.lng, event.lngLat.lat]); | ||
this.coordinates.push(newCoordinate); | ||
this.map.fire('ruler.change', { coordinates: this.coordinates }); | ||
this.updateLabels(); | ||
@@ -176,0 +178,0 @@ lineSource.setData(lineStringFeature(this.coordinates)); |
Sorry, the diff of this file is not supported yet
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
109163
1966