All Questions
153
questions
0
votes
2
answers
42
views
In chrome, The pin is placed somewhere other than where click on leaflet
I have a leaflet map in an html page (I put my code below). When I open it in chrome browser and click on the map, it puts the pin somewhere other than where I clicked. But it works fine in FF browser....
0
votes
0
answers
74
views
Leaflet js - How can I change marker icon dynamically according to some conditions present in the database?
I have a list of places in a MySql database (with id, latitude, longitude, counter, timestamp). To add them to the map I make an asynchronous call to a php file where there is a search query. Places ...
0
votes
1
answer
53
views
leafletjs - How to access the html created inside the marker?
Using leafletjs I created a series of markers on the map, all looping from a JavaScript array. I also added some html, including the "I'm here" button as per the screen. I would like to be ...
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 ...
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 ...
0
votes
1
answer
84
views
customized marker for leaflet locate control plugin does'nt appear
I created a customized marker for leaflet locate control and inserted it with this code
/*button to turn on GPS*/
//function from leaflet locate control (plugin)
L.Control....
-1
votes
2
answers
68
views
Have to click 2 times before it opens my component
GM,
I am a beginner in Angular, i use Leaflet for my application.
I created some markers, and i want to open another component when i click on the marker.
This is the marker click
marker.on('click', ()...
0
votes
0
answers
416
views
Leaflet Rotate Only Shadow of an Icon
I need a way to rotate only the shadow of the icon which is linked to my marker.
I'm using this plugin for rotation : https://github.com/hanying33/Leaflet.RotatedMarkerWithShadow
The example below ...
1
vote
0
answers
422
views
Leaflet Control Search: Search only markers which are currently visible on the map
I am working on my first project using Leaflet javascript library. After succesfully importing a geoJSON file on the map, I am trying to create a new geoJSON layer (currShownMarkersLayer), populated ...
0
votes
1
answer
148
views
MapQuest, Leaflet - disable marker on directions layer
Is there a way to hide markers generated at directions layer ? I'd like to draw only route.
Or is there a way to set custom icon instead of build ones ?
According to docs:
https://developer.mapquest....
0
votes
1
answer
505
views
How to simply change marker icon on click and then back to original state when click elsewhere?
I'm trying to get this function on my custom map https://rodadagua.netlify.app/
I've found some very close examples and questions on here but being a complete novice unfortunately I have no idea what ...
1
vote
2
answers
1k
views
Counting markers in a layer in leaflet and add it to a div
I have a Leaflet map with markers and filters (checkboxes) and I would like to count the number of markers as the filters change.
I added this code which I found here Getting the count of markers in a ...
0
votes
1
answer
565
views
Leaflet map with geojson data. Popup with no information
I created a map in Leaflet and I have GeoJSON data. I added my data to my map. But on the map, there are only points with no information when I click on them. I tried to add use this :
var marker = L....
0
votes
0
answers
2k
views
React-Leaflet custom markers with condition
Hej!
I'm very new to leaflet and react and have an issue changing the icon of the marker based on a condition.
I want different colored markers based on the project and set the opacity based on the ...
3
votes
1
answer
159
views
leaflet: removeLayer() work only once in JavaScript
this is the my Map ,my removeLayer in leaflet map remove once (remove Picture ) and as you see in picture it remove marker perfectly but when i try to remove it again it don't!
check is not true but ...