Questions tagged [leaflet]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
33 views

GeoJSON data disappears when using Marker cluster plugin [closed]

Here is the code I used to display my GeoJSON data on a leaflet map using HTML, CSS and JavaScript. Through the following code I wanted to load my point data on the map and form clusters of it using ...
0
votes
0answers
26 views

Disable map click when clicking on a polyline in Leaflet and vue2-leaflet

I defined addMarker and polylineClick functions. addMarker is called when clicking on the map and polylineClick is called when clicking on a polyline. But when I click on a polyline, map click event ...
1
vote
1answer
45 views

Cannot get transparent tiles when using gdal2tiles on a GeoTIFF

I have this GeoTIFF generated through UAV mapping. It has 4 bands: red, green, blue and alpha. I've been trying to use gdal2tiles to use this geotiff as a basemap on a Leaflet project. The thing is I ...
1
vote
2answers
68 views

Leaflet MarkerCluster and Esri Leaflet Cluster - custom marker data from feature data not count of markers in the cluster

Is it possible to sum the data from the feature data in a esri feature layour to display on a clustermarker. The default value is the count of the markers contained in the cluster, but I want it to ...
1
vote
1answer
74 views

Select only the feature that overlapses its correspondant in another layer - Leaflet, qgis2web

I have 2 identical layers overlapping, each containing identical FeatureCollection values. Only one of them is added into the map. Is it possible that when clicking on a specific feature of the ...
0
votes
1answer
82 views

Coordinate System Mismatch In Folium

I'm trying to get familiar with Folium library in Python. I wanted to make a web-map of Turkey. Framework uses EPSG:3857 Web Mercator CRS as default. I tried to use approximate coordinates at the ...
1
vote
0answers
38 views

Fitting tooltip completely inside a feature else removing it in Leaflet

I have been using tooltips as a form of labeling my polygons in Leaflet. The problem I'm not able to solve is to remove the labels from the view that doesn't fit completely inside the feature. ...
0
votes
1answer
398 views

What are Folium style_function parameters

I'm trying to do a uniform style for each polygon, but I want to know further about what I can do with Python library Folium Style_function. What can I put in the style variable? Where are the ...
1
vote
0answers
96 views

Specifying legend location in folium

I have a few choropleth maps in one Leaflet map using folium. However, in my output, my legends all congregate underneath one another and on one side where it blocks the 'control zoom' icon. Is there ...
0
votes
0answers
78 views

Add custom text to Leaflet Draw button

Has anyone had luck adding text to a button in Leaflet Draw? I would like to add text next to the icons on the buttons I have, but there doesn't seem a way to specify that information in the ...
0
votes
2answers
53 views

How to add TomTom's traffic flow map images to Leaflet? [closed]

I have a raster image from TomTom which shows traffic flow. The image is created after sending lat, long coordinates, that is one point to the GET serves with the zoom value, then I get the image ...
1
vote
0answers
70 views

How to send bbox dynamically via wms request in leaflet?

I've created a leaflet map and use L.tileLayer.wms to load my wms layer. I dont want to load all data on my map instead i need to load data based on bbox.I use this line for sending wms request to ...
2
votes
0answers
51 views

Leaflet.js custom coordinate system

Background: Display topographic plans of a specific size (1500 meters x 1500 meters). The source images of tiles can be of different sizes and resolutions. It is required to display on the plan some ...
0
votes
0answers
80 views

Leaflet nested layer control

I'm trying to build an interactive game map with Leaflet and I would like to implement nested layer groups. I tried doing it the obvious way: putting some layer groups inside of a "master" layer group,...
1
vote
0answers
28 views

Help spTransform CRS for use in leaflet

