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

learn more… | top users | synonyms (1)

0
votes
1answer
216 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 ...
1
vote
1answer
193 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
15 views

Saving openJUMP data to be displayed in leaflet

Using OpenJUMP, I've managed to create a road map layer split at every intersection of the lines (using the noder tool). I need to take this data and display this using leaflet by using end ...
2
votes
1answer
191 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
1answer
22 views

Why are these leaflet popup values comeing back undefined?

Hi I have a leaflet map consuming a dynamic map layer on ArcGIS server. The service is viewable on the map and exposes the following attributes: Fields: OBJECTID ( type: esriFieldTypeOID , alias: ...
1
vote
1answer
16 views

How to break markers drawing which is in progress

The following leaflet codes draws a series of markers one by one. I don't want to wait until all points are drawn. How to break the drawing process before it ends and clear the screen? <!DOCTYPE ...
1
vote
0answers
19 views

No output when rendering GeoJSON using Leaflet() package in RShiny

I am creating a Rshiny interface on that can take in the user input when a user click on a point on the map, query the user's selection from postgresql and return another map layer. The package I am ...
0
votes
0answers
24 views

How to convert a geojson from Postgresql to geojson format readable in rCharts in R?

I am creating a Rshiny interface on that can take in user input and SELECT the respectively map layer from Postgresql database based on the input. The package I am using to plot the map is rCharts. ...
0
votes
1answer
20 views

Adding markers within constituency bounds using leafet.js and leaflet-pip

I'm trying to make a map where a user can select a constituency and then see a series of markers, from a much larger list, that are only within that constituency. I have the code below, and if you ...
1
vote
2answers
458 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
vote
1answer
257 views

leaflet-routing-machine add waypoints, routing summary

I'm playing around with leaflet-routing-machine (https://github.com/perliedman/leaflet-routing-machine) and have 2 questions about it's usage: 1) I have the following code now routeControl = ...
0
votes
0answers
28 views

leaflet.js plugin leaflet-easyPrint and markercluster styles

leaflet-easyPrint is a great plugin, as for the moment is the only one that plots all layers and markers I need. But I also need to visualize clustered markers, so I am using markerCluster plugin. ...
2
votes
1answer
473 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
0answers
19 views

Querying WMS feature using leaflet

I am using lealflet 0.7, I need to query the features based on attribute and spatially. Is there any plugin available to query the features directly from geoserver. I have already tried this to load ...
0
votes
1answer
23 views

How can I make a map-marker's popupContent be a random phrase?

I'm using leaflet.js to make a map and I need help with the javascript required to make a map-marker generate a random phrase with each click. I've used this code to generate random text: function ...
1
vote
2answers
52 views

Configure default styles in LeafletJS

I want to change the default styles for vector layers in my Leaflet version 0.7.3. I can't find anything about that in in the documentation, so I made this hack: map.on('layeradd', function(e){ ...
0
votes
0answers
14 views

Host LeafLet Page on Dropbox

Can anyone provide me with some information on hosting a LeafLet web map, created with the QGIS2Leaf plugin for QGIS, on Dropbox. I have used Droppages, however the webmap does not come in, it is a ...
2
votes
0answers
161 views

Leaflet - Enable/Remove popup on mousedown/mouseup?

I'd like to do as the title suggests and can get the popup to appear on mousedown with the following code, but mouseup doesn't close the popup: // Quick look at info on mouse hold ...
2
votes
2answers
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 ...
3
votes
1answer
72 views

How to create an exact tracking route from GPS data with animated icon?

Probably this is not purely GIS related question, its related to developing issues. I am just asking if there is any kind of suggestions from Gurus. I am building an tracking application where GPS ...
0
votes
1answer
45 views

How to call a leaflet Javascript Function in dropdown menu bar?

i have the following problem: my target is a hybrid app with leaflet. I create a dropdown menu with html/CSS/JQuery. Here is the code: <nav> <ul> <li id="menuPoint1"><image ...
0
votes
1answer
20 views

Pass coordinates parameters to geoserver pgrouting service from Leaflet wms tile layer

I've configurated a pgRouting service in Geoserver, following the steps on the documentation it's easy to accomplish. Reading the documentation, existing examples, etc.. I've come to undestand how ...
1
vote
2answers
1k views

How to add Geoserver WFS to Leaflet JS Application

I have a PostGIS database and have successfully consumed a table into GeoServer and published a WFS. Are there REST endpoints available for these WFS' akin to ESRI's feature services? How are ...
0
votes
1answer
53 views

How to prevent Leaflet from loading tiles from server

I am currently developing a couple of solutions with LeafletJS and it frustrates me that my Firefox browser loads the tiles from the server (e.g. Stamen or OSM) and not from cache every time I reload ...
7
votes
1answer
2k 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. ...
3
votes
0answers
53 views

Solution for Test Automation for web gis/mapping application?

