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

learn more… | top users | synonyms

2
votes
0answers
13 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
18 views

How to get a table from a leaflet map?

I have a map Here based on leaflet JS and the layers are geojson. I would like to get a table at on another div when I click on each layers. How would I be able to do that? Thanks
2
votes
1answer
30 views

Saving Leaflet Maps in Database

I have a webpage with a Leaflet Map, I can add markers,filter markers and so on. My question is that how can I save it? Load the Map Add some Markers on the Map (Optional) Filter the Markers on ...
0
votes
1answer
23 views

Problem with Leafletjs and geoJson

I am new to Leafletjs and I am trying to figure out how to plot a polyline on a map using a geoJson object. I've gotten as far as getting a map, making it centered on a given lat/long and setting the ...
1
vote
0answers
11 views

How to use leaflet-plugins with typescript

I'm attempting to add a bing map layer and a google maps layer to my leaflet map. I am using the typescript type definitions for leaflet rather than the leaflet.js file. To add the layers, I was using ...
0
votes
0answers
13 views

Integrate leaflet module in a google maps application

Is it possible to use a leaflet application over a google maps application? What I want is to integrate a leaflet module / application over a google maps application just by passing the google maps ...
1
vote
1answer
29 views

How can I convert GeoJSON with multiple Polygons and MultiPolygons into single MultiPolygon?

Is this even possible? I have a GeoJSON file with multiple polygons and multipolygons, and I need to set styling on them (in Leaflet.js). I'd like to create a single, large MultiPolygon from the ...
1
vote
0answers
9 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
votes
0answers
18 views

Leaflet js , z-index for geojson polygon

Can I set z-index for geojson polygon so that it lies between tile layer?
4
votes
2answers
45 views

Visualization of a field in Leaflet

In a Leaflet app I want to overlay raster data (technically speaking, a field) on a web map. The data consists of triples < lat,lon,value >, where value is in range [0,1], for example: ...
2
votes
0answers
19 views

Check/uncheck overlays in groupedlayercontrol.js

In a Leaflet-based app I have create several overlays, grouped with leaflet.groupedlayercontrol.js, as shown in this image: Everything works well, but I need to uncheck certain layers, allowing the ...
1
vote
1answer
42 views

How to open overlay content from leaflet popup

Hi! I am currently working on an interactive leaflet map. I managed to display markers from a database via php (create an array). Now I want users to create markers with a click on the map. To add a ...
1
vote
1answer
17 views

Update mouseover information with baselayerchange on leaflet map

On leaflet map I use baselayerchange in order to change the legend box and the info popup on rollover. The legend change works perfectly but I have a problem with the infobox (name info0/info1...), I ...
3
votes
2answers
57 views

Merge geojson polygons with WGS84 coordinate

I have a Geojson file with some adjacent polygons and I want to merge them into one. I know it's a recurrent question but I can't find information for polygons with latitude and longitude coordinates ...
1
vote
1answer
23 views

2 Legends in Leaflet

In Leaflet I want to add a legend when I turn on an overlay, then when I turn off that overlay I want the legend to disappear and when I turn on a second overlay I want a second legend to appear. I ...
0
votes
1answer
20 views

Leaflet & Esri-Leaflet: JSON objects not drawing correctly when using 'fields' filter

