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

learn more… | top users | synonyms (1)

2
votes
1answer
446 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
91 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
16 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
42 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
42 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
42 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
279 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
23 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
40 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
54 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
750 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 ...
3
votes
1answer
5k views

How do I get GeoJSON data from GeoServer into show up on my Leaflet map?

I'm trying to create a simple "Green" map for my city. The idea being that it is a website with a map and layers you can turn on and off. I am serving the data through GeoServer and am using GeoJOSN ...
6
votes
1answer
207 views

Moving a shape around the earth while maintaining the proper projection

What is the transformation needed to be taken on every data point of a shape to rotate that shape around the globe. I'm trying to figure out the math behind this kind of transformation so I can ...
1
vote
1answer
159 views

Can't project ArcGIS Tiled Service for Esri-Leaflet

I'm following this example from the esri-leaflet docs. I have an ArcGIS Tiled MapService in ESRI:102696. So I'm trying to use Proj4Leaflet to project the service and use it in my application. I ...
0
votes
1answer
168 views

CartoDB.js SQL API editing geometry

Is there anyway you can allow users to edit the geometry of shapes (e.g. move an existing point) using the CartoDB.js or CartDB SQL API libraries. I realise you can do this directly in the CartoDB ...
1
vote
2answers
187 views

Load or display differents geojson data on zoom level for leaflet maps

I have a map with 3 levels of information. The first is the country, the second the state and the last one the cities. I wonder know if it's possible to use the zoom value in order to display the ...
1
vote
1answer
42 views

Submit a form from within a leaflet popup?

I want to submit a form from within a leaflet popup simply using javascript and geojson. I am essentially collecting attribute information in the form and then I want to process the information into ...
1
vote
2answers
74 views

Leafletjs : combine location data in geoJSON/KML/GPX with other information in CSV through key field

I've been able to load CSV having lat-long co-ordinates into leaflet using this useful solution. Looking for ways to cross-link co-ordinates from a different source and data from another. Describing ...
7
votes
3answers
3k views

Leaflet / Google Map baselayer / markers not visible

New to Leaflet, currently trying to migrate a project from native Google Maps to Leaflet; having been drawn to Leaflet by the layer management and options of using better 'roadmap' style basemaps. ...
0
votes
0answers
29 views

Leaflet-image draw legend

