Questions tagged [leaflet]

An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps

Filter by
Sorted by
Tagged with
1
vote
0answers
29 views

GeoServer or just PostgreSQL/PostGIS, when to use them?

I have built an application with PHP and Apache. In it I would like to display some geodata using Leaflet. What/why would be the best path to go for requesting geodata: GeoServer and its services (...
1
vote
0answers
13 views

Leaflet setting zoom level for a specified GeoJSON layer feature

I would like to set the level of visibility at the specified GeoJSON feature property. As a continuation of this query: Leaflet distinguishing sublayers within one GeoJSON layer Where I figured out ...
0
votes
0answers
16 views

Big polyline with Leaflet

I'm using Leaflet for a project where I track the path of an entity along the map in realtime. I made a buffer with the last 1000 points but it is visible only through a big zooming cause the points ...
2
votes
0answers
13 views

Adding polygons to Leaflet inset map in R

I've created a map using the Leaflet package in R and added an inset locator map using addMiniMap(). I would like to add polygons features to said inset map. I've already added the polygons to the ...
0
votes
0answers
15 views

Setting GeoJSON style based on property value in Leaflet?

Knowing the thing with leaflet chloropleth: Styling individual features in a GeoJSON layer https://leafletjs.com/examples/choropleth/ we can distinguish the range of values by colour. I would like ...
0
votes
0answers
24 views

Fixing QGIS generated SLD to avoid repeating polygon labelling [duplicate]

I have generated SLD's in QGIS that I use in GeoServer. Although the labeling shows fine when previewing the layer in GeoServer, when bringing the WMS in Leaflet then labeling repetition occurs. How ...
0
votes
1answer
29 views

Leaflet distinguishing sublayers within one GeoJSON layer

I would like to have more than one layer within one existing GeoJSON layer. I found some example here: http://www.gistechsolutions.com/leaflet/DEMO/sports/sports.html which refers to one .json file ...
1
vote
0answers
28 views

Display only markers which are near user's current location in Leaflet? [on hold]

I am using Leaflet js to detect current user location from the browser. I have bunch of markers being displayed in a given area. I would like to show only markers that are closest to the user's ...
0
votes
0answers
21 views

Leaflet Map is not loaded correctly

In my application I need coordinates. I would like to make it possible for a user to choose the coordinates using a map and a marker or to calculate them via an address. That works fine too. But ...
1
vote
1answer
29 views

While dragging a map in Leaflet it marks a point for the feature [on hold]

In my Leaflet application, When I draw a feature (Line/Polygon) and if I need to drag the base map to mark a point outside the visibility of the map then Leaflet marks additional point where I tap on ...
2
votes
0answers
28 views

How to extract GeoJSON database column as geometry layer? (column as layer)

Have a one table of country with multiple categories for states. Table as below: Country table:(converted shapefile to GeoJSON for use in Leaflet choropleth map) So kind of table converted from ...
0
votes
0answers
9 views

Leaflet NA values at boundaries R

I am using leaflet to visualize rasters. The output shows NA values around the border areas for discrete classifications. I read another post that said this might be due to the differences in ...
2
votes
1answer
28 views

SAS Planet cached tiles for use in Leaflet map

I downloaded some tiles from ArcGIS.Imagery with SAS Planet The tiles is in folders like ArcGIS.Imagery/z2/0/x1/0/y2.jpg ArcGIS.Imagery/z13/2/x2624/1/y1750.jpg And I use this TileLayer to display ...
0
votes
0answers
33 views

Loading JSON/GeoJSON multipolygon data from the external domain onto Leaflet map

I'm making my own map for the personal use only and at the moment my code looks like this <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=...
1
vote
1answer
25 views

R leaflet creates geometric striations in some maps but not others

I have been creating leaflet maps from raster files with discrete values. Leaflet creates smooth maps form some of the rasters, but in other there is a strange pattern of geometric striations across ...
1
vote
1answer
25 views

Leaflet only one placemark visible at exact location, whereas is more than 1 there

I have a problem, because sometimes on my GeoJSON layer plotted into the Leaflet map more than 1 placemarks has been assigned to one exact location (by postcode). The problem is, that only one of ...
1
vote
0answers
17 views

Leaflet plot map.on(zoomend) function into addEventListener(function)

Continuing the previous query: Leaflet set zoom for clickable layers on the map I would like to fix my zoom feature, which doesn't work correctly as per in the picture below: for this purpose I ...
1
vote
1answer
18 views

Mouseover highlight label in Leaflet

I would like to see the geoJSON placemark label once hover it. I found a few examples, but they refer mostly to providing a pop-up only: Showing popup on mouse-over, not on click using Leaflet? ...
1
vote
0answers
23 views

Attempted to load an infinite number of tiles while using proj4leaflet and EPSG:32614 [closed]

I get error "Attempted to load an infinite number of tiles" while using proj4leaflet and EPSG:32614. crs = new L.Proj.CRS('EPSG:32614', '+proj=utm +zone=14N +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +...
0
votes
1answer
19 views

Mousehover placemark in Leaflet

Good afternoon, I am trying to make my geoJSON placemark hovered in leaflet. Basically the pop up exist and I don't want to change it. What I would achieve is only change it color, when hovered by ...
1
vote
2answers
52 views

Dynamic map sidebar with info from marker upon click

I am new to Leaflet, HTML, CSS and Java. I am using leaflets maps and I want to create a sidebar that is active when a marker is clicked or active when a clicked in the sidebar, so far I have had no ...
2
votes
2answers
35 views

Converting GeoJSON to projected coordinates in Leaflet?

We are migrating existing angular app from OL to Leaflet. In OL we were able to get the geoJSON in UTM with EPSG:3857 on draw finish However when we complete a draw in leaflet and try to get the ...
0
votes
0answers
56 views

Get data from GeoJSON to create chart within pop-up

I'm working on getting a pie chart to display within a pop-up on a Leaflet map, visualizing the data from the GeoJSON within the pie chart. mygeojson.on('popupopen', function (e) { var data = {...
0
votes
1answer
51 views

How to add ONE dynamic legend for 16 WMS layers in Leaflet from GeoServer [closed]

Can anyone explain me how I can include one dynamic legend within a Leaflet map for 16 individual WMS layers? Is it possible to create ONE legend with the WMS service for multiple layers? My code to ...
1
vote
1answer
25 views

Update map tiles in Leaflet only when map panning ends? [closed]

Currently when the map is dragged a few hundred API requests are sent due to many layers. I would like the requests to only be sent when the map comes to a stop. How can I achieve this?
0
votes
1answer
37 views

Displaying selected layers depending on zoom in Leaflet

It looks like I found the problem between the document.querySelector and map.on('zoomend') function. I was going to set the zoom level for switching off some layers, what has been raised here: ...
1
vote
0answers
22 views

TopoJSON coordinates are off with actual coordinate using Leaflet

I have this TopoJSON file that I have been working on quite sometime now. and recently I tried plotting it using Leaflet but the polygons are off with the actual area it surrounds. Here's the image. ...
0
votes
1answer
60 views

List of overlapping WMS layers [closed]

How do I get a list of layers by clicking on overlapping WMS layers in the Leaflet map? The best solution is to have the list in a single popup on the map. <!DOCTYPE html> <html> <...
1
vote
0answers
27 views

Leaflet Zoom on WMS-Layers - Error: Attempted to load an infinite number of tiles GridLayer.js [closed]

I use Leaflet 1.5.1 for showing WMS layers on a GeoServer 2.15.1. I can only zoom up to zoom level 14. If I continue to zoom into the map, I see the following error message. Error: Attempted to load ...
1
vote
1answer
12 views

Changing values of Leaflet MiniMap after creation

I want to change the values of Leaflet MiniMap object after it is already created. e.g. miniMap.options.width: var miniMap = new L.Control.MiniMap( tileLayer01, { centerFixed: new L.LatLng(50.0, ...
1
vote
0answers
26 views

Adding markers to Leaflet MiniMap? [closed]

I am using Leaflet with the MiniMap plugin: https://github.com/Norkart/Leaflet-MiniMap Often, the zoom level difference between main map and mini map is so big that the bounding box shown in the ...
1
vote
1answer
15 views

Invalid GeoJSON object, converted from ArcGIS JSON

I queried some ArcGIS JSON from "Global Forest Watch API", then converted it to GeoJSON using a web service. When I try to add it to my Leaflet map I get "Invalid geojson object". The GeoJSON looks ...
0
votes
2answers
34 views

Leaflet making features gone when zoom out

I am wondering about an option to make all or at least majority of placemarks (depends on their internal zoom settings) invisible when zooming out. It can be something alternative to the leaflet ...
1
vote
1answer
45 views

Speed up GeoJSON clustering and rendering?

I am rendering 10,000 points with Leaflet's markercluster library. I fetch these 10k points from our server. This takes about 700ms. It takes Leaflet about 3 seconds to cluster these points and ...
2
votes
0answers
36 views

Slope and Aspect calculations giving wildly different results based on zoom using Leaflet

I asked Accessing slope and aspect data using Leaflet? last week about getting slope and aspect as a function of lat and lng in leaflet, and I am in the process of trying to code out a good answer. ...
1
vote
1answer
36 views

How to change background color of modified group layer control in Leaflet?

I've used jQuery append relocate a L.control.layers into an HTML containing. I've also modified them to look a little more like buttons. var crsh_group_buttons = L.control.layers(crash_grouping, ...
1
vote
2answers
47 views

Unable to remove WMS layer from Leaflet map

I am using Leaflet. In my application, I am adding layers from GeoServer, through checkboxes. The user selects a checkbox, the map is displayed. Can be seen in the image below. Now, when the ...
0
votes
1answer
67 views

Overlapping two line problem

I want to check if 2 linestrings intersects (or overlaps) or no. I use turf.js overlap. Here are the results I want to get: CodePen 1- If only first or last points of line 1 intersects with first ...
1
vote
0answers
40 views

Accessing slope and aspect data using Leaflet?

I am building an application in leaflet, and I need to be able to access slope and aspect as a function of latitude and longitude. Currently I am able to get elevation data from the mapbox elevation ...
2
votes
1answer
54 views

Leaflet combination chloropleth and Leaflet.TimeDimension

Following up the post from Change the colors of polygons on a choropleth map with leaflet I'm wondering if it is possible to combine a Leaflet chloropleth with the Leaflet.TimeDimension so that the ...
1
vote
0answers
51 views

Triggering event from marker by pressing enter when marker has focus using Leaflet js

I need to create a leaflet.js map within certain accessibility guidelines. 1) I would like to be able to trigger an event (not just open a popup) by pressing 'enter' when a marker has focus. 2) I ...
0
votes
0answers
16 views

Leaflet draw export with polygon names

I know, that this topic has been considered earlier. I have got a few examples here: https://stackoverflow.com/questions/34738805/update-properties-of-geojson-to-use-it-with-leaflet/34740632#34740632 ...
1
vote
0answers
25 views

Adding Permalink attribution to the leaflet map in order to reach another URL permalink

Continuing the issue opened here: Link to another URL permalink in Leaflet I found some code, that may help me to establish a link to another url permalink from the leaflet map: https://raw....
-1
votes
0answers
24 views

Disable GEOJSON data (markers off) on load. User uses Leaflet Search Control for data search. Display Data with PopUp once there's search result only

I wish to load GeoJSON with Leaflet Search Control & display data with PopUp once there's search result. GeoJSON data should disable on Load or Unchecked for that layer. Demo: https://jsfiddle....
1
vote
1answer
34 views

Incorporating Ordnance Survey map with other layers in Leaflet

I am trying to incorporate the Ordnance Survey layer into my Leaflet map. The goal is to enable it as another map layer amidst a few existing ones. One of the code looks like this: var link = L....
1
vote
1answer
40 views

Overview map for Leaflet

I am looking for an overview map functionality for Leaflet. A participant at a conference was quite convinced that this is part of the Leaflet API - unfortunately I don't remember his name so I cannot ...
0
votes
1answer
44 views

How do I adapt existing responsive web site to display Leaflet maps?

My website works well on different devices but it seems that only works with images, although I would like to show other media, like Leaflet maps and videos. Just about all pages are laid out on a ...
0
votes
0answers
15 views

Link to another URL permalink in Leaflet

I am about to combine more than 1 map. This is kind of sync, but is not particular sync as shown in the following example: https://github.com/jieter/Leaflet.Sync Basically my goal is to get instant ...
1
vote
0answers
36 views

How to create regional map tiles for Leaflet

I would like to create the map tiles in leaflet, which will be used in regional scale. I mean, that once I provide sth like this: L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?{...
1
vote
0answers
27 views

Create a map survey and download the result

I have a shapefile of our state boundary. I want people to be able to drop a pin and add their names to the pin as an attribute. From there I would like to download all the pins as a shapefile and ...