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

learn more… | top users | synonyms (1)

0
votes
1answer
163 views

How do I store GeoJSON format in Firebase so it can be used for Leaflet GeoJSON

I am new with Firebase, Leaflet, and GeoJSON .. I have a question, how to store data with GeoJSON format in Firebase, so it can be retrieved and used for leaflets GeoJSON to display marker(s). I know ...
0
votes
1answer
77 views

How to access secured wms server in leaflet?

I browsed regarding this question and I couldn't find any better solution.This link has some information for openlayer but not for leaflet.How to access secured wms via leaflet in java script?Do I ...
1
vote
1answer
81 views

Loading WMS layer from USGS WMS server using Leaflet?

I am trying to load wms layer using leaflet from usgs wms server but I am getting an empty image. I have gone through Problem loading WMS layer from external server in Leaflet link but it doesn't ...
1
vote
1answer
269 views

Leaflet Routing Machine: how to export route details and coordinates in JSON / GeoJSON?

I need to export / save the route details found using Leaflet Routing Machine in JSON or GeoJSON format. I've tried to use var routeArray = new Array(); routeArray = control.getWaypoints(); alert (...
0
votes
1answer
349 views

Leaflet Routing Machine: how to initialise map without waypoints loaded?

I'm starting to take my first steps using Leaflet Routing Machine. Everything works fine if I use load waypoints when I create my L.Routing.control and add it to the map. Now I'd like to start my map ...
0
votes
1answer
60 views

esri-leaflet edit multiple featureLayers

I'm trying to use the esri-leaflet example on editing (https://esri.github.io/esri-leaflet/examples/editing.html) to edit two different featureLayers. First when I add a point with leaflet draw, I ...
0
votes
0answers
44 views

Zoom animation resets to pre-animation state

I want to animate the zoom in/out behaviour of a custom Leaflet 1.0 WMS layer. It sort of works, but the animation appears to undo itself just prior to the new image being displayed. I am wondering ...
0
votes
1answer
50 views

Trouble getting leaflet-label plugin to work on geojson file

