Tagged Questions

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

learn more… | top users | synonyms

1
vote
0answers
13 views

JSONP working with Leaflet time slider

I would like to integrate the time slider into a JSONP geoserver. Here is the current code I have http://jsfiddle.net/qcwcrwge/26/ and I would like to use the time slider with a layer called ...
1
vote
0answers
5 views

IE8 problem with proj4.js

This problem is in IE8 and not in Firefox. My first problem was that IE8 don't support JSON natively and I get the "JSON is undefined". I solved this by including json2 or json3. Now JSON.parse ...
0
votes
1answer
25 views

leaflet-omnivore style function

Please pardon my ignorance in advance, but is it possible to style a layer(polygon) using the plugin leaflet-omnivore? All of the examples I've encountered are using the MapBox API I have the layer ...
3
votes
1answer
63 views

How to make transparent the background of a WMS layer in Leaflet

I have inserted the following layer from a geoserver in the following Leaflet map : var nexrad = new L.TileLayer.WMS("URL", { layers: 'Wrecks:WrecksGreaterNorthSea', format: 'image/png', ...
2
votes
1answer
20 views

How do you get the nodes of an area in Overpass API in the “right” order?

I use the Overpass API to get the boundary of an OSM relation. I then use the result to display the boundary on a leaflet map. My problem is however, that the nodes are not in the "right order". ...
2
votes
1answer
28 views

Search and zoom json features in Leaflet

How can I add search box to map that allows user to search>zoom to polygon name. If there are 100 polygons, user can type name of polygon (i.e., Symantec) then map zooms to matching county?
1
vote
1answer
21 views

Leaflet/MarkerCluster plugin - how do update the HTML content of a DivIcon?

In Leaflet, I am using the markercluster plugin, in which you can use the DivIcon class to display custom icons for the clusters. You can set your own HTML for these clusters. However, I can't find ...
0
votes
1answer
30 views

Leafletjs Invalid GeoJSON object

I am using the following coming back from a socketio connection: L.geoJson(data.streets, { onEachFeature: map.onEachFeature }); It's throwing the following error: Invalid GeoJSON object. My ...
2
votes
0answers
29 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
33 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
42 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 ...
1
vote
1answer
38 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 ...
0
votes
0answers
20 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
39 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
1answer
18 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
25 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
52 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
22 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
63 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
21 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
68 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
29 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
29 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
40 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
56 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
29 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
21 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
38 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
21 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
26 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
27 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
24 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
96 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
40 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
26 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
37 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
23 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
61 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
46 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
47 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
43 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
32 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
64 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
107 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
12 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
50 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
61 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
32 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 ...