All Questions
16
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 ...
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
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 ...
0
votes
2
answers
372
views
Customizing Leaflet Icon
I need to add 2 different marker icon in leaflet. The one is world heritage site and other for earthquake. The URL for earthquake icon is:
var earthquakeicon = L.icon({
iconUrl: 'https://previews....
0
votes
0
answers
80
views
How to make custom text ID appear at the center of marker a icon in Leafletjs
Am working with LeafletJS web mapping library where I want my point ID/text to appear centered on the marker icons.
This is what I wanted, my point text on the the marker icons like this:-
I tried ...
0
votes
1
answer
1k
views
How to get custom icon using leaflet
Now, I am loading in tweets from a database and plotting them on a map. I can't work out how to put in a Twitter icon instead of the normal blue markers from leaflet?
I've tried several solutions from ...
1
vote
2
answers
2k
views
Zoom to Marker location on click -Leaflet
I am displaying markers on the map from geojson file. In current code when I hover over marker I can see the properties in the popup. I want to add fly to or zoom in marker exact location upon click ...
1
vote
1
answer
579
views
Leaflet.js : Changing Marker icons works, but only once
Hi i try to create a Leaflet map with markers of differents colors on it.
There is 3 buttons with onClick event on each one. Where i click on one of them, it add "Activate" class to the one i clicked ...
4
votes
3
answers
11k
views
How to add text below a marker in leaflet?
I created some markers on leaflet map but the only problem is that i dont know how to add a text below each marker and im not talking about popups. What I mean is that the text below the marker has to ...
-1
votes
2
answers
79
views
How to delete my map markers in javascript
I just can't delete my markers. I have tried all the pages here already. But it seems my knowledge is too limited.
Is the problem that I don't add the markers to a layerGroup the right way?
var ...
0
votes
0
answers
2k
views
Creating map in Leaflet with numbered pins or markers
Objective
I have a Leaflet map of roughly 25 points where the order of the points is important and I'm trying to make the numbered order visible. Currently the data for each of the points and their ...
0
votes
1
answer
803
views
Leaflet markers on localstorage, how to get marker lat lng and exclude from storage?
I created a function that on click places a marker on map, and save it to localstorage. Inside the marker popup, its displayed the marker position, and a delete button.
How I can make that delete ...
0
votes
1
answer
3k
views
Get multiple Markers in Leaflet
I'm looking for add draggable markers on a map, giving them names and then getting all markers back with names and coordinates. I´m not able to put the name somewehere or if i put a name inside it ...
0
votes
2
answers
550
views
Update marker's popUp content without rewriting all HTML leaflet
I would like to know if there's a way to change the content of a marker's popUp without having to rewrite all the html that is already there, I mean, I would like to toggle a class of one of the ...
1
vote
1
answer
3k
views
Leaflet marker disable hover or show nothing on hover
I am using Leaflet API to draw some markers on the map. My marker data is populated using HTML which displays fine when clicked on. The problem is when hovered on top of the marker it displays the ...