Skip to main content

Questions tagged [leaflet]

Leaflet is an open-source JavaScript library for mobile-friendly, cross-browser, interactive maps. For the R leaflet package, please use the r-leaflet tag.

leaflet
0 votes
0 answers
15 views

WMS service basic authentication

I am building a leaflet map on a server without root access. I'd like to add a WMS service which is secured by basic authentication(username and password). There is a simple method in leaflet adding ...
MrSalamikuchen's user avatar
0 votes
1 answer
21 views

Is it possible to count the occurrence number of a custom icon in Leaflet? If yes, how to do it?

Firstly, I'm a beginner, I've learned a lot from you. I have 5 custom icons defined: //Awesome icons var LeafIcon = L.Icon.extend({ options: { shadowUrl: "markers-shadow.png", ...
Weslley Morais's user avatar
0 votes
0 answers
38 views

How can I improve React Leaflet performance when rapidly updating a marker position?

I'm working on a page which reads GPX files (a series of lat/lon GPS points) and plots the route using React Leaflet as well as showing an elevation profile using react-chartjs-2. When hovering over ...
user7290573's user avatar
  • 1,330
0 votes
0 answers
24 views

Polyline starts from main world map instead of nearest point [duplicate]

I am using Leaflet map to draw polylines and connect waypoints by clicking on the map. I also cloned the route and waypoints to the left and right world map. Sometimes, the route is drawn incorrectly. ...
Alex Huynh's user avatar
-1 votes
0 answers
40 views

Add weather to popup content table

I have a popup content table look like this: var popupContent = '<table>\ <tr>\ <td colspan="2">' + (feature.properties['NAME_2']...
Lê Trung Nghĩa's user avatar
0 votes
0 answers
39 views

Leaflet post popup properties to sidebar

I am building a game map for a friend and have run into an interesting way to do their popup content. Basically the popups are going to have history over each section so I decided that displaying it ...
ConnectedToast's user avatar
0 votes
0 answers
18 views

Vue2leaflet LPopup test if it is open

I am using Vue2Leaflet and my Markers have both a LPopup and LTooltip. The LTooltip stay active (display on mouse hover) even when the LPopup is open, I would like to change this pattern to ...
Jean-Loup's user avatar
  • 300
0 votes
0 answers
15 views

remove last route line if i check multiple vehicles and the other route lines still draw on map after i uncheck all vehicles

export const drawOnMap = (info, map, L) => { if (info?.Latitude != 0 && info?.Longitude != 0) { let pointA = new L.LatLng(info?.Latitude, info?.Longitude); let pointB = new L....
Mohamed elsayed's user avatar
0 votes
0 answers
37 views

Marker(Canvas icons) disappears when zoomed in and dragging on the react leaflet map

When I am zoom in and then drag canvas icons on react-leaflet map, so that time others canvas icons disappears but when I zoom in or out again all the canvas icons appears properly. Before the zooming ...
Hrutik's user avatar
  • 1
0 votes
0 answers
11 views

vue3 and Leflet Map geoJson bounds

How do I set the center and define the bounds for given getJSON data? Each geoJson object is like this: { "type": "FeatureCollection", "features":[ { ...
usrNotFound's user avatar
  • 2,770
-3 votes
0 answers
40 views

Is there a way to draw just on water, not on land tiles? [closed]

I'm trying to add some vector layers (polygons and circles) onto a map, but I only want them rendered on top of water tiles. Is this possible? Imagine drawing concentric circles like wave ripples that ...
user25708908's user avatar
0 votes
0 answers
27 views

Grid in the picture from leaflet-simple-map-screenshoter

I use to leaflet-simple-map-screenshoter to take screenshots in a leaflet. I use to the default plugin. Why do I see a grid in the pictures? let pluginOptions = { cropImageByInnerWH: true, // crop ...
Ihar's user avatar
  • 1
0 votes
0 answers
19 views

Use Tom-Select inside Leaflet Control

I'm trying to use TomSelect inside of a Leaflet control layer. Displaying it works as expected, but I'm not able to select anything. It seems like the click event is not getting through to the ...
finchi's user avatar
  • 1
0 votes
2 answers
53 views

Is there a way to make Leaflet accept long/lat points assuming a spherical geometry?

I have two sets of coordinates: one from a sphere and the other WGS-84. I'd like to get them both into Leaflet. But Leaflet assumes long/lat points are WGS. As far as I can tell, its quite difficult ...
gph's user avatar
  • 1,200
0 votes
0 answers
15 views

VueJS leaflet fitBounds not working without timeout

I have an issue with leaflet in VueJS 3. I'm creating a leaflat map with markers, but I have to use a setTimeout-function to make the fitBounds() work. Without the setTimeout I see the map with ...
Waldo's user avatar
  • 5

15 30 50 per page
1
2 3 4 5
931