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

learn more… | top users | synonyms (1)

0
votes
1answer
29 views

Dynamic Layer Name - Leaflet Layer Control

I would like to have the name of a layer used by Leaflets layer control feature come from a variable instead of a string and based on data from the layer. The example shown below uses the variable ...
1
vote
2answers
84 views

How to create a map using LeafLet

Im looking to create a map that can be interactive. The best option that I found is leaflet, the thing is I don't find any resource explaining how to create my own map. Im looking to create an ...
1
vote
1answer
32 views

R filter shapefiles with dplyr

How to filter shapefiles data in R with dplyr and then put it in a leaflet map? not reproducible example sorry: library(dplyr) library(leaflet) library(sp) library(maptools) library(rgdal) ...
1
vote
1answer
56 views

Leaflet map.locate, very long response time

I'm using leafletknn to search the nearest geojson element from the user location. I add a map.locate method that zoom to the user location. The response time is longer than when I directly use it... ...
1
vote
1answer
25 views

How to Convert Just a Sulawesi Map to Leaflet

I'm still develop a Web GIS that show population distribution in form of heat map. I'm use Quantum GIS with Open Street Map & Q2Leaflet Plugin as a tool to accomplish it. The problem is, I just ...
0
votes
0answers
38 views

Mapbox.js: Bind dynamic popups with featureLayer?

I am building a multiple chloropleth map using v2.2.1 of Mapbox.js with featureLayer. Now I would like to add tooltips with custom content on hover event. This code is working well to set up the ...
1
vote
0answers
33 views

Geoserver create generic dynamic style

I'm quite new to geoserver, and I wonder if its possible to create a dynamic style. I got a big shapefile with more than 600 variables, and I want to create a generic style where you can input the ...
1
vote
2answers
56 views

Leaflet map on click ignore layers

Leaflet has a 'click' event: map.on('click', function(e) { alert(e.latlng); }); This does not appear to work when map layers are displayed on the area clicked. Is there a way to use ...
2
votes
2answers
32 views

CartoDB latlon change to lonlat

I have this script I am trying to use to search for a value within a CartoDB table. I can't seem to figure out how to reverse the order of the lat & long coordinates so they appear as lonlat... ...
1
vote
2answers
43 views

Leaflet's shapefile plugin only compatible with Firefox

I created a html page (currently locally) and used Leaflet to create a basic map to which i plan to add several shapefiles. To do this, i use the leaflet.shapefile extension ...
0
votes
1answer
92 views

How to let the user resize a Leaflet map <div>

I use Leaflet to display some map. I would like the user to be able to resize the map by dragging its borders as she likes. I would like to do this without additional Javascript libraries, instead by ...
0
votes
0answers
7 views

How to change Level Zero Tile Count in Leaflet

I have a tile map that I want to display using Leaflet but the base layer is 4 tiles by 4 tiles instead of the usual 2 by 2. Is there a way make this work with Leaflet?
0
votes
1answer
20 views

How to configure Apache for topojson gzip files

Building an online interactive map with leaflet and some heavy layers with my spatial data in topojson format. I have been reading about gzip but I am still uncertain how to configure it. Do I need ...
2
votes
1answer
36 views

disable onEachFeature at zoom level, leaflet

I have a leaflet map that zooms and fits on the bounds of the polygon that is clicked via onEachFeature. Is there a way to disable this at a certain zoom level? I add new layers on the 'zoomend' ...
0
votes
0answers
35 views

Leaflet - Getting tile border coordinates

Displaying grid borders is fairly easy with CSS or adding an image like this: The result is a map like this: However, I'm having a hard time trying to get the coordinates of those tile borders. ...
0
votes
1answer
57 views

Image won't center in Leaflet pop-up

I am using Leaflet to create a map of points (from geojson) that will open a picture and text under the picture. The text is centered, but I am having trouble centering the picture. This seems like ...
1
vote
2answers
47 views

leaflet / change a geojson divicon html

