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

learn more… | top users | synonyms (1)

0
votes
0answers
35 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
85 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
60 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
58 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
38 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
51 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
39 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
91 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 ...
4
votes
0answers
37 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
44 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 ...
1
vote
0answers
42 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
35 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
84 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
55 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
44 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
35 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
72 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
56 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 ...
0
votes
2answers
48 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
38 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
12 views

TimeDimension in R, leaflet [duplicate]

it's possible to do this this with R,leaflet ? any suggestion please?
3
votes
1answer
121 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
46 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
30 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
49 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
76 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
15 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?
1
vote
1answer
104 views

How to geocode location using twittersearch for leaflet map of tweets

I'm using twittersearch to iterate over user input topics and location of interest that will then be visualized in a leaflet map. So using 'place' I can get a map, no problem. I'm trying to increase ...
0
votes
1answer
111 views

How to add WMS legend in leaflet from Geoserver?

Can anyone explain me how I can include a legend within the layer control for any individual WMS layers in leaflet? The wms service works fine. I just want assign the symbol label to each layer of ...
1
vote
1answer
159 views

Is it possible to use Leaflet.draw on a map in R?

I want to develop an application where a user can draw a line, polygon etc... I currently develop with R and leaflet package and I found that it is possible to work with Leaflet.draw under ...
0
votes
1answer
28 views

Zoom dependent layers in leaflet

My leaflet map has two WMS layers with different scales; one of them is a 4cm topographic map. I would like to have both WMS on the map but showing only the topographic map when the zoom of the map is ...
0
votes
1answer
60 views

Leaflet layers on different zoom levels. How?

I've added a polygon layer and a point layer to my leaflet map. I would like the points to appear after a certain zoom level or when a "click" event occurs e.g. (polygons.on("click", function....) ...
1
vote
1answer
44 views

Populate markers in leaflet with tweets and tweet location using python

I am iterating over twitter using python, the user inputs a topic to search for on twitter and then the location to view on the map in leaflet. The leaflet map is created automatically in the browser. ...
0
votes
1answer
76 views

Zoom to polygon bounds on click. Leaflet ´, GeoJSON

I have a leaflet map with a lot of polygons (borders). I will like to zoom to the bounds on the polygon, when the user click. Until now its only possible for me to zoom to the the bounds of all the ...
0
votes
1answer
29 views

Proj4Leaflet with EPSG:2263 does not seem to project correctly

For some reason EPSG:2263 projections seem to be incorrect. The tile server works properly at all zoom levels as configured. However, the tiles are rendering at the incorrect latLong. Origin was ...
0
votes
1answer
66 views

What's the most appropriate way to load Mapbox Studio tiles in Leaflet?

I'm updating a Leaflet map's basemap, and I'd like to use Mapbox to create this basemap. At first I thought I would have to ditch Leaflet and switch entirely to Mapbox GL. After digging around in the ...
1
vote
1answer
64 views

Check if circle is within polygon/rectangle/circle in leaflet and turfjs

I am using leaflet and turfjs. I am able to check whether rectangle/polygon/point is within another polygon. But I am not able to check the same for circle. I want to restrict user to draw circle ...
2
votes
2answers
46 views

Leaflet Maps trouble on personal webpage

I created a personal webpage on notepad++ and created links to 5 different leaflet maps on it. it works fine when you run it from notepad++. The problem is when I used FileZilla to put my files onto ...
0
votes
0answers
28 views

Adding custom vertices to a Leftlet LineString / Polyline

I have a normal Leaflet Draw page here, when I'm not in editing mode I would like to have custom vertex icon in some of the vertices that will also respond to click events, showing a popup. I looked ...
0
votes
0answers
56 views

Display Leaflet WMS Layers from same source on different panes

I am using the Leaflet WMS plugin to add in layers to my map via a WMS. I have the following code below that adds all of the layers using the same source but as separate layers. However, I want to ...
2
votes
1answer
66 views

How to rotate an embedded web map (on pc)?

I was looking through a couple of maps I made, the maps were created by serving VectorTiles through TileStache and using Leaflet and Tangram (on respective pages) to render them. One of the reasons I ...
0
votes
1answer
46 views

Map editor R & leaflet?

That is possible on a web map designed by R & leaflet give the opportunity to the user to draw lines, polygons, choose the colors (like a map editor)? if yes what's the package that allows me to ...
1
vote
1answer
40 views

Is it possible to map a leaflet provider (precipitation) on top of a polygon in an interactive map?

I've just started using the leaflet package in R to create interactive maps and I'm wondering if it's possible to plot one of the leaflet providers on top of a plotted polygon rather than under it as ...
2
votes
1answer
72 views

How to get the current user location automatically every “x” seconds and put it on a Leaflet map?

I need to get the current user location automatically every "X" seconds (5 or 10 sec.) and put it on a simple Leaflet map. I've seen the Leaflet on Mobile sample here ...
4
votes
1answer
63 views

Trigger a layers 'on hover' effect through another layer in Leaflet

Im trying to make a map containing two separated basemaps one with terrain and second with labels, and with vector data layers in between. The problem is when I try use hover/click events on data ...
1
vote
0answers
43 views

Draw L.circle in a custom pane

I want to draw L.circle in a custom pane but I am using mapbox.js and hence the leaflet version 0.7.7. How can I draw L.circle in a custom pane? Do we have to copy some js files from the current ...
1
vote
1answer
39 views

Getting Node.appendChild error with leaflet

I am trying to add a popup function to some polygons. I've been consulting a few different tutorials trying to work it out and I'm concerned that I am getting conflicting instructions. The map I have ...
1
vote
1answer
56 views

LEAFLET - geojson properties in bounding box

Is there a way to show geojson properties which are located in current bounding box? something like this http://turbo87.github.io/leaflet-sidebar/examples/listing-markers.html with geojson and its ...
0
votes
1answer
22 views

Similar representation of flow using leaflet and its plugins for Polyline

Is there any javascript plugin of leaflet that can achieve that which are shown in the link? http://gmaps-samples-v3.googlecode.com/svn/trunk/symbols/polyline-symbols.html Is it as smooth as shown ...
1
vote
1answer
46 views

Converting json to geojson

I am writing a web service which in return gives json format data can anyone help me to convert this data into geojson format. { "STATE_ABBR": "AK", "file_name": "addresses", "AREA_WATER": ...