Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [leaflet]

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

0
votes
2answers
264 views

leaflet change attribution prefix on baselayer change

In leaflet is there a way to change the attribution prefix when a specific baselayer change happens using the default layer control?
0
votes
0answers
83 views

Open multiple popups in a cluster without them overlapping

When clicking on a cluster at a specific zoom level, the cluster should open multiple popups. I most of this done, so when clicking on the cluster all the popups from that cluster open, but they are ...
2
votes
1answer
731 views

How to use custom icons for Leaflet Layer groups

Ok, I have searched posts and tutorials and could not find the answer to my specific application of this feature Almost all the examples use L.marker to simply place a marker on the map using various ...
2
votes
1answer
122 views

Filtering GeoJSONs data using Selects values

I have a bus network with 2 GeoJSONs : one for stations (points) and the other for lines between them. I have 3 selects :first one to select the bus line and filter the stations on the other two that ...
0
votes
0answers
21 views

enablePermanentHighlight in esri Feature Layer

let marker = L.marker(new L.LatLng(lat, lon), { icon: markerIcon }); map.addLayer(marker); Just like the normal marker, how can we use enablePermanentHighlight() on features of FeatureLayer. Any ...
0
votes
1answer
96 views

Getting width of road segment given its end points using Leaflet?

I want to highlight a road segment on a Leaflet Map. I have the coordinates of the end point of the road segment, so could plot it as a linestring. But the problem is how can I get the width of the ...
1
vote
1answer
59 views

Generate tiles from leaflet polygons

I have a set of shapes drawn in Leaflet (using Leaflet.draw). I need to rasterize these into a tileset and export it because I need to use the images elsewhere. My initial idea was to go through ...
0
votes
1answer
138 views

Leaflet - Creating lines to connect GeoJSON points

