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

learn more… | top users | synonyms (1)

0
votes
1answer
16 views

Retrieve polygon attribute when positionning a point - openlayers / leaflet

Using a client-side webmapping library (openlayers3 or leaflet), I want my user to be able to add one marker on the map. I will then be able to retrieve long/lat coordinates. From that, I want to ...
0
votes
0answers
7 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
1answer
25 views

Does Leaflet layer 'add' event not fire properly?

A popup won't open until the data file has loaded and the layer is added to the map - that's pretty obvious. I figured it would help to bind it to the 'add' event - but that never fires: var l1 = ...
3
votes
2answers
1k views

How do I project my WMS tilelayer in leaflet if I want it to display as an overlay on my basemap if they have different EPSG?

So my basemap is a world Mercator projection and in wfs format and I'm trying to put a WMS overlay in a different projection over it? Leaflet's API didn't give me much info on changing the epsg so is ...
1
vote
1answer
38 views

Is there any method to retrieve SQL queries into a GeoJSON file using JSP?

I want to display the contents of my PostGIS database of various shape-files in leaflet pop-up dynamically. I know there are static methods available that retrieves attributes. But I need to by ...
1
vote
1answer
320 views

How to add multiple cartodb layers in viz.json to a leaflet layer control

I have create a visualisation in cartodb with 4 layers. The resulting viz.json is added to a leaflet map as follows: cartodb.createLayer(cartomap, [url], {https:true}) ...
0
votes
1answer
21 views

Multiple GeoJSON Layers

I have a leaflet map of the US and I would like to toggle between zip codes and county shapes. There seems to be no tutorials on how to achieve this in the documentation or an other forums I'lve look ...
0
votes
1answer
17 views

Trying to bind pop-up in leaflet via GeoServer GetFeatureInfo. Is there anything wrong in my code?

Simple Leaflet Map <script src="js/leaflet.js"> </script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> ...
0
votes
2answers
28 views

Disable feature popup when creating new simple marker

I have a leaflet map with some loaded polygon layers. When using the Simple Markers plugin, i would like to create a new marker on top of an already existing polygon feature, but i can only click the ...
1
vote
2answers
352 views

Adding multiple layers with timed delay in Mapbox/Leaflet

So I've got a Mapbox map showing data split into several layers. I'd like the user to be able to click a play button to call the function "gogogo", and then the layers get added one at a time every 1 ...
0
votes
1answer
17 views

use a global geoJson layer in leaflet

i´m using getJSON to draw points in leaflet, this is the code: function cargarpapes(movibles){ $.getJSON("papeleras1.php", function(data) { papesjson = L.geoJson(data, { ...
0
votes
0answers
19 views

Use leaflets to display svg floor plans

How can we use the svg image as map? I have the floor plan of svg format and i need to track the location of employees. How does leaflet allow to integrate the coordinates of map and the lat lng? Can ...
7
votes
4answers
3k views

How do I stop event propagation with rightclick on Leaflet marker?

I didn't find a rightclick event in Leaflet markers so I started listening to the mousedown event. In the method that resolves this event I check if (event.originalEvent.button == 2) { ...
0
votes
1answer
32 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 ...
0
votes
1answer
42 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 ...
1
vote
1answer
126 views

Leaflet Draw - Get Circle extent

I am using Leaflet.Draw to draw a circle. var circle = L.circle(new L.LatLng(latitude, longitude), number, circle_options).addTo(featureGroup); I need the coordinates of the circle as a polygon ...
0
votes
1answer
51 views

How to bring my PostGIS map from GeoServer to Leaflet based web application?

I have created a group of shape-files using QGIS and I have stored their corresponding information in PostGIS database by importing the shape-file into pgAdmin3 using shape-file and DBF loader. Then I ...
3
votes
2answers
389 views

leaflet geojson contextmenu

I want to add a context menu on right click for various elements on my geojson layer (I'm doing a road map so on a right click on the road at any part I want to show the context menu). I've managed ...
1
vote
1answer
78 views

How to add GeoJSON layer with GraphHopper?

I have a GeoJSON file containing some POI that I would like to be able to display within a separate layer with GraphHopper. But after several tries and search over internet, i can't manage to get a ...
0
votes
0answers
39 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
1answer
403 views

Leaflet geoserver wms doesn't show on google map base layer

I have a site running Openlayers (base layer google and overlay wms in epsg4326 from geoserver). The site works fine. I've decided to try doing the same with leaflet , and from some reason I can't ...
0
votes
0answers
26 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
24 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
184 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
175 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
19 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
210 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
175 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
51 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
133 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
172 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
56 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
188 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
128 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
40 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
427 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
62 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
438 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 ...
0
votes
1answer
33 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. ...
3
votes
2answers
304 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
39 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
509 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
62 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
300 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
1answer
30 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
43 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
36 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 ...