Questions tagged [leaflet]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
49 views

How to add data slider bar control to Folium maps

I am making a choropleth map in Folium which displays data for certain age brackets. I would like to add a double ended slider letting users select the bottom and top of the age range to view. The ...
1
vote
1answer
53 views

How to change circle opacity in Folium?

I made my first choropleth map using Folium which worked quite well! However I would like to change the opacity of my circles to be a bit more opaque. How does one do this? There does not seem to be ...
5
votes
1answer
110 views

Spatio-Temporal Plot on a Basemap

I have trajectory data in LineStringM format and visualize relevant results via Leaflet on street map tiles. I was wondering whether it is possible to visualize spatiotemporal plots on OSM tiles. I ...
0
votes
0answers
30 views

Problems with Leaflet Layers

I am using Leaflet with OpenLayers and I have the following code: The all code I used is the following : OSMaps = tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", { ...
0
votes
1answer
47 views

Styling pg_tileserv pbf in leaflet

I am having a ton of trouble styling my pbf tile service rendered from pg_tileserv in a leaflet map. here is my code L.vectorGrid.protobuf(http://localhost:7800/data_oh.parcel/{z}/{x}/{y}.pbf, { ...
0
votes
0answers
57 views

Mapping multiple circle markers in a single layer with ipyleaflet and jupyter

How do I show multiple circle markers with ipyleaflet in jupyter? I want to add them all as one layer (not individual layers) and I do not want to use the MarkerCluster class. The documenation only ...
1
vote
1answer
31 views

Leaflet - Draw vector layer behind tile layer

I'm using Leaflet to create a map in which I need to render a tile layer on top of a GeoJSON layer: L.geoJson(...).addTo(map); L.tileLayer(...).addTo(map); The Tile Layer should be render on top. I ...
0
votes
1answer
23 views

Access individual feature properties when running l.esri.find or l.esri.query

Here is what my site looks like: https://brandonlprice.github.io/landrecords/. How can I access the feature properties for a layer when running a find or a query on a layer? I have the the feature....
0
votes
1answer
59 views

Load GPX file as points in Leaflet

I have a simple Leaflet map and would like to add a GPX file coming from a Garmin device. I use omnivore plugin and by default it gets a line. How could I represent points in each coordinate instead ...
2
votes
1answer
40 views

Putting different id in different paths on my Leaflet map

I have many polygons to display on map like this: L.geoJSON(polygon, { style: function (feature) { return { stroke: true, fillColor: feature.color, ...
1
vote
1answer
38 views

Interactive map where users can import, transform and export their own layer

I started to create an interactive map with React and Leaflet. I would like to add a sidebars where user of the map can import, display on the map, edit and export their own layer. Basically, it would ...
1
vote
1answer
52 views

Changing style of only selected polygons in L.geoJSON layer?

So, I'm going to show a lot of polygons in my Leaflet map but I need an id for each polygon, the URL comes in a path like this. In fact I wouldn't even need an id, if I could somehow get some ...
2
votes
1answer
318 views

Trying to visualize a geojson on react-leaflet

I'm trying to visualize a GeoJSON layer on Leaflet using React-Leaflet library. My mental process is: Click on the button which calls a method named getHospitals() getHospitals() gets the geojson ...
0
votes
0answers
44 views

Single tile in Leaflet from GeoServer to avoid duplication of labels

I have struggled with duplication of labels in polygons using WMS in Leaflet. Is there a workaround that does not involve publishing another point layer based on the polygon with a label? I am looking ...
0
votes
0answers
44 views

Search possibility to create markers with Leaflet, with name and description

I am looking for a possibility to create markers on a map with Leaflet. These markers will have a name and a possible description. I have seen on the website of the University of Ben-Gurion, a ...
0
votes
1answer
18 views

Draw marker using locate in Leaflet

I'm trying to use locate function from Leaflet in R, I'd like a marker to show up after clicking on locate button but the following code only centers and zooms the view on the user's geolocation. I'm ...
1
vote
2answers
164 views

Mapbox tiles not showing on Leaflet map using Google Chrome

https://underjollyroger.github.io/EarlyIllinoisLandcover There is a 403 (Forbidden) error and the Mapbox tiles will not display when viewing from Google Chrome (zoom in six times with the mouse wheel ...
0
votes
1answer
39 views

Coordinates in Github repository URL

https://underjollyroger.github.io/EarlyIllinoisLandcover/#9/41.5774/-88.0609 Why are there coordinates showing up in the url of this repository? And is there a way to get rid of them? The repository ...
-1
votes
1answer
37 views

How to keep the layer control expanded in leaflet? It gets open when the user hover on it by default [duplicate]

var baseLayers = { "Streets": streets, "Grayscale": grayscale, "Topography": topograph }; var overlays = { "workplaces": workplaces }; L.control....
0
votes
0answers
26 views

QGIS2WEb Leaflet file structure

After exporting from QGIS2Web into the different formats available, I am going for Leaflet. I want to change the order of information displayed in the popup, to fix the position of the label above the ...
0
votes
1answer
144 views

Is there a way to add custom ids to Leaflet markers derived from a GeoJSON file?

I'm fairly new to JavaScript and I'm currently trying to connect each of my Leaflet markers to a certain portion of text in another div so that when a user clicks the marker, the site will auto scroll ...
0
votes
1answer
46 views

GetFeatureInfo is not working on multiple layer

This is my map URL: http://34.84.56.42:8080/app/ When I click on the map, I'm able not to get the information (GetFeatureInfo) of the overlay layers. I can get only GetFeatureInfo of the top layer. I ...
3
votes
1answer
130 views

Adding graticules to Folium map [closed]

Are there any chances to add grid on Folium map? Something like on this picture.
0
votes
0answers
64 views

Highlights (Mouseover, mouseout, click) in WFS layer

I need to highlight on click of objects in a layer and popups with attributions provided by a WFS. I got the whole layer highlight on mouseover/mouseout, but I need this on click and only one object ...
0
votes
0answers
21 views

How to filter out/in from GroupLayer (hide/show)

Assuming I have the following groupLayer: var myGroupLayer = new L.layerGroup(); and I add it to my map: myGroupLayer.addTo(map); somewhere in my app I add some layer to myGroupLayer like: myOptions=...
0
votes
1answer
102 views

TypeError: Invalid parameters given for Point initialization.on Django

I am working on a location based poject and what I all want is to show only those pointfields stored in database which are at certain distance from any clicked region of leaflet map.But when I click ...
0
votes
0answers
21 views

Finding WMS URL for addWMSTTiles call in R [duplicate]

Continuing from a previously asked question here (Adding weather radar data to leaflet from website), I am having trouble finding the proper URL to use to get data from a WMS to add to a leaflet map. ...
3
votes
1answer
222 views

Adding weather radar data to leaflet from website

I am looking to add a specific layer from this website (https://www.iweathernet.com/total-rainfall-map-24-hours-to-72-hours) to a leaflet map in R. I have tried the code below, but the data does not ...
2
votes
0answers
144 views

Cloud-Optimized GeoTIFF overlay on Leaflet?

I want to load external Cloud-Optimized GeoTIFF files onto a Leaflet map as overlays, and manipulate the colors based on user input. I've found examples online that appear to to this exact thing, but ...
0
votes
0answers
116 views

Leaflet - testing react component

I am looking to create unit tests for component below mainly on checking addLayer and removeLayer being called, function App (()=>{ const marker = useRef<L.Marker | undefined>( undefined);...
0
votes
0answers
56 views

Leaflet Geodata Marker clustering and intersection

I'm having a problem with grouping(clustering) markers I have a list geosjon features that I display as markers in the leaflet. And it looks like this: These points are saved in my Database and are ...
0
votes
0answers
42 views

Problem with CORS WMS plugin Leaflet-Image

I'm having trouble trying to get my map image with the Leaflet-Image plugin. My code: var map = L.map('map', { preferCanvas: true }).setView([43.42851395329958, -3.668450798388781], 23); ...
1
vote
1answer
79 views

Leaflet with EPSG:3765; GridLayer.js:661 Uncaught Error: Attempted to load an infinite number of tiles

I am not sure about Leaflet 1.7 possibility to show layers in EPSG:3765. Not sure because from Leaflet docs it is not possible but I found something like Proj4Leaflet and it looks like it can... I get ...
1
vote
1answer
28 views

labels under markers

I have velow code that works 100% only problem is you have to click on the marker to see what the marker name is. how do i show a label or a tooltip without loosing the html link functionality? &...
1
vote
1answer
58 views

Open link in new window when clicking on marker

I have my map showing my different markers - from info pulling from MySQL. But I need to let the marker open html when clicked on. At this moment the popup is just the marker label and does not take ...
1
vote
1answer
38 views

GeoServer Tile Cache Misses

Issue I am getting a lot (~90%) tile cache misses with the error. "request does not align to grid(s) 'EPSG:4326'" The native SRS here is EPSG:7845, however the tile cache is set to use the ...
0
votes
1answer
32 views

Showing polyline corrdinates in text input

This is my code: map.on("click", function(e) { var latlng = e.latlng; document.getElementById("lat1").value = latlng.lat; document.getElementById("lng1")....
1
vote
0answers
25 views

Add Prunecluster to searchControl Leaflet

I have a bunch of markers clustered with PruneClucster this way : for (i in propsEspeces) { for (j in propsEspeces[i]) { var marker = new PruneCluster.Marker(propsEspeces[i][j]....
2
votes
0answers
33 views

How to Select Site Point then Zoom to Polygons

The map has a farmLayer of points and a paddockLayer of polygons. (In some countries farmers use the term field instead of paddock.) When the farm is selected with a double click the farmLayer is ...
0
votes
0answers
16 views

Add PruneCluster markers to layerGroup

Is there any possibility to add markers from PruneCluster to layerGroup. I need to add them to the search control and as the doc points. I have to create a searchLayer which is a layerGroup where I ...
0
votes
1answer
37 views

Clustering markers from GeoJSON after adding data to layer in Leaflet

I am trying to add clusters in my leaflet map. I use overlayMaps which helps to choose one of the active layers, and in that case I want my marker to be a cluster. But it is not clustering. Again ...
0
votes
1answer
41 views

RemoveMarkers() is not working for PruneCluster markers in Leaflet

I have a set of markers clustered with PruneCluster plugin. The data of these markers is rendered from GeoJSON layers, the way to do it is like this: var propsAmp = amphibiens.features var ...
-1
votes
2answers
76 views

QGIS2Web: Leaflet in full screen [closed]

How can I make the Leaflet in full screen mode?
0
votes
0answers
27 views

Zoom into country polygon with Leaflet with mouse click [duplicate]

I have a GeoJSON file and I'm trying to create a click event to zoom into the specific country. I would also like to zoom out. So far the click events is not working, what am I doing wrong? // ...
1
vote
0answers
47 views

Leaflet multiple on('click') actions

I'm using Leaflet 1.7.1. I call function refreshLine(); (see below). I get map with layer line, everything OK. Also with option onEachFeature: tooltipLine. Function for load lines returns GeoJSON with ...
0
votes
1answer
22 views

GeoServer + Leaflet display map wrongly in square zones of contrast [duplicate]

I have a GeoServer(2.16.2) publishing a raster layer through WMS(1.1.1). On the client side, I have a Leaflet(1.7.1) canvas display the raster layer. As can be seen from the figures below, map is ...
1
vote
1answer
131 views

Cluster GeoJSON data with PruneCluster

I'm trying to create a cluster with categories using PruneCluster around my GeoJSON layers. As the example in GitHub They are creating randomly some markers then adding them to the cluster. I did the ...
1
vote
0answers
92 views

Geocoding search bar input into city with Nominatim and Leaflet

Is it possible to transform a search bar into a geocoder with Nominatim and Leaflet? Using the search bar I would like to search for a city to view weather information and view it on the map. In the ...
0
votes
1answer
62 views

L.Control.Search add layers to map when added to map

I implemented a search functionality in my leaflet map using L.Control.Search. As the doc and the examples say, you have to pass for the Control the layerGroup you want to perform the search on. My ...
2
votes
2answers
61 views

Leaflet opacity slider with L.tileLayer.wms

I would like to control the opacity of a wms layer (using L.tileLayer.wms) in Leaflet using an opacity slider. In L.tileLayer.wms I can control the opacity by setting the opacity:value. This is my ...

1
2
3 4 5
69