I cannot figure out how to get labels on my featureLayers to show in my LeafLet map for a mapbox featureLayer using the leaflet-label plugin. I thought all i needed to do was add .bindLabel('Look ...
0
votes
1answer
92 views

How to highlight leaflet marker cluster on mouse over?

Is there a way to highlight a leaflet marker cluster when mouse over as you can do for a simple marker? // ADD YOUR BASE TILES var baseLayer = L.tileLayer('https://dnv9my2eseobd.cloudfront.net/v3/...
1
vote
1answer
56 views

Sortable list of layers

I want to create a sortable lists of layers using jquery ui. I'm trying to use .setZindex() and .index() method. I think that index of <li> does not refresh after order changing. I'm not ...
0
votes
0answers
50 views

Leaflet - layer tree plugin

Does anyone know an appropriate plugin for leaflet as shown in the following image. I tried the leaflet-layer-tree-plugin, but the result is not what I want. Any help or suggestions?
0
votes
1answer
28 views

Add additional markers to existing featuregroup in Leaflet

It is possible to add additional markers to an existing featuregroup after it has already been added to the map?
0
votes
1answer
40 views

Change marker within leaflet map when loading data from geojson file

This section of code adds markers to my map (it works), how can I change the marker to a different icon when dealing with geojson? var cycleracks = $.getJSON('cycle-racks.geojson', function (geojson) ...
1
vote
1answer
112 views

How to create a heatmap with numbers using Leaflet map?

I wish to create a heatmap like this one at http://www.trulia.com/local/san-francisco-ca/tiles:1|points:1_crime With the number changes at different zoom level - the number can appear in a mouse-...
1
vote
1answer
27 views

Labelling Icons in Leaflet

I am using leaflet to create a set of points, but I want to view which one was plotted first, last, etc. Is there way to label them such that when the first point is plotted, it will plot a circle ...
0
votes
2answers
42 views

HTML file not loading for CartoDB.js using Leaflet

I am trying to create a web map that uses a layer hosted on CartoDB and a basemap created in Mapbox studio. Never mind adding the basemap to the L.map, I cannot get the cartoDB layer to draw at all. ...
0
votes
2answers
84 views

Leaflet: Capturing points for features inside circle

I'm using the leaflet draw tool to create a circle and then finding the points inside the circle. My data is from GeoJSON, and the code works as far as figuring out how many points are inside, but I ...
4
votes
2answers
299 views

Placing controls outside map container with Leaflet?

Can someone tell me how I can place controls outside of the map content with Leaflet? In this case, I just want to place the layer switch control outside the map object.
0
votes
1answer
43 views

Handling Errors with Esri Leaflet Dynamic Map Layers

I have an application that is using ESRI for leaflet to pull in MapServices. I can successfully pull in map services and render in my application. However, sometimes the map services return an error ...
1
vote
0answers
17 views

Modify sidebar information caused by marker click [closed]

First time poster here, hopefully someone can point me in the right direction! Pretty new to Leaflet, HTML, and CSS in general so this project has been a great learning experience for me but I've ...
1
vote
1answer
197 views

How to add OpenSeaMap tiles as an overlay on top of osm base map with Leaflet?

After generating the OpenSeaMap tiles, I tried to add them as an overlay upon the openstreet basemap. The idea is after generating the OpenSeaMap tiles to serve them as "static" tiles to the client, ...
6
votes
2answers
113 views

Leaflet marker/icon help

I am trying to get the default marker NOT to show, but it's coming up WITH the icon that I want, so I have a marker and icon like this: I'm getting my data from a OSM nomination search result. if (...
0
votes
1answer
121 views

Loading Leaflet raster layers asynchronously before adding them to the map?

I am working on a web application where users can view sequences of 5-10 GeoTiffs overlaid on a map, and played like a slideshow - show the first Geotiff, wait a few seconds, show the second, and so ...
0
votes
0answers
42 views

Leaflet - invalid map extent

I have a Leaflet map with a GeoJSON polygon overlay. When clicked on a polygon, map is suppose to zoom to the selected polygon: this.map.fitBounds(layer.getBounds()); I'm experiencing strange ...
4
votes
2answers
230 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 ...
4
votes
1answer
118 views

leaflet GeoJson vs polyline

Is there any real advantage in using L.GeoJson instead of Polyline when drawing paths in a map powered by Leaflet? I know that GeoJson can attach additional options. It is also possible with ...
-1
votes
1answer
91 views

export shapefile [duplicate]

I want a button "export" as i clicked on it the shapefile should be downloaded along with it's all files shp, shx, prj, dbf as zip folder. My project is GIS based in which i have two main tasks: 1. ...
1
vote
0answers
49 views

Export ShapeFile from layer file lyr

I want to export shapefile from geojson. I am getting the all data of dbf file in console. My project is based on GIS. I am using LeafLet for that. How can I get a shapefile and it's all supportive ...
2
votes
0answers
103 views

Alternative basemaps for leaflet

I am interested in creating a web map application, that will display a map of my country and various files (.tif, shp) on top of it as layers and i decided to build it on top of leaflet. So when i ...
1
vote
1answer
88 views

Leaflet : load & remove layer at specified interval time

I want to load and remove a layer in a specified interval of time. I make it blink with a random color function associate to my layer style. I can load this layer multiple times, unload it in a ...
2
votes
2answers
198 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 ...
6
votes
1answer
86 views

Is it possible to use a raster::click event within an interactive leaflet map?

Data Download: https://www.dropbox.com/s/f849ra8l6umo9d8/crops.tif?dl=0 I have various raster images of the world that I would ultimately like to plot within an interactive leaflet map; an example is ...
2
votes
1answer
60 views

How to keep vector layer on top of all layers despite toggling order?

How do I keep a layer on top of my other layers despite the order it is toggled by the user? In this example, I've set up two layers named layerONE and layerTWO. How do I keep my layerTWO (red ...
2
votes
0answers
82 views

Leaflet custom info control update with extra parameters

I used custom info control to show information.The below code is working: var info = L.control(); info.onAdd = function (map) { this._div = L.DomUtil.create('div', 'info'); this.update(); ...
0
votes
2answers
53 views

Tweaking location of zoomControl (cartodb.js)

I have succeeded in creating a header outside of the CartoDB UI, but the header is blocking the zoom controls, as can be seen below. Is there any way to modify the zoom control location to adapt to ...
3
votes
1answer
151 views

Leaflet pop-up does not work with Geojson data

I have a geojson file(Polygons).I want to display it on a leaflet map and when user clicks on a polygon, a popup with an information should be visible. The information is 'type'. I am able to see the ...
0
votes
1answer
122 views

Does leaflet support user defined Layer identifiers

It would be nice to be able to check for a layer presence or remove it without having to keep an explicit reference to it. To that extent I would like to use ad id for the layer that I can compute ...
2
votes
1answer
68 views

Update Bootstrap Switch with Leaflet Layer Group

I have this JSFiddle that shows two example layers that can be toggled on and off using the Bootstrap Switch to add and remove them from the map; this works fine. The problem I am having is updating ...
1
vote
0answers
44 views

CartoDB: how to let users update data from the map infowindow [closed]

In cartoDB, I have a map showing public lands in a German city. I want to integrate a form into the cartoDB infowindow to let the user update the data table. How can I pass the values from the form ...
3
votes
1answer
161 views

Leaflet Choropleth Map

I'm trying to create a choropleth map using leaflet. When running the code below the map just comes up with each county being the same color. How do I get each county to be colored based on the data ...
0
votes
1answer
106 views

Querying feature info for L.esri.dynamicMapLayer “bbox must be specified”

I have a Leaflet map in which I am displaying an Esri ArcGIS REST layer, using L.esri.dynamicMapLayer(). The code that initializes this layer is passed the URL to the service and a comma-separated ...
1
vote
2answers
109 views

Leaflet pass geoJson parameter to onEachFeature method

I created geoJson object as below: var geoJson= L.geoJson(groupingLevelType.type, { style: style, onEachFeature: onEachFeature }); function ...
0
votes
1answer
102 views

JSONs made from shapefiles are not plotting (using folium or Leaflet alone)

My goal is to plot two shapefiles as layers on an interactive map. The files I'm using live at https://github.com/AnnaMag/maps. I transformed shapefiles to .geojson using ogr2ogr -f ... e.g. ...
0
votes
0answers
13 views

TimeDimension in R, leaflet [duplicate]

it's possible to do this this with R,leaflet ? any suggestion please?
3
votes
1answer
201 views

Leaflet: How to style my polygons in a GeoJSON layer?

I am trying to figure out why my polygons are not changing color based on a value I have in my GeoJSON. I've set up a hypothetical test here to replicate my issue here. JSFIDDLE link here My data ...
2
votes
1answer
81 views

L.esri.query - where is it?

I have a website that is displaying a MapBox map, using Leaflet. One of the layers is generated from an Esri ArcGIS Rest interface, using Esri's Leaflet plugin: https://esri.github.io/esri-leaflet/ ...
2
votes
1answer
39 views

Accessing First Member Coordinates of geoJSON

I apologize if this is trivial or not possible, I am new to GIS. So I have a geoJSON file with thousands of members, each with a point coordinate. Is there a way for me to access the first coordinate (...
0
votes
1answer
127 views

Adding shapes and/or icons to legend using Leaflet within R?

Is it possible, using Leaflet within R, to make a legend in such way that includes a set of icons or shapes and their corresponding value?
3
votes
2answers
205 views

Leaflet JS - Add text to circles

I am trying to create a map using Leaflet with circles that indicate distances on the map at current zoom level (map scale). See illustration below: I know how to calculate sizes and update the ...
0
votes
0answers
19 views

update markers when not watched

In angular-leaflet-directive is there a way how to update markers and paths on the map when we switch off the $watch using markersWatchOptions?