vue2-leaflet
Advanced tools
Comparing version
{ | ||
"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 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
1
-66.67%154
23.2%0
-100%2
-97.4%24757
-99.27%3
50%23
91.67%4
-96.04%677
-97.58%+ Added
+ Added
+ Added
+ Added
Updated