How do I create lines connecting GeoJSON point features with the same "ligne" data following a given order (Id for exemple). This is what my GeoJSON looks like : { "type": "FeatureCollection", "name"...
0
votes
0answers
102 views

Geohash Clustring on Leaflet

Leaflet has a markerclustring plugin that cluster markers. i am asking is there a solution to cluster your(lat/lon) with geohash on leaflet map as it is possible on Kibana ?
0
votes
1answer
368 views

Is Leaflet Framework free?

Is Leaflet 100% free? if you go to doc example , you will see : var mymap = L.map('mapid').setView([51.505, -0.09], 13); L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?...
1
vote
0answers
104 views

Visualising road segments as heatmap

I have some data on frequency of different road segments, and need to visualise it as a heatmap. Is there some utility/plugin for Mapbox or Leaflet which does this kind of visualisation. I am only ...
0
votes
1answer
363 views

How to Zoom Google Maps Javascript API to level 25

Cannot Zoom Google Maps Javascript API after 1:564 (zoomlevel: 20) in Mapstore. Can anyone help me to solve this cause my layer keeps on zooming but the map is stuck at zoom 20, I want to zoom it to ...
0
votes
0answers
37 views

Using Leaflet with large data? [duplicate]

I am looking to display a range of different data geometry (points line, or polygon) within Leaflet. I will be displaying only one dataset (i.e. point, line or polygon) at a time. Some of the data ...
0
votes
1answer
187 views

Display animated GEOJSON path in Leaflet

I want to do something similar to this example : http://jsfiddle.net/3v7hd2vx/36/ But instead of creating a polyline between the two points, I want to display already digitalised routes all stored in ...
0
votes
0answers
35 views

Filter on array. Tabletop to leaflet map, points.

Im looking at tabletop to leaflet (tabletop to leaflet). I want my latlon points in spreadsheet to appear on the map. The spreadsheet have a column "city", and i want individual points for each "city" ...
0
votes
0answers
95 views

Set up Leaflet Routing Machine for Leaflet simple coordinate reference system

I'm new to Leaflet/mapping and am trying to create a map based on an image of fictional place. Right now I just have the map and the Leaflet js and css references where I use the simple coordinate ...
0
votes
0answers
173 views

Change content of control in leaflet

I have created a new control from an inheritance: L.Control.extend({ options: { position: position, descriptionHeader: 'This is a description', ...
0
votes
0answers
40 views

Filtering points based on attributes in Leaflet?

I define the points as below and want to only see Group = 'Transportationhub'. i Have tried to add it different places, but it gives me errors every time. Where should a add it. Something like: &...
0
votes
2answers
133 views

How do I override default popup anchor in Leaflet GeoJSON polygon?

By default popups open wherever you click within the boundaries of polygons in Leaflet geojson layers. Here's an example: JsFiddle I would like to anchor the popup either: so it opens in a specific ...
2
votes
0answers
137 views

Lucene Like Search engine for leaflet

I need to search my geojson file by its feature properties (which were fields on the csv file before I converted it). I found this search plugin but it doesn't meet my needs. I need a search engine ...
1
vote
0answers
96 views

Making a choropleth in D3 by intersecting a MultiPolygon and a Point GeoJSON

I am trying to generate a choropleth map showing crimes per neighborhoods: I have a layer showing the neighborhood boundaries of the city of San Francisco, and point data showing incidences of crime ...
1
vote
0answers
155 views

Filter function based on attribute. Leaflet

Im trying to create a webmap based on Leaflet - google spreedsheets example I have a a "group" layer with three diferent group names. I have added some easy buttons to click the layers on and off, ...
0
votes
1answer
106 views

Difficulty rendering a multipolygon from a GeoJSON using JQuery

I'm pulling polygon data (neighborhood boundaries in San Francisco) from an API on https://data.sfgov.org/Geographic-Locations-and-Boundaries/SF-Find-Neighborhoods/pty2-tcw4/data. While I made sure on ...
-8
votes
1answer
384 views

Full Code for showing Shapefile or Geojson in Leaflet [closed]

I am in need of a Leaflet map to show my Shapefile or Geojson file. I need a full code for importing the shp file/.json from my pc and displaying that particular shapefile to my map as center view. ...
0
votes
1answer
273 views

Trying to get WMTS layer in Leaflet, but get error 400 (out of range)

I'm trying to use https://github.com/mylen/leaflet.TileLayer.WMTS to get a wmts layer into my leaflet map, but the error 400 is generated and when I look at the tile it says out of range. While ...
0
votes
0answers
49 views

Poor performance while opening a large number of tooltips using Leaflet?

The objective is to display about 3000 tooltips when the user ticks a checkbox in control layer. At the moment, I am binding each tooltip to a feature of geoJSON layer during the initialization. I am ...
1
vote
0answers
476 views

Show marker only in area polygon [closed]

I got task, to plot polygon on map. After finish draw only marker inside a polygon appear on map. I'm done with leaflet.draw and Draw.Event.Created. What method I can use to check which marker inside ...
0
votes
0answers
63 views

problem with resizing Polygons with gBuffer in R

I'm working on something and having a little problem. library(tmaptools) library(rgeos) library(raster) library(leaflet) library(dplyr) USA <- getData(country="USA",level=1) Texas <- USA[USA@...
1
vote
0answers
103 views

supercluster in folium map

Folium is the python wrapper of leaflet. It is possible in folium as well in leaflet to use markercluster when the number of gps grows. But markercluster have a limit of 50k gps , recently i found ...
1
vote
1answer
214 views

Tooltips are not captured by leaflet-image

I am trying to capture my map with leaflet-image, but the tooltips are not captured. I enabled preferCanvas in the mapOptions and everything except from the tooltips is captured. Each one of my ...
0
votes
1answer
629 views

how to change color of all circlemarkers in leaflet.js

I have a leaflet map that has the data loaded as points, using: pointlayer = new L.GeoJSON(geojson, { pointToLayer: function (feature, latlng) { return L.circleMarker(latlng, ...
0
votes
0answers
214 views

Leaflet - Popup description anchor on top of Marker

I am using Leaflet.js and ingest a Geojson file in order to create Popups and associate them with (geojson) Features. For the icons i use this library (~>Leaflet.ExtraMarkers). Below you can see the ...
2
votes
1answer
171 views

How to change the CRS for a Leaflet map at runtime?

I have different layers with different CRS requirements. Since you cannot set CRS per-layer, but only per-map, I need to change the CRS for my map at runtime, depending on which layer is selected. How ...
0
votes
0answers
168 views

GeoTiff to PNG tiles and leaflet (gdal2tiles-leaflet) latlong projection

I am new to geolocation and tiff. I have a big GeoTiff Image with following gdalinfo : Driver: GTiff/GeoTIFF Files: ImageNew.tif Size is 8501, 8544 Coordinate System is: PROJCS["WGS 84 / Pseudo-...
1
vote
1answer
163 views

How to set Google Maps search bar on the map generated with qgis2web plugin?

I have a Leaflet web map generated with qgis2web plugin in QGIS. By default, there is one option in the plugin generating window to add an address search bar on the map. Unfortunately, that address ...
1
vote
2answers
119 views

Joining csv to kml/geojson in Leaflet webmap and showing joined data in popups?

I'm trying to create a leaflet/mapbox webmap with line layer (geojson or kml) with some IDs and data coming from the .csv (after joining through this ID) file located on the same path as the index....
2
votes
0answers
19 views

Leaflet: calling a JS variable after feature.properties [duplicate]

Currently I have a dictionary where each field from my geoJSON is listed as a key and its alias is the value. I want to loop through this dictionary and return feature.properties.key. Here's some ...
0
votes
1answer
63 views

Python error when using qgis2web

I have some layers that i want to publish after creating html / open layers format web maps using leaflets. Every time i try, i get this error. in fact i am unable to use pluggins. Please suggest. ...
1
vote
1answer
752 views

Displaying several data rows in popup using Leaflet for R?

While trying to map some quantitative data with leafletin R, I manage to place pie-charts with leaflet.minichartson the map, like in the following example: ### data ### d <- structure(list( ...
0
votes
2answers
202 views

Disable radio button for a single overlay layer in leaflet

I have added a bunch layers as a leaflet overlays. How can I remove the radio button for 1 of the overlay layers so that it is by default on and users cannot toggle it on and off?. I have been looking ...
0
votes
1answer
138 views

How to make highlighted polygons when click on Leaflet map from qgis2web plugin?

I have generated the Leaflet web map using qgis2web plugin in qgis software. The map contain polygons. Now I want the polygons to be highlighted when I click on each and to stay highlighted until I ...
3
votes
2answers
180 views

Using LAT/LON in Leaflet with Geoserver GeoJSON?

We're building a simple application that takes the result of a geococde and determines which school boundary the point resides. I'm trying to figure out if I should be doing this using a ...
1
vote
1answer
416 views

Extracting attributes for markers in leaflet, onClick event?

I'm using a JSON file to plot the markers in Leaflet: [{ "id": 1, "date": "1/1/2015", "Title": "Trinity College", "Latitude": 41.745167, "Longitude": -72.69263}, { "id": 2, "date": "1/2/...
0
votes
1answer
110 views

Add labels to layer in CARTO.js (v4)

Does anyone know how to add labels (using a feature column such as "state") to a CARTO.js layer? This is how I have added the layer to my map: const boundariesDataset = new carto.source.Dataset(` ...
0
votes
1answer
313 views

Displaying geojson polygon in leaflet imported with ajax

I'm having difficulty displaying a simple polygon in leaflet. I'm unsure if my syntax is bad or if I'm importing the geojson incorrectly. I'm using the ajax plugin from calvinmetcalf and add the js ...
1
vote
1answer
130 views

Adding SQL layer with dropdown selector in Carto?

I am trying to make a map that has a layer showing District boundaries of South Africa, with a selector allowing the user to view which climate change indicators are a priority to each District. Using ...
0
votes
0answers
28 views

Accessing tile layer saved in google bucket from leaflet?

I have saved a tile map under my google bucket account. Now i want to render that tile map using leaflet. I am rendering openstreet map in this manner: L.tileLayer('https://{s}.tile.openstreetmap....
0
votes
1answer
59 views

leaflet R mapping David Rumsey

I am trying tu use David Rumsey' Georeferencer tiles in R leaflet package without success (Only the OSM basemap is displayed). According to the package vignette I tried : library(leaflet) ...
0
votes
1answer
50 views

Second layer from data getting ignored on Leaflet map, and bounds not found

I've been breaking my head over a simple generalization of the combination of several Leaflet examples: Make a polyline between markers, But use Leaflet.MarkerCluster as we may have multiple in ...
0
votes
2answers
354 views

Linking images to features in geojson layer popup using Leaflet?

I have a map of cycle fatalities, in which skull icons are clicked to produce custom popups: I would like to include an image along with the rest of the information on the popup, so there's a picture ...