Questions tagged [leaflet]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
17 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
10 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 ...
0
votes
0answers
20 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?{...
0
votes
0answers
15 views

Problems while changing color of route line [on hold]

This is my code var map = L.map('leaflet', { layers: [ L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { 'attribution': 'Map data © <a href="http://openstreetmap.org">...
1
vote
0answers
23 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 ...
0
votes
0answers
19 views

Identifying route detour using Leaflet [on hold]

I'm implementing a Leaflet polyline to show my definited route and then, I show the points generating by a tracker device over the route. And now I need to show when a point is out the route ...
2
votes
0answers
43 views

Appending label to every layer in current map bounds using Leaflet

I am trying to reduce the amount of permanent tooltip on my leaflet map for performance reasons. I have over 5000 geoJSON Polygons in my non-geographic map. At a specific zoom level, my Polygons ...
0
votes
1answer
21 views

Display NSIDC arctic ice extent using PolarMap.js?

I'm a newbie in GIS. I've built a map of an expedition across the arctic region, but right now the trek is displayed across the ocean. To fix this, I've tried to integrate ice extent shapefiles from ...
1
vote
0answers
22 views

Generically filtering multiple GeoJSON layers in Leaflet

I am trying to implement a function that will filter multiple GeoJSON layers in Leaflet based on the contents of a text box on the same page. For instance, a user may write 4 5 7 10 in the textbox - ...
0
votes
2answers
29 views

Leaflet map with coordinates included in the URL path

I am trying to implement the dynamic coordinates in the URL path in the leaflet map as per the Google Maps example. I found some examples: https://stackoverflow.com/questions/15919227/get-latitude-...
2
votes
2answers
79 views

Splitting A polygon into multiple polygon by multiple line strings in Leaflet and turf.js

I have need to split a polygon into multiple polygons based on the line strings drawn on the polygon. I have come across another post that splits a polygon into two based one line string. If a new ...
0
votes
2answers
51 views

Changing opacity for KML layer fetched in Leaflet map

Is it possible to change the opacity for the .kml file, that has been attached via leaflet-plugin? Basically the plugin is here: https://github.com/windycom/leaflet-kml but after implementation ...
2
votes
1answer
19 views

Image slideshow in leaflet map based on geoJSON layer

To be more precised like previously Image slideshow implementation into Leaflet map I have developed my code in the jsfiddle, which states where the problem is: https://jsfiddle.net/Krukarius/...
0
votes
0answers
20 views

Displaying ArcGIS Online vector tile layer in Leaflet using Leaflet.VectorGrid Not displaying correctly

I have created a Vector Tile Package using ArcGIS Pro and uploaded it to ArcGIS Online. I am trying to load the layer into a leaflet map using the Leaflet.VectorGrid plugin. It successfully loads but ...
0
votes
0answers
27 views

Ionic Leaflet delay/latency retrieving images

I have a very basic mapping application using Ionic 4 / Leaflet and functionally it is working. However I notice a significant delay on loading basemap tiles when in app compared to in my desktop dev ...
1
vote
1answer
27 views

Raster Image Tiles created using GDAL2Tiles (from GDAL 2.4.2) does not align properly with Open Street Map Tile layer

I am trying show a custom tile overlay (created from a raster image) on top of openstreetmap base layer using Leaflet. I used one of the raster images from https://www.naturalearthdata.com/downloads/...
1
vote
1answer
24 views

Leaflet Layer Control for Multiple Layers in One Object

I'm reading in a large JSON object that has multiple layers within the same object. The structure is like so: { "type": "FeatureCollection", "name": "AllProgrammedProjects", "crs": { ...
1
vote
1answer
47 views

Leaflet- How to use time dimension plugin with image overlay

I am very new at Javascript. I am trying to create animation with my monthly soil moisture output (.png format) on OpenStreetMap using the Leaflet package. I could use the time slider plugin to move ...
2
votes
1answer
74 views

Adding hyperlink for each feature of GeoJSON layer under qgis2web?

I wanted to put a hyperlink for each station of my layer "dots" and I would like thereafter in my web page: to click directly on a station to send me to the concerned page. Indeed, I added a ...
1
vote
1answer
57 views

Displaying outlines for WebGL polygons in Leaflet, source data coming from GeoJSON object

I have been using the Plugin Glify for Leaflet. It offers a really great and simple way to use web gl to render maps on Leaflet JS. The problem I'm facing is there are custom options for '...
1
vote
1answer
43 views

Leaflet map GeoJSON placemarks with image slideshow

I am wondering how to create leaflet map where GeoJSON placemarks provide the image slideshow as per the example below: https://docs.mapbox.com/mapbox.js/example/v1.0.0/markers-with-image-slideshow/ ...
1
vote
1answer
56 views

Leaflet infobox plugin

I am searching a plugin for Leaflet, to have an infobox at the border of the map. Please look at my screenshot. A click on the info button should be open a window. In this window I would like to have ...
3
votes
2answers
58 views

Make Leaflet polyline bold by hover?

I have a Leaflet map that I show streets and also there is an unordered list of street names in the same page with map. What I want to do is when mouse cursor hovers on a street name in the list, the ...
1
vote
1answer
56 views

Rendering arrow paths in Leaflet

I made a map in QGIS, and I now want to render it into a web interactive product. I've tried to use Leaflet but I'm not able to reproduce the same pathways. So far, I managed to produce simple lines ...
1
vote
1answer
54 views

Heatmap with GeoJSON, Leaflet and Leaflet.heat plugin

I'm using the Leaflet.heat plugin to create an heatmap in Leaflet. I've some problem with GeoJSON data that I've loaded through a WFS service on GeoServer. I used the function geojson2heat to get the ...
1
vote
1answer
50 views

Adding leaflet.fullscreen plugin for QGIS2WEB

What I have done after export of the qgis2web leaflet files: Copied the two css and js files to the folders. Include the plugin code within the index.html file: <link rel="stylesheet" href="css/...
1
vote
0answers
38 views

Display ESRI MapService (WMTS) with EPSG:28992 coordinate system in Leaflet web map with OpenStreetMap base layer

ESRI MapService https://tiles.arcgis.com/tiles/nSZVuSZjHpEZZbRo/arcgis/rest/services/Historische_tijdreis_1870/MapServer have EPSG:28992 coordinate system. In QGIS I can add this layer via WMTS https:/...
1
vote
1answer
55 views

Leaflet active area autopan issue

I am playing with leaflet plugin active-area (https://github.com/Mappy/Leaflet-active-area), but I am having an issue with autopan, specifically regarding autopan when popups are opened. Desired ...
1
vote
0answers
31 views

How To Display ST_AsMVT tiles in Leaflet

I have a large polygon dataset in PostGIS I would like to display in Leaflet map. I understand st_asmvt() query will return mapbox vector tiles. I can successfully query the data in postgis but I ...
0
votes
2answers
37 views

Leaflet event onclick zoom in and out (JavaScript) [closed]

I just want to make onclick event in zoom in and zoom out. How can I do it? I just confused to make it because zoom in and zoom out is something that generated by library. Should I make new function? ...
2
votes
1answer
71 views

Artefacts (gaps) in tiles from GeoServer

I have created a series of GeoTiff files containing global satellite raster data in EPSG 4326 format. I serve them in GeoServer (v2.15.2) and ask for the data through WMS requests from Leaflet maps in ...
0
votes
1answer
18 views

How to restrict Leaflet points to general DB rule

I am trying to make a REST call which accepts bounding box lat-lng as body parameters. But unfortunately DB geoPoint restriction is: • Latitude : max/min +90 to -90 • Longitude : max/...
1
vote
0answers
29 views

Zooming to view more/less details of wms layer in Leaflet

I have a layer in geoserver that contains data of different levels: Country boundary, Province Boundary and District boundary in a single file(distinguishable from attribute fields). I have loaded the ...
1
vote
2answers
36 views

Default Leaflet icon is not showing

I want to use default icon provided by leaflet instead of using something else. But unfortunately i am not seeing anything, not even error. var myIcon = L.icon({ iconUrl: 'my-icon.png', ...
0
votes
0answers
33 views

Using Pix4d google_tiles KML outside of Google Earth

I am using Pix4d to generate orthomosaic tiles. I would like to display these in something other than the HTML that is provided. Possibly have 2 or three shown on the same window. The full ...
0
votes
0answers
25 views

Why snapping doesn't work on Leaflet version 1.0.0 and newer?

On documentation of Leaflet.Draw, Snapping sample is not working with Leaflet 1.0 but it works with Leaflet 0.7 http://leaflet.github.io/Leaflet.draw/docs/leaflet-draw-latest.html#l-draw-polyline Is ...
1
vote
0answers
33 views

How can I map 3000 geotagged photos? [closed]

What could be the best solution for this? I'm looking for the simplest way to create an online map with 3000 photos in it. I'm looking for batch upload (say, upload all the photos in a folder). ...
-2
votes
0answers
70 views

Mapserver + WFS + Leaflet?

Is it possible to add a vector layer in Leaflet from MapServer's WFS ? I tried Flexberry WFST plugin and it doesn't work (WFS layer is not displayed). Here is the JavaScript code for adding WFS ...
0
votes
0answers
44 views

GeoServer layer disappearing from Leaflet map at max zoom?

I am developing an application that uses GeoServer + Leaflet + PostGIS. I created my database-based layers within GeoServer. As a basemap I am using OSM. When the maximum zoom occurs with the active ...
3
votes
0answers
37 views

EPSG:25833 in LeafletJs [closed]

I am currently working on the different coordinate system. Specifically, I am concerned with the correct presentation of EPSG:25833 (ETRS89/UTMZone89) in Leaflet. If I am right Leaflet used as ...
1
vote
1answer
29 views

Spliting a polyline object by line ID based on @data values

I am trying split a SpatialLinesDataFrame by attributes I merged into @data I extracted a list of line ID's associated with a points data frame and aggregated them by category and line ID in dplyr # ...
0
votes
1answer
39 views

Add more than one layer of GeoJSON data to Leaflet?

This is my code for loading one layer of .geojson data to Leaflet. The data is basically in the form of markers and it's demonstrating different location in Saudi Arabia. It's saved as "saudi_location....
0
votes
0answers
24 views

Leaflet check if L.geoJSON layer has any features

I am making my own layer control in a way. I want to check if a named L.geoJSON has any features. If not I will fetch GeoJSON from an API and add it to the layer. But I cannot work out how to check ...
2
votes
2answers
51 views

Loading .json files into Leaflet and filtering them [closed]

I am new to web development and Leaflet/GIS in general. I have a couple of shapefles, let's say they are roads.shp and utilities.shp. And let's say I have the means to convert these shape files into ....
1
vote
1answer
25 views

Insert multiple value to marker.bindPopup in Leaflet

I have a value in array like this [ { "officer_id": "T001", "officer_name": "Michael", "type_id": "1122", "address": "12th Elm Street", "address_description": "Chloe Toy Shop", "description": "...
1
vote
0answers
39 views

Leaflet: Load GeoJSON point data in polygon, when selecting polygon

I've got a point dataset (~ 160.000 points) which has a filesize of around 30 MB. Because that is too large I decided to slit it into 12 separate GeoJSON files. I've got a map with 12 polygons. When ...
1
vote
1answer
51 views

Transforming GeoJSON data to turf.polygon?

I want to transform GeoJSON multipolygon to turf.polygon for find point within polygon but it can't read property from GeoJSON. Is there any way to do that? This is my polygon data in GeoJSON: ...
2
votes
1answer
110 views

Largest polygon inside a GeoJSON multipolygon

How to find the largest polygon in GeoJSON of type multipolygon so that I can add a Leaflet tooltip to the largest polygon rather then a random polygon in multipolygon? I have a Multipolygon and when ...
1
vote
2answers
38 views

Leaflet search plugin for $GetJSON function

I want to make my markers researchable in JSON layers. This is how the code looks for GeoJSON layers (imported as a .js file) var openreach = L.geoJSON(openpoor, { pointToLayer: function (feature, ...
1
vote
1answer
41 views

Leaflet markers from multiple JSON layer within the radius given after layer selection

Continuing the issue with the multiple JSON layer selection with leaflet: Leaflet select markers from multiple JSON files within the radius given I was trying to put a step forward and make the ...