I'm using the mapbox leaflet-image plugin to allow users to save images of an app I'm making for a client. It works great with this setup: Callback function on click event... leafletImage(map, ...
0
votes
2answers
193 views

Displaying click results in a side panel

I am trying to do something similar to the interactive choropleth map (http://leafletjs.com/examples/choropleth.html) on leaflet's website. In my case I want to use a click instead of a hover and ...
0
votes
0answers
17 views

Can I use tileJson with esri's ArcGISTiledMapServiceLayer, maybe with wax esri connector?

I am using the arcgis javascript api to implement my map. I want to enable mouseover event on the images returned from the tiled service. I was thinking that tileJson could help. I have seen that wax ...
0
votes
0answers
43 views

Java error using iframes in IE11: The viewing session is not available or has expired

In IE11 I get an error message (see below) when calling a tomcat7 webapp (BIRT runtime viewer report) from a leafletjs popup inside an iframe. First of all everything works fine in firefox/chrome, ...
0
votes
1answer
54 views

Can I use esri-leaflet together with arcgis api?

I am not sure I have understood the co-existence of arcgis javascript api with the esri-leaflet library. Can I use leaflet together with the javascript api. For example can I have my map built with ...
0
votes
1answer
41 views

Displaying KML data with a user selection

I want to web map some historical cyclones data which are now in KML files, file/year. So I want the user to select a year from a button and the KML files will be displayed on interactive map). I ...
1
vote
1answer
315 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
2answers
643 views

Using proj4js and Leaflet to transform coordinates?

I'm trying to use proj4js with Leaflet to convert a mouse click event from WGS84 coordinates into British National Grid but when I do this I get NaN for the converted coordinates. Here's the code: ...
1
vote
0answers
31 views

Any Examples of D3.brush() used with Leaflet?

I have a leaflet map that I have placed an SVG "on top of" using the leaflet overlay pane. I want to add a D3 brush to the overlay pane that will then update a separate chart. I've looked around for ...
1
vote
2answers
92 views

Is there any library can perform polygons buffering/ inflating/ merge/ overlap at server side?

I have a set of polygon data express in lat long. I would like to perform some tasks (polygon buffering, inflating etc etc ..) in server side and output the result to client side (client is a web ...
0
votes
2answers
27 views

Collapse leaflet control

I want to collapse a leaflet control on my map. I have the current code: var legend = L.control({position: 'bottomright', collapsed:true}); legend.onAdd = function (map) { var div = ...
0
votes
0answers
29 views

Javascript - Problems getting GeoJSON from Geoserver

I already read other posts regarding this topic. However, I cannot make it run. This is what I have: var geoJsonUrl = ...
2
votes
3answers
56 views

GeoJSON Rendering in Leaflet

I have published a wms using the QGIS Cloud and on top of it I am overlaying the same data (countries of Europe), using GeoJSON. Have a look at an example here: http://jsfiddle.net/j21kh7ao/ At a low ...
5
votes
3answers
14k views

How to draw a polyline in Leaflet?

This is my coding I used in Leaflet: var pointA = new L.LatLng(28.635308, 77.22496); var pointB = new L.LatLng(28.984461, 77.70641); var pointList = [pointA, pointB]; var ...
0
votes
0answers
34 views

Any other FuseSearch.js examples in Leaflet?

Have been researching about using FuseSearch and using this example. The only difference is that am using polygons.Its working well but not highlighting polygons on results click. Has anyone done a ...
1
vote
0answers
16 views

Leaflet fill patterns

I am using the leaflet.pattern library at https://github.com/teastman/Leaflet.pattern and I want to change the color of my stripes based on a value in the feature just like I do in the following ...
0
votes
1answer
59 views

Querying GeoJSON polygons from Django models in Leaflet?

Am developing an application in GeoDjango and using Leaflet to show my data.I have loaded my data successfully into the map and added a sidebar where I have my textboxes to input values and a search ...
0
votes
1answer
49 views

Use Mapbox featureLayer to create Marker Clusters

I'm trying to use this tutorial (https://www.mapbox.com/mapbox.js/example/v1.0.0/markercluster-with-mapbox-data/) to create marker clusters to style a Mapbox featureLayer containing my data. This code ...
0
votes
1answer
45 views

Batch Edit GeoJSON Markers with Mapbox.js

I cannot figure out how to style all feature points from a local GeoJson file at once using the Mapbox.js. My GeoJSON file has roughly 500 points. I could go through each point in the GeoJSON file and ...
0
votes
0answers
25 views

Leaflet: binding an event to the click of a link within a tooltip/popup

So I have polylines on my Leaflet map which I have bound to embedded YouTube links. var container = $('<div />'); container.html("<iframe width='280' height='157' ...
0
votes
1answer
78 views

Map.addLayer() is not working

I am creating an app with leaflet that shows a route on a map based on the button clicked. For example when you click on "button1", the associated route is successfully displayed on the map (i.e. ...
1
vote
1answer
3k views

Go to the URL when clicked on Leaflet marker

I want to implement marker click event so when user click on marker it goes to url. Url is written inside an array (a[3]). However, this is my code which doesn't work, it always goes to the link of ...
0
votes
1answer
15 views

Geojson mapevent second mouse click

I am trying to add a geojson layer with interactive functionality to my leaflet map. I am mostly using this (dated)blog: ...
0
votes
1answer
41 views

How to add hyperlink in geojson popup in Leaflet?

I am trying to add a geojson layer with interactive functionality to my leaflet map. I am mostly using this (dated)blog: ...
0
votes
0answers
37 views

How to make the value showing on a leaflet heatmap like this one?

I'm attempting to use leaftlet.js, and heatmap.js (github.com/pa7/heatmap.js/) following this example: www.patrick-wied.at/static/heatmapjs/example-heatmap-leaflet.html But I want to show the value ...
5
votes
3answers
1k views

Create buffer around point in LeafletJS?

I am using LeafletJS. I want to create buffer around point. after Selecting a point buffer radius will be specifed by user in feet. After searching of awhile I found this link of JSTS. does JSTS ...
0
votes
1answer
45 views

Use turf.count with turf.buffer dynamically

I have this code where I'm trying to create a buffer dynamically from a draggable marker and then count how many points fall insed this buffer. As of now I can drag the buffer around without any ...
0
votes
1answer
25 views

How to update data in Leaflet Control?

I have a Leaflet map with a control to switch between various basemaps or toggle on/off some overlay data. //Basemaps are all a-okay //Start with no polylines in my overlayData items = []; ...
1
vote
1answer
53 views

How to use a different projection than EPSG:3857 with CartoDB or Leaflet?

I have data that is accurately positioned with the NAD 83 MTQ Lambert EPSG:3798 projection. If I reproject this data in EPSG:3857 (web mercator) the markers are no longer positioned accurately on the ...