I've to find a solution for test automation for web gis/mapping application that using OpenLayers 2.x or Leaflet as javascript libraries. I'm oriented on evaluate Selenium WebDriver (or other similar ...
3
votes
1answer
59 views

Leaflet JS add GeoJSON shape as a hole in a polygon

I have a dataset which already contains geojson. I can add it to my map with the following line of code. L.geoJson(data.geojson).addTo(map); And I get this But I want to achieve this, where the ...
2
votes
1answer
642 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 ...
0
votes
1answer
157 views

Creating Leaflet layer that can be toggled in layer control from CartoDB viz.json?

How do I create a leaflet layer that can be toggled in the layer control from a cartodb viz.json? I have read that the cartodb.createlayer does not create a leaflet layer. It seems you can add the ...
2
votes
1answer
481 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 ...
2
votes
1answer
403 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
168 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
1answer
54 views

Problem with Leaflet Boundary Canvas plugin

I'm trying to identify the source of a problem that I'm having, I cannot show a tile layer(created with gdal2tiles) inside a polygon generated in Leaflet, using the plug-in ...
1
vote
1answer
30 views

Display tile grid borders with leaflet (visual debugging)

I'd like to have the tile grid borders displayed on a leaflet WMS Layer in order to see which areas are requested as separate maps. On top of that it should be possible to overlay a border to the ...
0
votes
0answers
13 views

KML- plugin for Leaflet using high-DPI devices

I've recently added KML overlays using leaflet and kml plugin by Pavel Shramov. Everything works fine on my desktop computer, but from a retina display and other mobile devices with a higher ...
0
votes
1answer
20 views

How to keep selected layers on page load in Leaflet?

I have a leaflet map that reload page and map view depending on a drop-down list. I have many layers in it and I'd like to keep selected layers as selected when the page reload after clicking on an ...
0
votes
0answers
25 views

Add ArcGIS Online web map or layer on top of Google Maps?

How is it possible to draw ArcGIS Online resources (such as FeatureLayer) on top of Google Maps in a web application? I don't need any working code right now, just trying to figure out if this is ...
0
votes
1answer
27 views

How to display the attribute table of the map using leaflet

I'm developing a leaflet application. for that i want to display the attribute table of particular wms layer using leaflet. Is it possible how can we do that? Thanks in advance.
0
votes
0answers
11 views

stop leaflet.heat from redrawing on zoom

I'm working with leaflet.heat, which redraws the heat map based on the zoom level. Best I can tell, it resamples the points within the extent of the map and redraws based on the intensity of the ...
0
votes
2answers
89 views

Adding Multiple JSON Layers to Leaflet Map

I'm trying to put two different json files over a single map. One is drawn by zip code boundaries, the other is county. For some reason, I can't get my leaflet to work. IF someone can help point me to ...
6
votes
2answers
4k views

Trigger a click event on a leaflet map?

Is it possible to make a click event occur at a particular lat/lon on a leaflet map? I would like to make a popup appear that is associated with a point at a particular location. I have tried several ...
0
votes
1answer
45 views

Convert Leaflet WMS layer to Leaflet GeoJSON layer

Using the Leaflet API I am adding a WMS layer through the L.tilelayer.WMS feature. This feature includes only a certain amount of options such as 'layers','crs','style' etc. Through the Leaflet ...
0
votes
1answer
23 views

how to customise toobar in Leaflet.Draw plugin?

I Down load the Draw.js and one ccs file to get use of the Leaflet.Draw plugin now need to customise the toolbar(i.e want only polygon and marker)
0
votes
0answers
23 views

Leaflet control to display scale in native/declared CRS (i.e. degrees)

I'd like to have a Leaflet map display the scale of a layer in native coordinates (i.e. degrees in EPSG:4326). From what I have read so far the map control always handles meters; is there a way to ...
1
vote
3answers
76 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 ...
1
vote
1answer
323 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 ...
0
votes
1answer
175 views

Leaflet: how can I update content of popup by jQuery

in my popup is a spinner with class=spinner and an empty container for addon informations. I want to hide after successful ajax. I want to add some html in a container. I tried this: ~~~ ...
0
votes
3answers
65 views

How to load geojson from geoserver to define a variable in leaflet?

How can I load a geojson file from geoserver in leafletjs? There are lot of suggestions out there, but none of them work for me. Currently my app loads a js file from the server that starts like ...
1
vote
0answers
64 views

Rendering TopoJSON in Leaflet from GeoJSON PostGIS output?

I'm using the query found here SQL query to have a complete geojson feature from PostGIS to get a geojson that I can display on a leaflet map. However, the amount of data is kinda big and the ...
0
votes
1answer
41 views

L.Polygon getting distorted when panning a map

I am using Mapbox with leaflet. I have drawn a simple polygon with a hole inside that polygon. I have done this using L.polygon and passing an array of points inside it and another array in reverse ...