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

learn more… | top users | synonyms (1)

1
vote
1answer
45 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
137 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
75 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
36 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
40 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
29 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
68 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
62 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
61 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 ...
2
votes
1answer
76 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
33 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
95 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
118 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
44 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
16 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
70 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
74 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
45 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
22 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
93 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
58 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
33 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
107 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
295 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
33 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: ~~~ ...
5
votes
0answers
110 views

How to add an attribution on a GeoJSON Layer from Leaflet?

I need to use a GeoJSON Layer on my Leaflet map. Here is a sample of my code: function onEachFeature(feature, layer) { if (feature.properties && feature.properties.popupContent) { ...
2
votes
1answer
105 views

Using OSM Buildings in Leaflet: how to deactivate layer on loading map

I'm trying to use OSMBuildings in my Leaflet map. <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>OSM Buildings Test</title> <link ...
0
votes
1answer
88 views

How to query postgres with gis to get GeoJSON for GeoJSON tile layer?

I have a postgres database with one table like the following: CREATE TABLE post_pl ( gid serial NOT NULL, zip character varying(5), zip_n integer, city character varying(50), geom ...
1
vote
1answer
65 views

hiding some “feature”s in GeoJSON file on map

I have geojson file including boundaries of most countries in world. When I clicked on a "feature" (aka country, or polygon) I want to hide it while keep showing the others. because I am planing to ...
0
votes
0answers
27 views

Unable to identify the colours on leaflet

var non_tfl_lines_JubileetoIlford = L.geoJson(non_tfl_lines_JubileetoIlford, { pointToLayer: function(feature, latlng) { switch (feature.geometry.type) { case 'LineString': return new ...
0
votes
0answers
60 views

Run-time substitution on MapServer with Leaflet

I have a MapServer instance and map file displaying data in selected countries using a Leaflet WMS tileLayer. This map file works to display points from a single country (showing the LAYER definition ...
2
votes
1answer
125 views

leaflet marker-cluster JSONP geoserver

I hope I can get same help from here. I started to put together a leaflet map, please see here: http://gis.xyz/leaflet2.html I want to show my postgis point (uk based) features on this map with ...
2
votes
1answer
90 views

openlayers leaflet and popup

I am working on a map mixing openlayers and leaflet librairies (it is possible, correct ?). I am such a beginner that, after lots of readings, I thought creating popups was less difficult for me ...
1
vote
3answers
169 views

Bootstrap and Leaflet - Grid Issue

Trying to use integrate a simple leaflet map within Bootstrap grid / column. While I am trying to follow tutorials and templates, for some reason the <div> id="map"</div>does not seem to ...
1
vote
1answer
112 views

Adding popup to geojson layer based on feature property?

I'm using leaflet and trying to add a popup to a point on the map that will return a property of the point from the geojson file. Going off this post has been helpful problem adding pop-up to GeoJSON ...
2
votes
1answer
44 views

Distort image to display on leaflet.js based on known 16x16 point grid

I have an image that is a satellite picture, and with php gd I want to distort it so I can overlay it on a leaflet.js map. To make it a bit more simple, I have a grid of points, 16x16 which bind the ...
1
vote
1answer
108 views

Leaflet HTTP.Get bad request; not loading tiles

I am trying to walk through the Leaflet quick start tutorial and am having a really simple issue: None of my tiles are loading. I get this error at the image url and an HTTP Bad Request in the ...
4
votes
1answer
190 views

*Leaflet* mouse wheel zoom only after click on map

I'm working with the Leaflet JavaScript Library and attached a (working) map to my HTML Document. It is in the middle of the page, and when I'm scrolling down with my mouse wheel and arrive at the ...
3
votes
1answer
63 views

Zoom in to see details

I have 2 shape files, one that shows all the counties on an island, the other shows all the villages on the island. Here is the scenario: My initial map shows the counties. When you click on a ...
1
vote
1answer
99 views

Moving from OpenLayers to Leaflet breaks tilecache

My tilecache.cfg is like so (working with MapServer) [mylayer] type=WMS url=http://server/mapserver/app spherical_mercator=true layers=mylayer The following works just fine var mylayer = new ...
1
vote
1answer
71 views

Leaflet Draw - add title to marker or shape?

I am trying to create a participatory mapping site where users can draw pts, lines and polys using Leaflet draw. Is it possible to create a pop window where users can add a title or description of ...
2
votes
1answer
67 views

Display a link in a popup with Leaflet

Hey there! Im working with the Leaflet javascript library. There should be an option to click on my map and view a popup. I already have a code for that: var popup = L.popup(); function ...
0
votes
0answers
16 views

GeoJSON of half the earth [duplicate]

I'm currently trying to model daytime/nighttime in leaflet, and the only way I currently see me being able to do that is to have a GeoJSON polygon reflecting half of the earth (for daytime/nighttime ...
0
votes
1answer
71 views

Displaying geojson data in leaflet

I am trying to access and display some data in a geojson layer and would appreciate if someone can take a look at my code below and suggest what I need to do to make it work. The result of the ...
1
vote
1answer
59 views

Is there a way to have a choropleth map in Excel reading data from a sheet?

Is it possible to have a solution similar to ESRI maps for office in which I want basically a geojson file or any file for that matters to render a choropleth map based on data in a sheet? Tried ...
0
votes
1answer
85 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 ...
2
votes
0answers
29 views

What is the best way to handle metadata with TileStache?

When I'm serving up maps and UtfGrids with tileStache I would like to also include some metadata with the layers so that my leaflet application can understand the context of the layer. For example: ...
2
votes
1answer
70 views

Most efficient way to use UTM in leaflet

Our server is using UTM internally. We then send a large number of UTM Coordinates to display them in a custom made leaflet layer. First we transform (unproject) them into "normal" geographical ...
0
votes
0answers
34 views

Leaflet.js - drag marker from popup

I am trying to allow markers to be dragged via their popup. On mobile devices the marker position to is hard to see underneath the user's finger. If an area on the popup can be designated as an anchor ...
1
vote
2answers
237 views

How to style geojson polygon using L.mapbox.featureLayer()

I have this code: var SupIncend = L.mapbox.featureLayer().addTo(map); var ArbolesAntes = L.mapbox.featureLayer().addTo(map); var ArbolesX = L.mapbox.featureLayer().addTo(map); var ...