Skip to main content

All Questions

2 votes
1 answer
8k views

setOpacity for multiple markers at the time

I'm using leaflet for my project and I want to use filter marker in it. To do it, I will setOpacity to 0 for all markers and re setOpacity to 1 for my targets. I know leaflet allow to setOpacity for ...
0 votes
0 answers
32 views

How to link to marker on Leaflet map from another URL

This works perfectly for activating a popup on a leaflet map on the same page: {<a class="mplk" href="#where" onclick="t5.fire('click')">See on map</a>}. The ...
0 votes
1 answer
50 views

Leaftlet divIcon with clickable button

I'm working on leaflet and I wanted to add click event for a icon in the custom divIcon as below, If user clicks on the edit(pencile) icon then click event should trigger, Here is the code I'm ...
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....
19 votes
5 answers
38k views

Rotate marker in Leaflet

How can I rotate a marker in leaflet? I will have a lot of markers, all with a rotation angle. I've tried this solution from runanet/coomsie at Leaflet on GitHub, but nothing happens with my marker: ...
4 votes
1 answer
1k views

Leaflet JS Markers do not fire 'tap/click' events in Android WebView.

Leaflet JS Markers do not fire 'tap/click' events in Android WebView. I've tested it in Android 2.x -> 4.0? I'm using mapbox + wax + leaflet JS. Has anyone had this working? Thanks!! var marker = ...
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
0 answers
33 views

Prevent interruption of tabbing between Leaflet markers

I can tab with the keyboard between markers in my Leaflet map in Chrome and it nicely displays a rectangle around the selected marker and displays its tooltip. If I zoom or pan the map with the mouse, ...
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
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....
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 ...
45 votes
8 answers
87k views

custom marker icon with react-leaflet

I tried everything I found on the web, Stackoverflow and Github, and I still can't make it. I want to make a custom marker with a custom icon, but with my code below I always got an error : '...
1 vote
2 answers
3k views

link to an url page from a marker in a map javascript

I am writing a blog with html, php and javascript about my travels. I have a classical menu in which I choose a country. That links me to a new page with an article about this country. I would like ...
0 votes
0 answers
30 views

Different colored icon for different Layer groups with popup

I am trying to use an example of Layer Groups and Layers Control from https://leafletjs.com for my website. My code is as under. I want to use different colored icons for different layer groups. <!...

15 30 50 per page
1
2 3 4 5
23