I am producing Kernal density estimates for animals from tracking data. Location is input at x y data, I produce a spatial polygons dataframe from these coordinates. xy<-id[c("X", "Y")] id<-id[...
1
vote
0answers
19 views

How can i save and load items in canvas format in leaflet?

I've created a leaflet map and added draw control. I can draw lines, polygons, and markers but I need to add a canvas and draw my favorite drawing items like this : I want to save these items and ...
0
votes
1answer
45 views

How to Use ST_MakeLine query in leaflet to connect to Carto

I want to run in leaflet a query that works in carto Builder to connect points in a line: SELECT ST_MakeLine(the_geom_webmercator) as the_geom_webmercator, min(cartodb_id) as cartodb_id FROM my_table ...
0
votes
0answers
38 views

Django-leaflet: How to display geojson from database to django-leaflet

I am trying to map points from database on django-leaflet map using django-geojson package. I am able to access the data as url, but I am not able to display the points. I am baffled what could have ...
0
votes
1answer
106 views

Issue with using MultiLineString in Leaflet Animated Marker Plugin

This response on image below is coming from Geoserver as MultiLineString and I restructured it to LineString like on image because Animation plugin doesn`t support MultiPolyline json structure and ...
1
vote
1answer
94 views

Leaflet (React-Leaflet) custom renderer

I am reposting a question that i asked in stackoverflow about leaflet and custom renderers. Basically what i want to achieve is create a custom renderer that alters the shape of CircleMarker or ...
0
votes
1answer
110 views

L.Control.Search for filtered marker with multiple layer

I have two geojson layer. tram.js and ubahn.js, both with just marker, I use them in a filter and want to search for these filtered marker. But it isn't working and I don't get any errors. I used ...
2
votes
3answers
267 views

Add something into L.CircleMarker

I have two different colored CircleMarkers for two geojson layer. Is it possible to add a letter into those circles, without using divIcon? This is where I give them the color. function getColor(...
1
vote
0answers
14 views

Approach to smoothly transitioning a large amount of GeoJSON features' style

I'm working on an interactive Leaflet map with about 1000 GeoJSON features. When I click on a one of the menu items on right, I use a function to style the feature according the values of the active ...
0
votes
1answer
81 views

Map slightly off-center with simple (cartesian) CRS and tilelayer in Leaflet

After several attempts, some tinkering and a lot of asking here, I got my fictional map running with tiles by setting up a simple custom CRS. Alas, the map is slightly off center. I got the feelig ...
0
votes
0answers
65 views

WMS with EPSG:3004 not returning tiles in LeafletJS

I am consuming an Italian WMS in a CRS with an EPSG code of 3004 in QGIS. It works somehow (Needed to change the CRS from 4326 to 3004), yet the definition in the GetCapabilities document is strange (...
0
votes
1answer
38 views

Setting polygon style with setStyle() function in Leaflet does not work from select menu

I think this question will be easy for you But I don't know where is the problem I am trying to change the style of the rectangle using the select menu but it does not happen In contrast, when ...
0
votes
0answers
76 views

Leaflet - do I need the rastercoords plugin for an non-geographical map with CRS.Simple and local tiles?

I got a fictional map set up following this tutorial: https://leafletjs.com/examples/crs-simple/crs-simple.html But when I try to switch the imageOverlay for map tiles (generated with gdal2tiles-...
0
votes
2answers
170 views

Generate own XYZ Tile (MBTiles) - which URL?

I want to create my own xyz tile for an own basemap on my webspace. I want to use the own basemap for a qgis2web leaflet map. This I have done: processing toolbox: generate XYZ tiles (MBTiles) I get ...
0
votes
0answers
25 views

Open the popups of all markers that are visible on the map with a zoom > 14 [duplicate]

I need to open all the markers that are visible on the map at Zoom > 14. I am using leaflet.CircleMarker Init map var tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { ...
0
votes
0answers
27 views

Reading GeoJSON from external file in Leaflet [duplicate]

I found the following script on the web but I don't know how to change the way to read JSON code. In the script the JSON code is included in a var called sitec but I need to read that code from an ...
0
votes
0answers
10 views

Leaflet layer box to appear larger

I want the layer containing box at the top right in a leaflet map to appear larger. When I open the map in mobile the layers panel appear smaller to read out. Is there a way to enlarge the layer box ...
1
vote
1answer
21 views

Adding a value to L.imageOverlay

I'm trying to add a value to an L.imageOverlay in leaflet. When you add the layer on the layer control panel, it adds the value using the function below to the total, I've tried it with an attribution,...
1
vote
0answers
24 views

How to include a Mapbox Studio Tileset in Leaflet?

I would like to include in my Leaflet map a vector tile set that I uploaded to Mapbox Studio. I first uploaded a tileset to the tiles page of Mapbox studio. Then I created a new style and added my ...
1
vote
1answer
27 views

How to set the same size between GeoServer and Leaflet?

The right Map is a layer from GeoServer (I set the CRS as 4326) in the left is the result of the Leaflet code (here a linked the GeoServer layer to publish in the leaflet map), as you can see in the ...
0
votes
1answer
81 views

Leaflet - global variable in onEachFeature returns value of next feature

Thanks to TomazicM I got my GeoJSON import up and running. Here's the whole code, I highlight the problematic bits thereafter var map = L.map('map', { crs: L.CRS.Simple, minZoom: -...
0
votes
0answers
14 views

How to set map background color in Leaflet [duplicate]

When I display a map in Leaflet, the background color is gray. I would like to be able to change it. How do I change it?
0
votes
1answer
89 views

Avoid duplicate properties from GeoJSON file in a Leaflet map

I'm posting this question here because it is related to GeoJSON and Leaflet. Here are my requirements : My map is ready and functional. I'm using markerCluster to create clusters when several ...
0
votes
0answers
39 views

Target clustered markers only with getAllChildMarkers()

I'm on a leaflet map project. I'm working with a geoJson file; I'm looking a way to target the markers that are inside a cluster, in order to show their respective datas in a dynamic div; I have an ...
1
vote
0answers
51 views

I want the circleMarkers to be top of the polygons, currently they are not clickable after the polygon added to map

I have used dynamic variables to store reference of the layers to make them off and on with html checkboxes in the menu bar. I have used create pane to order the panes stack but that didn't worked. I ...
2
votes
1answer
30 views

How to use L.Marker.Stack plugin?

As suggested by @TomazicM I post a new question, related to my leaflet issue. In the search for solutions to a marker display problem, I came across the L.Marker.Stack plugin. I don't know how to use ...
0
votes
1answer
295 views

Leaflet markers at same position: dynamically display all markers infos through one marker only

I created a map using Leaflet, with a filtering system, custom icons with the leaflet.awesome-markers plugin, and jquery functions so that when you click on the markers, the corresponding information, ...
1
vote
1answer
36 views

Leaflet change GeoJSON geoms style

I have GeoJSON that could be either a point or line and I am trying to make the layer red. Here is the code: function styling(feature) { return { color: 'red', }; } ...
2
votes
2answers
174 views

How to work with GeoJSON, Leaflet and pixel coordinates?

I'm a noob trying to piece together a - as I thought - simple thing: A Leaflet map based on a raster picture with markers coming from a GeoJSON file. As this is a fictional map, I use the CRS.Simple ...
1
vote
1answer
351 views

How can I overlay text on a map, without a marker or textbox, using Folium?

I want to place text anywhere, as though it were part of a tile, no text box around it, and "shown on opening" (ie, show=True). I don't see any text overlays in the documentation: https://python-...
0
votes
1answer
70 views

Get longitude and latitude from a shapefile with Leaflet in R

I've been trying to map with leaflet to add addCircles() but my shapefile doesn't seem to have the latitude lat and longitude lng parameters so I got the centroids for each city as is the code below ...
1
vote
1answer
60 views

How do you create a “donut hole” / cut-out-effect using folium?

I've tried adjusting parameters and changing the order in which these circles are added. I can't get the interior circle, or "hole", to remain transparent. The outer circle always predominates. m = ...
0
votes
1answer
85 views

Leaflet add layer by user input

I'm filtering a geojson layer by user inputs,and works fine for the first query, and works fine for the first query, the problem is with the second so on. starting from the second query brings me the ...
1
vote
1answer
45 views

GeoServer WMS not rendering in Leaflet [closed]

I am very new to GeoServer and currently trying to render WMS tiles on the top of the map that uses Leaflet. When tile loads, it does not load all the tiles. In other words, if it requires, 4 ...
0
votes
0answers
13 views

Syntax for GeoJSON Style Variables

I'm having trouble with the syntax I need to create a colored box-shadow for a geojson feature. I create this variable: var subdivisionHoverStyle = { "color": "#ff0000", "weight": 1, ...
0
votes
0answers
30 views

Highlight a single GeoJSON feature, darken all others in Leaflet

I would like to bring extra highlight to a GeoJSON feature when it is clicked by making all the other GeoJSON features on the map darker. One approach I was thinking was drawing a semi-transparent ...

1 2
3
4 5
67