Skip to main content

All Questions

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 ...
Andrea Lombardi Design's user avatar
2 votes
0 answers
93 views

How can i add am option box into my Folium Draw Toolbar?

I'm working on a proyect where i use Folium and plugin.drawn in order to handle markers and polygons, The idea it is simple, save all markers en polygons created on the map. It is a collaborative map ...
Victor Cubas's user avatar
0 votes
1 answer
77 views

Is there a cleaner way to code multiple markers on a leaflet map in Javascript?

I currently have 6 individually coded markers on my leaflet map in javascript. I was wondering if there was a cleaner way to code all these and just change the coordinates? (Below is an example of 2 ...
whatsupmyname's user avatar
0 votes
0 answers
159 views

Make markers layer permanent leaflet

Simple enough to add markers to leaflet map using onClick but every time I refresh the markers have been removed and I have to start over. How do I make the markers permanent so that on subsequent ...
Joseph Javadi's user avatar
0 votes
1 answer
2k views

Leaflet - How to match marker and polyline on drag and drop (new markers and lines with mouse click)

Issue: Putting the markes by click on a map and drag them along a polyline, like a ribbon is not working. I have a project similar to this: Leaflet - How to match marker and polyline on drag and drop ...
Andras Steger's user avatar
3 votes
1 answer
5k views

React leaflet How to have all markers with a specific icons but the one active with a different icon

So I am trying to have an active marker that is different from the rest of the non active marker. So basically I want something like this. To display all of the icon I am using the following. that is ...
user avatar
0 votes
1 answer
1k views

Leaflet map: on click changing color of all markers

I am definitely missing some js syntax to achieve this, but hard-googling did not lead me to any conclusion. I want to toggle markers color on click. I got the sprites predefined as variables "...
Mateusz Gnys's user avatar
1 vote
1 answer
360 views

Want to add 10 different types of icons to a leaflet map

Look at my R code, here I am able to mark two different types of marker icon but I want to mark for all the 10 values of quakes$mag column with 10 different types of marker icons. quakes1 <- ...
Rakesh Nain's user avatar
1 vote
1 answer
764 views

Map with leaflet: two points on the map, in the same location

I have two points on the map, in the same location, but when I show on the map, one is superimposed on the other, not being able to see both at the same time. How can I solve this problem?
user12538529's user avatar
1 vote
0 answers
72 views

Different colour markers or ID numbers for different coordinates with legend in leaflet

I have a data set on 44 health facility locations (Longitude and Latitude), facility name, type and ID. The task I need to execute are: 1a) I want to map the facility locations each having different ...
Justice's user avatar
  • 11
1 vote
1 answer
201 views

Adding markers in Leaflet

I'm a beginner with JS. I'm trying to add a map to my website using Leaflet. I followed the Quick Start Guide, but it looks like adding a marker won't work. Here is my code : <!-- JS ...
user avatar
0 votes
1 answer
394 views

LeafletJS, can't bind popup to second marker

I can't bind a popup to a second marker whilst using LeafletJS, the first marker works perfectly fine, any help? Here's my javascript code: var map = L.map('mapScene', { ...
Hexdro's user avatar
  • 39
2 votes
1 answer
938 views

LeafLet pan and zoom behavior

I'd like to perform a pan and zoom effect from one marker to another. For example if the current view is {lat:m1.lat, lng:m1.lng, zoom:13}, I would do something like this: //Zoom out to initial ...
A.P's user avatar
  • 21
24 votes
4 answers
37k views

Leaflet Awesome-Markers (Adding Numbers)

I am using the Leaflet.Awesome-Markers plugin with LeafletJS. I have implemented it correctly, however now I'd like to be able to use numbers from 0 - 9 to represent markers. Here's a JS Fiddle ...
gotnull's user avatar
  • 27k