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

learn more… | top users | synonyms (1)

2
votes
2answers
171 views

Simplify GeoJSON by retaining external boundaries (clustering)

I created a website (http://www.cartescolaire.paris) that basically loads a GeoJSON and displays it on a map using Leaflet. This geoJSON is pretty large (over 2 Mb), the loading time can be very long ...
0
votes
0answers
10 views

Debugging Uncaught SyntaxError: Unexpected token : from WFS in Ajax request?

I am trying to insert a WFS layer into a Leaflet map; therefore I need to enable jsonp and want the output in json/geojson so Leaflet can consume it. However, I keep getting an error that I suspect is ...
0
votes
0answers
15 views

Animated GEOJSON path invisible in Leaflet

i have been trying to animate a path over a leaflet map using the following example from Mike Bostock: http://bl.ocks.org/zross/6a31f4ef9e778d94c204 After i make my own json and put it into code, i ...
0
votes
1answer
8 views

how do I map from a mapbox map or tile to the lat lon extents of the map?

A web app I use displays map tiles from mapbox and then uses leaflet to overlay that map with an svg path representing a route. The problem is that the area given to the map is very tiny, it's short ...
1
vote
0answers
15 views

Leaflet map with 'query of features' on mouseover and multiple layers

I have produced two working Leaflet maps that in total contain the features that I need for my application. However, I cannot solve how to have multiple 'overlay' layers that can be queried with ...
0
votes
1answer
568 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 ...
2
votes
1answer
270 views

Draw heatmap only over water layer using Leaflet?

I need to draw a heatmap, but only over water because I want to represent water heat level. I am using Leaflet. How can I do it? I found an only-water layer, maybe it would be usefult for developing ...
1
vote
1answer
41 views

How to load html file with leaflet map using PyQGIS

I have simple .html file with leaflet map layers. I want to load these layers in QGIS mapCanvas with ability to choose one of the layers. How can I load this .html and show one of map layer with using ...
1
vote
1answer
203 views

CartoDB JSONP callback in leaflet-search plugin

long time reader, first time question-asker etc... So I'm trying to implement a search function on an app I'm building using data from cartodb in leaflet and this leaflet-search plugin: http://labs....
1
vote
1answer
534 views

Leaflet update getcenter coordinates

I am bringing in leaflet routing control into my map and I would like to have the route icons show up in the center of the current view. using the code below I can get the icons to show up at the ...
4
votes
2answers
4k views

How do I set the fillcolor of polygons in Leaflet.js dynamically?

I'm using the interactive chloropath example for leaflet.js I figured out how to make each of my polygons add a running tally of values to the bottom of the page after each polygon is clicked. Upon ...
1
vote
0answers
49 views

Can MapboxGL use nearest neighbour interpolation for overlay image? [closed]

In HTML+CSS version of mapbox/leaflet I can set image-rendering option for .leaflet-image-layer with CSS to choose interpolation method. How can I make this in GL renderer? UPD Solved You can set ...
2
votes
2answers
17 views

Can't continue scrolling on mobile devices when a map occupy all the screen

We have an issue on mobile which is the user can't keep scrolling if the there is a map on the page and it occupies the whole screen. Here is the code: // center of the map var center = [-33.8650, ...
1
vote
2answers
33 views

Issue in loading external geojson file into leaflet map?

I want to load an external geojson file into leaflet map. I created a global variable (i.e. tracts) for json file and referenced this variable in the script file. But i receive an error message that ...
0
votes
1answer
24 views

Display Popup from postgis db over WMS layer file using leaflets?

i want to display popup information over WMS service file that i published from geoserver and using it Leaflets. Below is the picture for illustration. Now i just want when user click any polygon ...
2
votes
2answers
32 views

Leaflet filled contour map

I have evaluated the Getis-Ord Gi*-spatial statistic for each point in my map. Like this, each point is assigned a Gi-score and due to this a certain color, as you can see in the image below. What I ...
0
votes
1answer
22 views

OSMBuildings building:levels are not working

I am integrating Leaflet with OSMBuildings and i am using Classic 2.5D. Everything is working and it is showing 3D building on 2D Map, But The Building levels are not working (I am gone through this ...
0
votes
1answer
18 views

Non-Earth maps, tile server and scale in leafletjs?

I am looking at putting together a tile server for other astral bodies, such as Mars and the moon. At the moment I am using leafletjs and the Control.Scale at the client end (though could be any ...
0
votes
1answer
126 views

Accessing GeoServer 2.8.0 on Debian 8 using Tomcat 8?

Not been able to access my Geoserver with Javascript. The Leaflet code running natively works in other javascript/HTML pages which connect on-line GIS servers. Added ENABLE_JSONP true to web.xml ...
2
votes
1answer
231 views

Showing link for every city at different zoom levels using Leaflet?

I have a Leaflet map that I am using to render a map of the U.S. The map will have specific zoom levels. For example, when the map first loads it will show major U.S. cities. Then if you zoom in it ...
0
votes
3answers
283 views

Geocode free APi for internal application [closed]

I need opinions / experienced use on this issue: Which API can be used to geocode an internal application of a company that meets these requirements: Can be used for company internal application ...
3
votes
1answer
500 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
20 views

Leaflet Tiling with epsg4326?

i'm using leaflet to render a map on my site. The problem is, i use mongoDB to perform some geospatial queries serverside, which use as standard the infamous epsg4326. It appears that on leaflet ...
1
vote
2answers
35 views

Leaflet, changing base map CRS

So i am using leaflet in order to create my project, which is a world map that certain layers would be add on top of it. I am wondering whether I should change the CRS property of the map object, ...
3
votes
1answer
68 views

Rotate geojson feature with Leaflet

I have a GeoJson feature that is rendered with leaflet and proj4(ESPG:31467). Now I want to rotate that feature so that it NW corner points to NE, e.g. 90 deg rotation. Is there a way to do this? Or ...
1
vote
1answer
5 views

How to specify (cross-browser) mouse pointer sets on leaflet control?

Leaflet custom controls might be interactive, when the user can use the mouse on them to perform an action, or non-interactive, when they are used only to show information. This should affect the ...
1
vote
1answer
22 views

Where to get world-wide detailed administrative boundaries?

I'm looking to build a world map that plots all application users and their locations around the world. The initial zoomed out world view would show total numbers clustered by country, then when you ...
3
votes
3answers
77 views

Leaflet - tell whether an object a layer or a group

I need to close popups on an object, but I don't know whether it is a layer or a geoJSON (and hence a feature group). If the former, I can do layer.closePopup(), but if the latter, I have to do layer....
1
vote
1answer
1k 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 ...
1
vote
1answer
193 views

Leaflet + GeoServer + British National Grid

I have followed along some examples and was able to display BNG 27700 data nicely on the map, however now I want to perform getFeatureInfo function on click. Again the code I used is as below: var ...
-1
votes
0answers
26 views

How to add two buttons on waypoint to run the code

I'm developing a mobile app and I would like to add one button in each waypoint to be able to run the code. var geocoder = L.Control.Geocoder.nominatim() L.Routing.control({ geocoder: geocoder, ...
3
votes
0answers
26 views

CartoDB.js/Leaflet map - how can I click between multipolygons cleanly?

Here's my map: https://jsfiddle.net/Sidders/4exf969e/3/ I want to apply a click and hover effect to the polygons. So a polygon/multipolygon highlights on hover, and is selected with one click. The ...
1
vote
1answer
298 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 ...
4
votes
2answers
179 views

How to make both hover and click popup work?

I am pretty new to all of this. I want to have a hover/mouseover AND click popup work on my geojson layer. Here is the code so far, but I don't know where to include the hover without messing up the ...
-1
votes
0answers
29 views

Leaflet & Cesium integration for 2D & 3D view [closed]

I'm not a developer, but please allow me a question. I try to create an interactive map (non-profit) in Leaflet with old town plans (WMS) and add a layer for historical photos (Geotagged Photo Leaflet-...
-3
votes
0answers
15 views

display buffer turf only when i click on a layer [closed]

I want to display turf buffer only when I click on a layer var pt = { type: 'Feature', geometry: { type: 'Point', coordinates: [lat, lng] }, properties: {} }; var unit = 'miles' var ...
-1
votes
0answers
11 views

Leaflet layer on ol3 map [closed]

I am using normally ol3. But I had to put leaflet layer on ol3 map Is there any way to overlay leaflet layer on ol3 map? Regards.
1
vote
1answer
38 views

How to start L.Control.Geocoder.nominatim() with user's current location

I'm trying to develop a routing system and I want to know how can start with the user's current location from A point? var control = L.Routing.control({ // waypoints: [null], waypoints: [ ...
0
votes
0answers
22 views

How to add mutiple photos from flickr API on the popup of leaflet.js markers

I want to make a slider of photos on the popup of the markers by taking 5 photos for each location.I have a JSON of few locations of a city.The json has the name, latitude and longitude of the ...
2
votes
1answer
304 views

Load Leaflet map in canvas element

I am working with leaflet tiles loading tiles to a map div http://jsfiddle.net/tBCd5/ I am now playing with some html5 canvas distortions like below http://jsfiddle.net/UF4PK/ It would be cool to ...
3
votes
1answer
44 views

How do I set the width and height of a popup using QGIS2Web and Leaflet

I am a newbie to editing javascript. I want to set the Max width and height of the popup that QGIS2Web generates with a Leaflet map (I have quite a lot of text in the attributes and will need a ...
1
vote
2answers
70 views

Set view does not work after Fitbounds

I have a map and a layergroup. var map = L.map('map').setView([27.6758,85.3313], 12); L.tileLayer('http://{s}.tile.cloudmade.com/8ae544230be74379927e6dee5d416398/997/256/{z}/{x}/{y}.png', {}).addTo(...
1
vote
2answers
279 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 ...
1
vote
1answer
20 views

Access Stamen tiles via https

To get rid of "Mixed content" warnings I'm trying to access stamen map tiles via https. For http the used url is: http://{s}.sm.mapstack.stamen.com/(toner-lite,$fff[difference],$fff[@23],$fff[hsl-...
0
votes
1answer
344 views

map.on('click') event disables the double click zoom

I have a map that has an onclick event fired and displays a marker where the user has clicked. Problem is that this event seems to overrun the double click event. Because of this, when I double click ...
0
votes
1answer
17 views

Leaflet - MultiPolyline constructor and arrays in JSON

I am struggling with the AntPath Plugin ( link to GitHub ) for Leaflet and the documentation is limited and difficult to read. This setup works well(se code-snippet in the end), but instead I want to ...
0
votes
2answers
53 views

Thematic charts on leaflet

In GIS charts are a part of good visualisation , I wonder if I can show a bar chart for example of my ON , OFF passangers in some Bus line here my plunker example my example each stop nodes point has ...
0
votes
1answer
211 views

Leaflet GeoJSON style function feature only colors one GeoJSON feature

I need to style every feature differently that I pull from a GeoJSON file. However this anonymous style function only changes the style on the first feature it comes across and stops. I am new to ...
1
vote
1answer
19 views

Leaflet: Style function does not work for point layer

I'm new to Leaflet and I'm not very proficient in Javascript. I've been trying to create a map visualizing a point layer with custom markers but for some reason the marker style as a function just ...
1
vote
1answer
502 views

Add an event listener on a Marker in Leaflet

I am using leaflet in order to render a map. I created a map with markers and i dont know how to implement the Event Listener 'onClick' on each Marker. My code var stops = JSON.parse(json); var map ...