Skip to main content

All Questions

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 ...
Maxime Bonnet's user avatar
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 ...
Kishor's user avatar
  • 200
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....
Mostafa Zahedi's user avatar
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 ...
Andrea Lombardi Design's user avatar
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, ...
user258279's user avatar
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
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
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....
astaga's user avatar
  • 87
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. <!...
user1185088's user avatar
0 votes
0 answers
32 views

Trouble Adding Nearby Wikipedia Markers to Leaflet Map Using OpenCage Geocoding API

I'm working on a web project where I'm trying to add nearby Wikipedia markers to a Leaflet map based on geolocation data. I'm using the OpenCage Geocoding API to obtain latitude and longitude ...
Chrisy Haigh's user avatar
0 votes
0 answers
203 views

How to use Fancybox 5 to show a photo when clicking a Leaflet marker

Is this possible at all? This is my code so far var marker = L.geoJSON(geojsonFeatureCamera, { pointToLayer: function (feature, latlng) { return L.circleMarker(latlng, ...
Derko's user avatar
  • 1
0 votes
1 answer
435 views

How to add Markes to a Leaflet-map with coordinates from database in Next.js?

I have to display markers for all the places in my database. At the moment I can display just one marker. I maped over the array from database but I do not know how to connecte these two. I would ...
Ida's user avatar
  • 1
0 votes
1 answer
104 views

How to prevent openning a popup when you choose a layer to show in leaflet?

I'm a working on a project with leaflet where a it shows three layer you can enable o disable whenever you want to display all the markers from that layer. Every marker has a popup that it opens when ...
Victor Cubas'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
0 answers
324 views

Remove marker is disabled after one marker remove from map

I am using the react-leaflet/core library together with the plugin Leaflet-Geoman which using the removalMode to delete the marker from map Below is my code import { useLeafletContext } from "@...
Developer007's user avatar
-2 votes
1 answer
182 views

I'm tring to code to get a popup marker on my leaflet map when I double click on the map

I want to get a popup marker(by image) on my map every time I double click on the screen. Every time I try to copy other's code, it won't work. Can someone help plz?THE MARKER NEEDS TO BE AN IMAGE! I ...
Markus Viljoen's user avatar
-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', ()...
Makil Uspn's user avatar
1 vote
0 answers
36 views

Need to disable deleting a marker layer in leaflet

I am working with a leaflet map that uses a custom image, draws rectangles on it with markers and tooltips at the center of each rectangle. It includes a toolbar that sets a delete mode. In the ...
Debbie Engelmeyer's user avatar
1 vote
0 answers
905 views

Add one Marker to Multiple FeatureGroups in Folium Python

I'm trying to make a map in python using Folium to show the location of some facilities. Each facility might have several features which I want to use to filter the markers. As far as I know it's ...
Fateme Fouladkar's user avatar
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 ...
yassine mt's user avatar
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 ...
techNIK's user avatar
  • 11
0 votes
1 answer
809 views

styling leaflet markers according to property in geojson file

I´m completly stuck with this part. I have tryed a lot of solutions I have found here and on other places but I simply can´t figure out the situation. I´m trying to place markers on a map according to ...
Bruno's user avatar
  • 27
0 votes
1 answer
847 views

search markers with leaflet search

I´m trying to use leaftlet search but it doesnt find the markers. The markers are populated on the map as it should be, but the search wont work. I have a freg.js file where I have the information to ...
Bruno's user avatar
  • 27
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....
b0bik's user avatar
  • 23
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 ...
andycb's user avatar
  • 1
0 votes
1 answer
791 views

Find the middle point between two markers in Leaflet

I would like to be able to find the centre point between two markers on a map (example below). Is there a function in leaflet or in another package that allows this? Thank you in advance coor_zone6 &...
Florian B.'s user avatar
1 vote
0 answers
61 views

Leaflet with Edge Canary (recent version) mouse and markers glitch gap shift

With recent release of Microsoft Edge Canary version (as of date 2/May/2022, version 102.0.1243.0) it seems like when moving the mouse it is and hovering over a marker there is a gap between the place ...
ArielD's user avatar
  • 11
1 vote
1 answer
219 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
0 votes
0 answers
125 views

[React][React-Leaflet] Updating position after changing radius

I am working on a React-app to find a soccer club near the user position, I want to let the user change the radius around him in order to find some results in his area. So for now the default value of ...
Manuel's user avatar
  • 3

15 30 50 per page
1
2 3 4 5
12