I am working with Leaflet 0.7.3 and esri-leaflet beta.6. Using L.esri.Layers.FeatureLayer works fine until I add the fields filter. At that point, the geojson objects draw sporadically (mostly not at ...
0
votes
0answers
7 views

Restrict legend to map bounds in CartoDB.js

Does anyone know how to restrict legend content based on map bounds in CartoDB.js? I am building a large, complicated legend and I would like it to only display visible features to reduce complexity. ...
1
vote
1answer
31 views

Leaflet - how do you get individual markers from a featurelayer?

In Leaflet, if I have a feature layer filled with markers, how do I get these markers back from the layer? I want to apply different popups to each individual marker, instead of the entire set. I ...
0
votes
0answers
42 views

Leaflet - very basic, simple routing - OSM & Google Maps

I am using LeafletJS and I need to display the most basic route available, having many waypoints/stops (not enough to draw polylines though). This route is supposed to be for public transport in ...
0
votes
1answer
25 views

Collapsable control in Leaflet

A simple to ask but difficult to answer question: I want to create a control like the one in the Leaflet layers example: http://leafletjs.com/examples/layers-control.html Notice that the control is ...
0
votes
0answers
19 views

Leaflet.EasyButton toggle

I am attempting to incorporate Leaflet.EasyButton into an application. While I am able to drop it in and call a function I would like it to toggle on/off. right now it is loading an inner.HTML div ...
1
vote
2answers
34 views

multiple, simultaneous TileLayers in leaflet?

I would like to have two tile layers in Leaflet, one a conventional set of tiles, and another composed of PNG tiles with transparency, so basically a tiled overlay layer. Is this possible? I see ...
1
vote
1answer
19 views

WFS with EPSG:3301 projection using Leaflet

I am adding WFS points to Leaflet map, but don't see them on the map, however in console I see that all points I wanted is here with all properties and geometries. But the problem here is in ...
0
votes
1answer
23 views

How to style specific polygons from a geojson with Leaflet

I have a World Countries geojson, that has country codes as "ID" (feature.id) and names as feature.properties.name I would like to color specific countries for making a "countries visited" map. ...
1
vote
1answer
21 views

How to let leaflet layer events to propagate to layer below

I am working on a leaflet map with three layers: a base tile-layer, a GeoJson layer and a label tile-layer. For display, I want the label layer to be on top, but for interaction I would like to let ...
1
vote
1answer
20 views

Problem showing WMS with EPSG:3301 projection using Leaflet

I am trying to show wms layer EPSG:3301 using leaflet, but have no succes for a long time. http://kaart.maaamet.ee/wms/alus?service=WMS&version=1.3.0&request=GetCapabilities Here is my code: ...
2
votes
1answer
82 views

GeoJSON, circlemarkers using the Leaflet OverlappingMarkerSpiderfier plugin

I am wondering if I can use the Leaflet OverlappingMarkerSpiderfier plugin with my circlemarkers. I've loaded a GeoJSON file and added circlemarkers using; var gj = L.geoJson(route, { ...
1
vote
1answer
37 views

Custom ordering/z-index of icons in Leaflet layer

I have a single layer (points) with a bunch of markers. Each point has an attribute that is regularly updated. I understand by Leaflet sorts the layers such that those lower in latitude are on top for ...
1
vote
1answer
24 views

adding bing (with labels) maps to leaflet

I am using this leaflet plugin to render bing aerial map as a base layer onto a leaflet map. baseMapUrl = new L.BingLayer(bing_key); map.addLayer(baseMapUrl); But I am unable to find a way to ...
3
votes
0answers
32 views

Adding an offset to a Leaflet TileLayer on the fly

I'm currently using Leaflet to display 18th century maps of Belgium as a base layer with a vector overlay of the present day road system. Although the maps are absolutely gorgeous ...
0
votes
1answer
20 views

Multiple Geoserver GetFeatureInfo templates for same layer?

I have layer 'states' on Geoserver for which I need multiple GetFeatureInfo templates. I would like to use that layer a couple of times on different maps, but I want different data in Leaflet popup. ...
2
votes
0answers
55 views

Comparing mapping APIs

I am planning to write a thesis about mapping APIs and compare three of them (Google Maps API, Leaflet and OpenLayers) or four, if you consider OL2 and OL3 as different APIs. I am planning to make 3 ...
1
vote
0answers
37 views

leaflet layer control checkbox options min/max

I have a straight forward leaflet map that is on a webpage. I am using the angular-leaflet-directive and all works as expected except for the layer control box. When only one baselayer is specified I ...
1
vote
1answer
41 views

Why doesn't my Mapbox + Leaflet viz look retina-friendly?

This is probably a very simple question but it's not clear to me. The Mapbox docs say: When you create a project from the editor, Retina (high resolution) tiles are automatically used on ...
1
vote
1answer
31 views

Leaflet: How do you use removeLayer?

This is driving me mad. See the Leaflet tutorial for adding a layer control to your map: L.Icon.Default.imagePath = "Scripts/images"; var mapUrl = ...
3
votes
1answer
30 views

Leaflet change color dynamically

I am new with leaflet and I need help to change the color of a polygon on a choropleth map dynamically. In my website I have an slider, and depending on the position of the handle, the colors of the ...
1
vote
1answer
48 views

How to update leaflet L.imageOverlay using jquery serialize without page refresh?

I am developing an application that fetches and displays raster/image maps (png, tif), into a leaflet map. However, I didn't like the page and the map refresh upon form submission. In addition, I ...
2
votes
4answers
104 views

Sites that demo freely available Basemaps

I've seen such sites in the past. I remember seeing one put together by Wm Lerer at a conference a couple years ago. What I'm looking for is a map that demonstrates all (well, at least a lot) of the ...
0
votes
1answer
35 views

geoserver to leaflet via jsonp

Please somebody help because I am on the edge of madness:) I have no idea what is wrong with my code... Only what I want is adding layers to my leaflet map: 1 point layer, 1 line, and one polygon. ...
0
votes
0answers
11 views

