🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

vue2-leaflet

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue2-leaflet - npm Package Compare versions

Comparing version

to
1.1.0

types/index.d.ts

48

package.json
{
"name": "vue2-leaflet",
"version": "1.0.2",
"version": "1.1.0",
"description": "Vue2 leaflet library",

@@ -9,7 +9,14 @@ "author": "Mickael Bouchaud",

"build": "cd scripts && ./build.sh",
"size": "size-limit"
"size": "size-limit",
"lint": "eslint src --ext .js,.vue --ignore-path .gitignore",
"test:types": "tsc -p ./types/test/tsconfig.json"
},
"files": [
"dist/",
"types/*.d.ts"
],
"main": "dist/vue2-leaflet.min.js",
"module": "dist/vue2-leaflet.min.js",
"unpkg": "dist/vue2-leaflet.min.js",
"typings": "types/index.d.ts",
"repository": {

@@ -20,7 +27,7 @@ "type": "git",

"dependencies": {
"leaflet": "^1.3.1"
"leaflet": "^1.3.4",
"vue": "^2.5.3",
"@types/leaflet": "^1.2.11"
},
"peerDependencies": {
"vue": "^2.5.3"
},
"peerDependencies": {},
"size-limit": [

@@ -38,15 +45,26 @@ {

"devDependencies": {
"babel-core": "^6.22.1",
"babel-loader": "^7.1.4",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.6",
"babel-loader": "^7.1.5",
"babel-plugin-transform-runtime": "^6.22.0",
"babel-preset-env": "^1.3.2",
"babel-preset-env": "^1.7.0",
"babel-preset-stage-2": "^6.22.0",
"css-loader": "^0.28.11",
"size-limit": "^0.17.0",
"vue-loader": "^14.2.1",
"vue-style-loader": "^4.1.0",
"vue-template-compiler": "^2.5.16",
"webpack": "^4.2.0",
"webpack-cli": "^2.0.13"
"eslint": "^5.1.0",
"eslint-config-standard": "^11.0.0",
"eslint-friendly-formatter": "^3.0.0",
"eslint-loader": "^1.7.1",
"eslint-plugin-import": "^2.11.0",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-promise": "^3.7.0",
"eslint-plugin-standard": "^3.0.1",
"eslint-plugin-vue": "^4.0.0",
"size-limit": "^0.17.1",
"typescript": "^2.7.1",
"vue-loader": "^14.2.3",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.5.17",
"webpack": "^4.19.1",
"webpack-cli": "^2.1.5"
}
}

@@ -61,6 +61,12 @@ # Vue2Leaflet

* [vue2-leaflet-markercluster](https://github.com/jperelli/vue2-leaflet-markercluster) wrapper for [MarkerCluster](https://github.com/Leaflet/Leaflet.markercluster)
* [vue2-leaflet-tracksymbol](https://github.com/ais-one/vue2-leaflet-tracksymbol) wrapper for [TrackSymbol](https://github.com/lethexa/leaflet-tracksymbol)
* [vue-choropleth](https://github.com/voluntadpear/vue-choropleth) to display a choropleth map given a certain GeoJSON
* [vue2-leaflet-geosearch](https://github.com/fega/vue2-leaflet-geosearch) wrapper for [GeoSearch](https://github.com/smeijer/leaflet-geosearch)
* [vue2-leaflet-vectorgrid](https://github.com/tesselo/vue2-leaflet-vectorgrid) wrapper for [VectorGrid](https://github.com/Leaflet/Leaflet.VectorGrid) to display gridded vector data
* [vue2-leaflet-polylinedecorator](https://github.com/jperelli/vue2-leaflet-polylinedecorator) wrapper for [PolylineDecorator](https://github.com/bbecquet/Leaflet.PolylineDecorator)
* [vue2-leaflet-googlemutant](https://github.com/jperelli/vue2-leaflet-googlemutant) wrapper for [GoogleMutant](https://gitlab.com/IvanSanchez/Leaflet.GridLayer.GoogleMutant)
* [vue2-leaflet-tracksymbol](https://github.com/ais-one/vue2-leaflet-tracksymbol) wrapper for [TrackSymbol](https://github.com/lethexa/leaflet-tracksymbol)
* [vue-choropleth](https://github.com/voluntadpear/vue-choropleth) to display a choropleth map given a certain GeoJSON
* [vue2-leaflet-geosearch](https://github.com/fega/vue2-leaflet-geosearch) wrapper for [GeoSearch](https://github.com/smeijer/leaflet-geosearch)
* [vue2-leaflet-vectorgrid](https://github.com/tesselo/vue2-leaflet-vectorgrid) wrapper for [VectorGrid](https://github.com/Leaflet/Leaflet.VectorGrid) to display gridded vector data
* [vue2-leaflet-rotatedmarker](https://github.com/imudin/vue2-leaflet-rotatedmarker) wrapper for [RotatedMarker](https://github.com/bbecquet/Leaflet.RotatedMarker)
* [vue2-leaflet-editablecirclemarker](https://github.com/cualbondi/vue2-leaflet-editablecirclemarker) wrapper for [leaflet-editablecirclemarker](https://github.com/cualbondi/leaflet-editablecirclemarker)
* [vue2-leaflet-hotline](https://github.com/ikmolbo/vue2-leaflet-hotline) wrapper for [hotline](https://github.com/iosphere/Leaflet.hotline)
* [vue2-leaflet-movingmarker](https://github.com/LouisMazel/vue2-leaflet-movingmarker) wrapper for [Leaflet.Marker.SlideTo](https://gitlab.com/IvanSanchez/Leaflet.Marker.SlideTo)

@@ -72,3 +78,10 @@ If you have created a plugin and want it to be listed here, let me know :-).

## FAQ
#### How can I access the Leaflet map object ?
#### My map and/or markers don't fully render. What gives?
Depending on your project setup, you may have to try different solutions.
To fix map rendering issues, it may help to [import the Leaflet stylesheet within the **script** section of your Vue component](https://github.com/KoRiGaN/Vue2Leaflet/issues/157#issuecomment-384307765).
In most cases, though, it is Webpack messing with Leaflet marker icons' paths, resulting in warnings or even errors. You can alleviate that by either [unsetting/replacing the default paths](https://github.com/KoRiGaN/Vue2Leaflet/issues/96#issuecomment-341453050) ([alternate solution](https://github.com/Leaflet/Leaflet/issues/4968#issuecomment-319569682)) or [using Webpack aliases](https://github.com/Leaflet/Leaflet/issues/4849#issuecomment-307436996).
#### How can I access the Leaflet map object?
First add a ref to the map

@@ -84,5 +97,21 @@ ``` html

```
**Note:** `mapObject` is not available directly in vue's `mounted` hook. You need to wrap the call to `this.$refs.map` in a `nextTick` call:
``` javascript
data: () => ({map: null}),
mounted () {
// DON'T
this.map = this.$refs.map.mapObject // doesn't work, this.map is null
// DO
this.$nextTick(() => {
this.map = this.$refs.map.mapObject // work as expected
})
},
```
This also work for any other component (Marker, Polyline, etc...)
#### How can I bind events of Vue2Leaflet components ?
#### How can I bind events of Vue2Leaflet components?
All event binding can be done to event with the same name as in [leaflet documentation](http://leafletjs.com/reference-1.3.0.html).

@@ -89,0 +118,0 @@