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

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

Is it possible to put a raster layer on a shifted Chinese basemap using leaflet API?

Recently, we want to develop an application with leafleat and gaode basemap because some features of these products fullfill our basic needs. We want to overlay some raster layers caculated by spatial ...
0
votes
0answers
7 views

Leaflet map - custom markers from CSV and referring to CSV / GeoJSON marker properties?

I run a non-profit online resource called the Megalithic Portal and have created a Leaflet map that uses Leaflet.geoCSV to load in points from a CSV file github.com/joker-x/Leaflet.geoCSV To see ...
2
votes
1answer
176 views

find inner bounds of a polygon in leaflet

How can I find the inner bounds of a polygon in leaflet? I a want to plot points randomly in polygoon but when I say Layer.getBounds() I get the bounds and I can still plot the markers ...
2
votes
1answer
172 views

Is it possible to use two layer.bindPopup functions in Leaflet

I have two different layers in a leaflet map. I have one layer in which I would like the popup to return some text from the layer's attributes. They other layer I would like the popup to return an ...
0
votes
1answer
9 views

How to open a popup on Marker click when Markers are in array using leaflet maps

Hey guys I have a set of Markers that are getting created dynamically on a .each loops like so. $.each(data, function(index, element) { markerArr[element.id] = ...
0
votes
1answer
194 views

How to export to all points within Leaflet polygon?

I dont have any idea If it is possible to export all points within a draw polygon. (http://leaflet.github.io/Leaflet.draw/). Thanks in advance.
0
votes
1answer
165 views

Adding comments using leaflet draw

I am working on an application that will leverage the leaflet draw plugin so that a user can open my map and drop comments in the form of markers. Then the user can click submit and it will serve me ...
0
votes
0answers
39 views

Adding a layer switcher using cartodb.js

I am trying to add the layer control (L.control.layers) to an application using cartodb.js (v. 3.14). The last line in the following code L.control.layers(basemaps).addTo(map); breaks the entire ...
1
vote
1answer
125 views

How can I project geojson borders on the google earth tiles in leaflet?

I started working with leaflet and google earth tiles. I want to add borders on my map so I tried to use the countries geoJson Data as a layer on the map. The problem is that the json borders ...
1
vote
1answer
2k views

Leaflet export to jpg

Does anybody know if there is a way to export the current view of a Leaflet map to jpg? The setup is as follows: Leaflet is hooked up to an Oracle database. Depending on user interaction, various ...
2
votes
1answer
165 views

Most efficient way to use UTM in leaflet

Our server is using UTM internally. We then send a large number of UTM Coordinates to display them in a custom made leaflet layer. First we transform (unproject) them into "normal" geographical ...
0
votes
0answers
39 views

Leaflet custom div & click propagation on other elements

I've gotten custom HTML applied successfully within my #map element (where Leaflet is appended) but I'm having unusual behavior with other Leaflet objects that find themselves within the transparent ...
0
votes
1answer
184 views

Leaflet Marker Cluster not appearing

I would like for my points to cluster using L.markerClusterGroup. I am receiving a 200 status; but nothing appears on my map. I have commented out my markers which appear when uncommented. ...
1
vote
1answer
126 views

Leaflet SVG layer is obscuring the underlying GeoJSON interactivity

I have SVG on top of GeoJSON in my map. How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane while keeping GeoJSON in-place within the leaflet-overlay-pane? (For example, how ...
1
vote
2answers
2k views

Loop over features of a GeoJSON object from CartoDB

I have just little knowledge about HTML and JavaScript. Nevertheless I was playing, copying and pasting around with Leaflet and CartoDB. I want to display the features GeoJson in a table. This is ...
1
vote
1answer
33 views

Custom HTML Within Leaflet Map

We're upgrading our Leaflet maps to be larger on the screen and doing so in part by putting information panels, etc. over the map with varying transparencies. Obviously this is easy to do by ...
2
votes
1answer
421 views

Leaflet setView with non lat/long CRS

Is it possible to use setView when using an alternative CRS? var map = L.map('map',{crs: L.CRS.EPSG26915}).setView([4970081,477018], 13); // Returns: Uncaught TypeError: Cannot call method ...
0
votes
1answer
57 views

Is there a Leaflet for Dummies or Leaflet 101

I am very interested in learning leaflet, but I am not a programer nor a cartographer. Is there any LEAFLET for DUMMIES course that I can take?
1
vote
2answers
437 views

Polygon intersection with bounding box with polygon's holes intact

I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary. I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
-1
votes
0answers
17 views

Tell leaflet.js to reload tile which is not loaded [closed]

How can I setup to leaflet.js to reload tile which is not loaded. thanks
0
votes
1answer
29 views

removeFrom(map) doesn't work

omnivore.wkt.parse("${feature}").removeFrom(map); I select features by this line omnivore.wkt.parse("${feature}").addTo(map); but when I remove from map doesn't work this code works but if I ...
7
votes
1answer
1k views

Generating Interactive Tiles using Nodejs, Mapnik, and PostGIS for Leaflet

I am looking to do something like this but where I have all the data on the same server. I've been following through the set of tutorials @ sparkgeo.com/labs/big/ and I'm having some difficulty. ...
2
votes
2answers
282 views

How do you get the nodes of an area in Overpass API in the “right” order?

I use the Overpass API to get the boundary of an OSM relation. I then use the result to display the boundary on a leaflet map. My problem is however, that the nodes are not in the "right order". ...
0
votes
1answer
37 views

What are the low cost options for converting FLEX API based web mapping applications to any other platform?

As flex is reaching the end of its life, I have one project to convert Flex based web mapping application to any other possible solution with minimum development effort and secure way. I believe Dojo ...
6
votes
4answers
500 views

How to use Leaflet to efficiently show parts of a massive dataset?

I keep seeing non-GIS web developers running into this problem, and I'm not sure what the solution is. There is some dataset of thousands of items. We want to show a map to the user, with the ...
1
vote
2answers
52 views

How do I embed the a Leaflet map into my web page, using QGIS2Leaf?

I am generally new to web developement, and web gis for that matter, but I want to embed a leaflet map that I made in QGIS using the QGIS2leaf pluggin, into the html of my webpage, but am having ...
1
vote
1answer
282 views

leaflet-omnivore style function

Please pardon my ignorance in advance, but is it possible to style a layer(polygon) using the plugin leaflet-omnivore? All of the examples I've encountered are using the MapBox API I have the layer ...
0
votes
0answers
34 views

Leaflet application with geojson IE9 error

Help.. My applications doesn't work in IE10 or IE9. It's fine in IE11, FF, Chrome, Safari etc. The error must be in the geojson featurelayer function, since removing it (row102-151) fixes the ...
0
votes
0answers
32 views

Leaflet Draw on Mobile - creating a marker

So I made a simple leaflet map that has the Leaflet Draw plugin. I am only allowing users to add a marker. Leaflet is supposed to be mobile friendly, but when I open my website in a smartphone ...
0
votes
1answer
27 views

Leaflet.js map - Pan too and Zoom in on point

This is the first time I am using Leaflet.js. I am trying to create a story map but have come across an issue. Currently I have a map with a scrolling text bar on the left hand side. I would like ...
1
vote
0answers
36 views

Loading lots of points on leaflet through time slider.

I'm trying to add more than 13 thousand point using Time Slider plugin, but as you can imagine the loading process of all these points puts a heavy burden on the map. Even the slider start to get ...
0
votes
1answer
34 views

How to protect the loaded json file name and location using html5 and javascript?

The data of markers (not the map) is stored in a json/csv/js file. We want to show all data as markers on the map. But how to protect the raw data file from public access? Following the example on ...
2
votes
1answer
24 views

Making info panel clickable in Leaflet?

How do we make it possible to click, drag, copy text that appears in Info panel in leaflet.js? In a leaflet application similar to the choropleth example, I'm populating the info panel on click ...
6
votes
2answers
1k views

Tilemill Dynamic Tile Generation

I have recently used Tilemill and I wish to implement it for dynamic tile rendering.As I've seen an CartoDB doing in cloud system,they can query & generate dynamic tile for request with UTFGrid. ...
2
votes
1answer
452 views

How to get the total km of route using Leaflet Routing Machine API?

I'm using machine leaflet route to draw routes I can get the total route miles? How can I do this? I know the class IRouteSummary, but I am unable to access it. Just wanted an example so that I can ...
2
votes
1answer
318 views

JSONP working with Leaflet time slider

I would like to integrate the time slider into a JSONP geoserver. Here is the current code I have http://jsfiddle.net/qcwcrwge/26/ and I would like to use the time slider with a layer called ...
1
vote
1answer
161 views

Does the experimental QGIS2leaf plugin not work on mac OS?

I am trying to get the experimental QGIS2leaf (Leaflet web maps) plugin to work on my macbook air (2012, Mavericks OS), but when I open the outputted index.html file, no interactive image shows up in ...
2
votes
1answer
443 views

How to get data from TileMill tileLayer properties in Mapbox for click/hover

I've successfully used Leaflet to load a geoJSON polygon-shapefile with data, and added click and hover interactivity to the layer. For a large dataset, I switched to mapbox.js 1.6.1, used TileMill to ...
0
votes
0answers
69 views

Bootstrap navbar and leaflet zoom controls

I'm using the THE MAP GUY(DE) Bootstrap temple and applying it to leaflet using the code below. The issue I'm having is that the zoom-control doesn't toggle right on page load. It will only after ...
0
votes
1answer
13 views

extend extent of geoJSON layer - Leaflet

I am zooming to the extent of a set of geoJSONs collected in a FeatureGroup with this call: map.fitBounds(myFeatureGroup.getBounds()); ...I would like to extend the extent a bit; as it is the ...
1
vote
0answers
41 views

Leaflet Maps Sync Problem

I am trying to sync 3 maps (BaseMapd, overlayMap, tiledMap) side by side however these maps don't sync together immediately but it works sometimes during different multiple browsers (Chrome, Firefox ...
1
vote
1answer
40 views

Using marker.cluster plugin with the ajax plugin of Leaflet?

I want to use both the marker cluster plugin and the ajax plugin together, but I cannot seem to make it work. My geoJSON data are point geometries. I was able to successfully use the ajax plugin of ...
1
vote
1answer
41 views

Load external geojson file into leaflet map

Have studies this thread but not getting desired result. My index.html looks like this: <!DOCTYPE html> <html> <head> <meta charset=utf-8 /> <title>GeoJSON ...
1
vote
1answer
278 views

Formating geojson file with leaflet ajax-plugin

First of all I apologize for my basic english. I have to say, too, that I'm really a newby in coding. I'm trying to create an interactive map using leaflet (you can see it here). I was able to show my ...
1
vote
1answer
155 views

Leaflet and census block data: not displaying

I am new to leaflet and am trying to load a geojson file showing census blocks and associated information for a city in CA. It is a small city and not too many census blocks. I cannot get the popup ...
0
votes
0answers
21 views

How to handle Point Data with date ranges

I am running into an issue with the time sliders in Leaflet. It appears that most all of the sliders developed for Leaflet operate on the assumption that each record in your data layer has a specific ...
1
vote
1answer
37 views

how to draw a polygon in leaflet and add it to geojson file

I am working on a small project with leaflet. the goal of the project is to show a geojson file and updating it dynamicaly from the window of the web site. I have imported the geojson file to the map. ...
0
votes
0answers
51 views

Getting pixel coordinates of an image overlay using leaflet map library on click (right click)

I'm trying to get the pixel coordinates of an image overlay on click (right click/contextmenu) using the leaflet map library. Essentially when a user clicks on the image, I need to find the x,y or ...
1
vote
2answers
2k views

How I can load tileLayer in Leaflet framework using local tiles?

I'm using file:///C:/path/tiles/{z}/{x}/{y}.png like url of tileLayer but it doesn't work and no error is shown. var layer = new L.tileLayer("file:///C:/OSM/tiles/{z}/{x}/{y}.png", { minZoom: ...
1
vote
1answer
748 views

How do I add elevation data to a GeoJSON line from a GPX file?

I understand that elevation can be added as an optional third value in Coordinates (lat, long, elev) in a geojson file, but I can't find a way to actually do that from a gpx file. I've used ogr2ogr to ...