I have a geojson layer with a divIcon and now i want to change it. i have tried whit seticon but it does not work. How could i do it? This is what I am trying: papesjson.eachLayer(function(layer){ ...
1
vote
1answer
40 views

Leaflet Routing Machine won't read waypoints from variable TypeError: t is null

I am trying to add waypoints from a variable to a leaflet map. The resulting variable split_route1 is formatted correctly and when I hard-code the waypoints from the console log results, the ...
1
vote
1answer
29 views

WMS layer details not clearly visible in Leaflet

I cannot figure out where the problm is. I use GeoServer and Leaflet. My problem is that when I visualise some layers (in particular that with the names of the clients) I cannot see them all at each ...
0
votes
0answers
33 views

How to load GeoWebCache tiles into Leaflet?

Tiles are already created in GeoWebCache, but they can't be loaded into Leaflet. I can't figure out where I did wrong in the settings of GeoServer. Could anyone point out the possible cause? ...
0
votes
1answer
33 views

Selecting features by attribute in Leaflet

Is there a way to select an individual feature based on an attribute from a FeatureGroup in Leaflet? For example, when selecting a feature based on a click event, I will do something like, function ...
1
vote
1answer
65 views

Leaflet.label and MarkerCluster problem with zoom dependent add/remove layers

Here's the setup: I have a leaflet map with point data, to which I have applied leaflet.label and leaflet.markercluster. I add the clustered point data at a particular zoom level (code below). All ...
1
vote
2answers
139 views

Heatmaps: right terms (isopleth vs choropleth, etc) and how to implement a value-based one that looks good?

NOTE: My original question was about interpolation methods, but I've found that I was actually asking the wrong question. Interpolation methods with Heatmaps and IDW are the least of my problems right ...
0
votes
0answers
27 views

Leaflet controls: onAdd() -> “ready” event

I've got a custom control for Leaflet (0.7.3) that uses L.DomUtil.create to generate its own HTML in the onAdd() function. Most of its bootstrapping happens in onAdd(), but I need to do some final ...
2
votes
1answer
19 views

Input a number for user's number entry

The following code works fine. When I click the "Test Play/Stop" button a series of points from the 'geojson' list are drawn with popup attributes one by one. The time interval is defined by the ...
2
votes
0answers
43 views

How to access Leaflet EPSG:3857 coordinates?

I read everywhere that Leaflet is internally using a spherical web mercator (EPSG:3857), but whatever I try I get either Lat/Lon (EPSG:4326) or strange coordinates I dont understand: ...
0
votes
2answers
81 views

How to transform EPSG:3857 to tile pixel coordinates at zoom factor 0?

I'm creating a Leaflet map with an WebGL overlay (using L.CanvasOverlay) which renders a street network on the GPU. Let's assume I have a point (1497143.62, 6896952.18) in EPSG:3857 and want to ...
0
votes
1answer
17 views

Reading values/attributes from external *.txt file

The following code works fine. When I click the "Test Play/Stop" button a series of points from the 'geojson' list are drawn with popup attributes one by one. How can I put the list 'geojson' as ...
0
votes
0answers
24 views

In Leaflet how to use control on an existing div?

In Leaflet, adding control classes like Zoom In/Zoom Out is possible. But I do not want to add a new div into my html. I want to use an existing div to contain my tools. I am pretty sure that it can ...
1
vote
1answer
27 views

Shared markers/paths in layer groups - toggle issues

I'm working on a map that displays the trips I've taken. I've created many markers and lines to designate locations and the paths between them. I've created trips using the required markers/paths and ...
1
vote
0answers
35 views

Leaflet Temporal animation of marker clusters

I recently have applied the markercluster leaflet plug-in to my map and I was wondering if something like leaflet.timeline would be compatible with cluster visualization? if not is there any other ...
0
votes
1answer
54 views

R-Leaflet: Plotted points on wrong country

I am learning the leaflet package and am running into a snag. To learn the package I am using the Snow deaths dataset from the package HistData which contains historic Cholera deaths from an epidemic. ...
0
votes
1answer
28 views

Proj4Leaflet create CRS scales/resolution from WMTS getCapacilities ScaleDenominator

I trying to set up the CRS scales/resolution for a map accordingly to the provided information of an WMTS getCapabilities request. At the moment I'm playing with the following service. The service ...
0
votes
1answer
52 views

QGIS2WEB white screen on export/preview?

When I export my QGIS2WEB project it goes through, but when it loads up in my browser after the export is done all I see is a white background with the zoom/minus feature in the top left hand of the ...
0
votes
2answers
78 views

QGIS2WEB Error when exporting to Leaflet/OL3

I am having all kinds of problems with the QGIS plugins fr exporting my map to Leaflet or OL3. Whenever I try to preview my project I just get a white screen with nothing. Then when I try to Export to ...
1
vote
0answers
89 views

Leaflet : Change marker icon from onEachFeature instead of pointToLayer

I'm referencing external data, matching it up with particular fields in feature.properties and using that to decide which layer to put the feature in, all of this from inside the onEachFeature part. ...
2
votes
2answers
57 views

Qgis2leaf doesn't show layers with scale-dependent visibility

When I add layers to the QGIS2LEAF dialog box it accepts it and opens up the preview in my web browser, but when I starting looking for the layers, in this case points for campgrounds, I dont see any ...
4
votes
0answers
46 views

Describing borehole information with geojson (javascript)

I deal a lot with borehole information and looking the best way to move it around in javascript / take advantage of javascript libraries (e.g. leaflet) for looking at this information on mobile ...
1
vote
0answers
19 views

Leaflet inbuild AJAX methods for WMTS getCapabilities request

I was wondering whether the Leaflet library has inbuilt methods to make AJAX requests. My goal is to create a plugin that makes an XMLHttpRequest request to a specified WMTS resource and parse the XML ...
0
votes
1answer
75 views

Map Not rendered Leaflet but renders correctly in changing the zoom level of browser

I am loading a leaflet map rendering mapbox tiles, geojson layers (initially i dont show the map) and i also have tabular links which can be seen when the page loads, the links are list of places and ...
0
votes
0answers
18 views

Open Popup on CartoDB Layer

I have a cartodb viz layer (polygons) and geojson layer in a leaflet map (parcels), where the geojson layer overlaps the cartodb layer. How do I disable the interaction to the geojson polygon layer so ...
1
vote
1answer
102 views

Using Mapbox (LeafletJS), how do I edit imported shapes from GeoJSON?

Overview: I'm currently working on a project where I'm importing GeoJSON into a map using Mapbox. However, I'm wanting to be able to edit those shapes once imported into the map. I've gotten the ...
0
votes
1answer
53 views

Leaflet: Find my “this” in GeoJSON.pointToLayer function

In leaflet, I have a class that extends L.GeoJSON: L.MyLayer = L.GeoJSON.extend ({ initialize: function () { this.markers = []; ... I redefined the pointToLayer method to create ...
1
vote
2answers
28 views

Embed Sound in Leaflet Popup with QGIS

I was wanting to embed some animal sounds in a leaflet map my son and I are creating. Have images embedded, but would like sounds in the popup if possible. Like embedding images, can this be done ...
0
votes
0answers
20 views

how to remove duplicate values geojson on feature.properties.name?, using leaflet oneachfeature

I have duplicate value into select combobox, using oneachfeature and geojson the values are into combobox select, I'm trying to remove duplicate caracteristiscas the GeoJSON to populate within a ...
0
votes
0answers
51 views

Leaflet tile rendering

I've startet tinkering with the Leaflet JS library in order to display a Web Map Tile Service (WMTS). By default Leaflet does not support the WMTS standard. An initial investigation has revealed that ...
0
votes
3answers
33 views

Make polygon from area not covered by loaded polygons (like invert selection)

See screenshot, from geojson.io, with a geojson file loaded: So how do we make a polygon out of the blank area? Looking for a way which doesn't involve manually copying selected sequences of ...
0
votes
0answers
43 views

XY bounds for L.tileLayer in CRS.Simple

Sorry for my english Hi, I have leaflet.js (image of map 5913x7863) and there L.CRS.Simple I had var imageBounds = [[1468.9700,-11.7050], [1968.2705,363.7705]]; var file0 = new ...
0
votes
0answers
24 views

Tilestache not giving me individual tiles

I'm using Tilestache to serve some tiles outputted from Tilemil: my cfg file looks this: "layers": { "main": { "provider": { "name": "mbtiles", "tileset": ".../DCMetro.mbtiles" ...
1
vote
0answers
33 views

How to 'filter' a district by clicking on it in Leaflet?

I have created a basic layer of districts on a background google streetmap on QGIS. Using the qgis2leaflet plug in, I'm able to render a webpage of the same. I want the web product to be such that ...