Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mapbox-gl-controls

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mapbox-gl-controls - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

4

lib/RulerControl/RulerControl.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc