Vue components for LeafletJS. Homepage.
Questions tagged [vue2leaflet]
47 questions
1
vote
1 answer
Center VueLeaflet view to all geoJson geometries from multiple layers
I have a variable list of geoJson layers (that I'm naming as sectors) on my map. I need to center the view to fit all geometries.
I'm using Vue2Leaflet (v2.5.2) and Leaflet (v1.6.0).
Each geoJson object is like this:
{
"type":…

Nicke Manarin
- 3,026
- 4
- 37
- 79
1
vote
1 answer
Add searchbar for vue2-leaflet
Hi do somebody know or have some samples of code how to add searchbar for vue2-leaflet map, I have tried the following https://www.npmjs.com/package/vue2-leaflet-geosearch but failed, do you know any alternatives how to resolve it,hope for your…

Mark Koval
- 11
- 1
1
vote
1 answer
Adding a polygon to vue2-leaflet
I've been trying to add a MultiPolygon to a leaflet map using vue2-leaflet to no avail. I'm generating the polygon coordinates from PostGIS.
How can one add a polygon to a vue2leaflet map?
Representative code:
fiddle:…

Basti
- 252
- 2
- 9
0
votes
0 answers
vue2-leaflet-draw-toolbar: draw:created not firing when moving to production
I've been having trouble getting drawn polygon's geojson in production. When I run the app locally, draw:created fires and I can see the geojson in my requests. Here's the code:
const map = this.$refs.map.$refs.map;
map.mapObject.on("draw:created",…

Anthony____
- 5
- 3
0
votes
0 answers
Common tile layer settings for multiple vue2-leaflet maps
In my Vue (2.x) application, I have a number of places where I use vue2-leaflet maps.
There are a few common features of these maps, but they are otherwise completely different, so it doesn't make sense to have all of them use a single component…

Moshe Katz
- 15,992
- 7
- 69
- 116
0
votes
0 answers
How do I set a custom marker icon in Quasar using Vue2-Leaflet?
I'm having problems displaying an icon marker image using vue2-Leaflet and Quasar. What gets displayed is a broken image and a 404 in the console. I have read close to all of the workarounds and did get it fixed using Leaflet.js and Quasar but not…

Bill
- 1,423
- 2
- 27
- 51
0
votes
0 answers
Leaflet extension: L.Control.Coordinates is not a constructo
I encountered a problem with the leaflet extension. The extension used to work exactly as it is represented in the code, but after updating packages it stopped working. Can you tell me where I'm going wrong?
Code block with imports:
import leaflet…

39dv
- 1
0
votes
0 answers
How to render every states different fillercolor in geojson Of USA?
I want to render different fillcolor in the different state of geojson .
html
JavaScript vue2
//the…

gingie
- 1
0
votes
1 answer
How to drag map but keep marker to center vue2Leaflet map?
leaflet map on my project. My marker is set to center map using lat and lng. Now I want, whenever a user will drag or move map, marker should be in center (fixed) and can get lat and lng marker.
0
votes
0 answers
How to use Leaflet.MarkerCluster.Freezable with vue2Leaflet?
Can I use Leaflet.MarkerCluster.Freezable with vue2Leaflet?
I have tried to include it and use it with a ref on my marker cluster like this : this.$refs.cluster.disableClustering();, but it gave the error "TypeError:…

panbak
- 406
- 3
- 10
0
votes
0 answers
How to use mapbox mapping with nuxt.js and vue leaflet?
Trying to add mapping to my nuxt.js app, no luck so far.
there is this package nuxt-leaflet, but it has very little activity, and only the very basic example.
I would love to use mapbox layers, and build the map dynamically with the leaflet L…

Ron Al
- 397
- 1
- 6
- 19
0
votes
0 answers
Vue Leaflet incompatible with Vuetify's VDialog
I've been trying to build some sort of GeoJSON editor using Vuetify and Vue Leaflet. The way I do that is by throwing an LMap and VTextInput onto a VDialog. I encounter a problem where a majority of the map tiles show up gray (check out this GitHub…

starleaf1
- 2,701
- 6
- 37
- 66
0
votes
2 answers
Vue Leaflet Change Style of Zoom Control
I am trying to make a Map App in a Dark Mode with Vue and for some reason I cannot change the style of the Zoom Control. Currently I am trying the following
template>

MikeH
- 23
- 1
- 5
0
votes
1 answer
How to load dynamically many markers with Leaflet using VueJs?
I have a webapp that displays many markers on a map that are loaded dynamically when the user moves the map around. I call an API with the bounds and get back a list of markers.
The current solution

Paul Fournel
- 10,807
- 9
- 40
- 68
0
votes
0 answers
change src of script in vue2leaflet
I use vue2leaflet for show map ,i want to change SDK of this module to

Ali SaZa
- 95
- 4
- 14