Skip to main content

All Questions

0 votes
0 answers
23 views

Make a marker unable to use for a time

I have a map with markers. Every marker is a charging station. I want that the user that want to use the charging station, can book the place for an hour for example and set a time that is shown. When ...
Anthony's user avatar
0 votes
0 answers
81 views

change marker color based on properties

This is my first time here on stackoverflow. I have a doubt. I marked some markers on my map (I used OpenStreetMap). On each marker I put a drop-down menu with choices. Based on these choices, the ...
Anthony's user avatar
1 vote
1 answer
214 views

Having Leaflet markers visible in more than one layer

I want some of my Leaflet markers visible in more than one layer on my Openstreetmap map. By example: London is harbor and is also a capital city. So I want to see the London marker when I select only ...
Peter Bakker's user avatar
1 vote
1 answer
739 views

Marker position changes with higher zoom level on leaflet map with custom tiles

I transformed an image into maptiles with max zoomlevel of 6. There are several markers on this map. Until zoom level 4 everything is ok. With zoom level > 5 the marker position changes. I use CRS....
K. Braungardt's user avatar
0 votes
1 answer
411 views

moving marker does not exist on type of import

moving marker does not exist on type of import please help me to solve this error. I have installed npm package npm install --save leaflet-moving-marker but it shows the error moving marker does not ...
Rajat Singla's user avatar
0 votes
1 answer
625 views

overlayMaps and markers in Leaflet

I am using Leaflet to show two sets of markers on a map. Let's call them "trip 1" and "trip 2". The markers information (lat, lon, description, etc.) is stored in two separate geojson files. I would ...
Alex's user avatar
  • 497
0 votes
1 answer
375 views

How to hide the marker and zoom on a specified map location by clicking on the marker?

I have a project to finish, and I have 1 month to finish it, I am very late… I have tried to do what I want to have, but it never worked, I am a beginner in Javascript… Here is what I would like to ...
Gio's user avatar
  • 13
0 votes
0 answers
177 views

Check on leaflet map for markers with specific icon

I want to check if there is a marker on the map with a "markerIconActive" icon. I think the best would be to loop through all markers and check if there is one with a "markerIconActive" icon and if ...
Flo's user avatar
  • 137
0 votes
1 answer
1k views

How to update geojson markers periodically

What I am trying to do is to use Leaflet with OSM map, and load data from PHP in GeoJSON format + update periodically. I can manage to display a map, load data, but do not know how to update points ...
Tikky's user avatar
  • 1,283
4 votes
1 answer
2k views

How to add button to on/off marker on Leaflet map?

I've got a problem adding function for add/delete markers on leaflet map. I read and tried lot of different code, but I don't understand how to remove all markers of a precise type. My code is like ...
AliceG's user avatar
  • 83
1 vote
0 answers
258 views

How can i set color svg file on leaflet?

How can I set the fill color on an SVG file with leaflet or similar? var svgURL = '../file.svg'; var mySVGIcon = L.icon( { iconUrl: svgURL, iconSize: [30, 30], shadowSize: [12, 10], ...
Jorge's user avatar
  • 11
2 votes
1 answer
2k views

Remove Specific Marker on Leaflet is not A Function

I made a map based on Leaflet and OSM and I created popup for each marker which contains a button to delete the corresponding marker, but it just don't working. I've tried remove features and remove ...
Rayan Suryadikara's user avatar
8 votes
2 answers
21k views

Leaflet custom marker icon scale to zoom

I use Leaflet to draw an OpenStreetMap and attach it with a custom icon marker var mymap = L.map('mapid').setView([x, y], 13); L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?...
necroface's user avatar
  • 3,445
1 vote
0 answers
427 views

leaflet marker dragging moves map

I am working on OSM using leaflet..I enable dragging:true on my destination marker as I need it to be draggable ,but while dragging marker my MAP also moves .Is there a way I can only move the marker. ...
nikunj's user avatar
  • 132
0 votes
1 answer
688 views

Leafletjs Leaflet get marker out of group

I am creating a map using OpenStreetMaps and Leafletjs. All my markers are pushed in separate groups. Now i want to access a single marker in a group for using a "dragend" method and getting the ...
user2058521's user avatar