Is there a Leaflet plugin to manually correct geocoded locations?

When geo coding an address, I get the coordinates on the map. However, sometimes the user wants to correct the location if it's inexact or wrong. Is there a Leaflet plugin that provides this ...
1
vote
0answers
45 views

Attribute search in Leaflet

I have added the attribute search plugin to my leaflet map, but I cannot use in the correct way. Somehow my script loads the GeoJSON features two times. The first are the styled markers, the attribute ...
1
vote
1answer
55 views

leaflet and image popup from qgis export

I am a novice in using leaflet, I exported my map layers from qgis to a working leaflet map. i am trying to modify the popup to use the attribute so as to get an image popup. i am however stuck as i ...
0
votes
0answers
28 views

get linestring and polygon into leaflet from geoserver

I can load points from my geoserver to leaflet via jsonp. Now I would like to know how can I load linestring or polygon with similar method into leaflet. Here is the example for points: var ...
0
votes
0answers
21 views

Duplication of WMS Imagery

I am trying to get a state served Imagery WMS layer on a leaflet example and I am getting duplication of the image itself. Any ideas would be great. Below is the URL of the imagery: ...
0
votes
2answers
64 views

How do you load a GeoJSON file in Leaflet?

I'm stumped as to how to add a GeoJSON layer to an OSM map. Through Google, I've found a bunch of different answers, none of which seem to work. Following the Leaflet documentation, the simplest way ...
1
vote
0answers
32 views

Create a Leaflet custom checkbox control

I want to create a custom checkbox control which will simply set a flag in jquery/javascript: if checked the flag = 'clustered' or if unchecked flag = 'unclustered'. So far I have a control on the ...
1
vote
0answers
23 views

TypeError: L.Proj is undefined in leaflet

I am using leaflet 0.7.3. I am trying to load a wms tile: var crs = new L.Proj.CRS('EPSG:2236', '+proj=tmerc +lat_0=24.33333333333333 +lon_0=-81 +k=0.999941177 +x_0=200000.0001016002 +y_0=0 ...
2
votes
2answers
66 views

How to generate legend in leaflet webmap?

Although I have checked the "Create Legend" option in the qgis2leaf plugin, it did not generate any legend in the output webmap. What am I missing here ?
1
vote
1answer
108 views

Custom marker/icon based on attribute data in leaflet/geojson

I would like to add different icons to my leaflet map based on attribute data. My layer is a geojson layer, it is coming from geoserver with jsnop. I can see my data with the default marker, but when ...
0
votes
0answers
29 views

Leaflet: how can I update content of popup by jQuery

in my popup is a spinner with class=spinner and an empty container for addon informations. I want to hide after successful ajax. I want to add some html in a container. I tried this: ~~~ ...