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

learn more… | top users | synonyms (1)

5
votes
0answers
138 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) { ...
3
votes
0answers
46 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 ...
3
votes
0answers
79 views

Leaflet Marker Dragend Bug/Difficulty

I am having a problem with leaflet markers. The problem is that when I drag a marker with a lower z-index under another marker with a higher z-index and let it go, it makes another marker. I have a ...
3
votes
0answers
494 views

Using Custom Map Projection On Leaflet

I have an application displaying a EPSG:3414 map running on Openlayers - jsfiddle working sample that works. I am trying to implement the same on Leaflet - jsfiddle non-working, it is not working as ...
3
votes
0answers
240 views

How do I format tilelayer.wms url properties such that I add an overlay iteratively to my base map in leaflet

My base map was created using hard-coded template variables. I am using the leaflet tilelayer.wms constructor and including the url like so: url: ...
3
votes
0answers
796 views

leaflet - Drawing line following the road

Short version: What I wish to be able to do is drawing a polyline along part of a road. In that way marking certain houses, along this road. Long Version: I have several houses that I wish to mark ...
3
votes
0answers
963 views

How to serve OpenStreetMap Tiles locally using ArcGIS Server 10?

We want to serve OpenStreetMap Tiles locally using ArcGis Server 10 to use as base maps in our ESRI Silverlight and Flex GIS clients. We've downloaded our regions OSM file and created PNGs using ...
3
votes
0answers
363 views

How do I pass a LatLng Bounds from Leaflet to Mapfish Print?

I successfully fired up a MapFish print server on Elastic Beanstalk, and it prints out the sample spec files fine, but I'm trying to pass bounds from my Leaflet frontend now, and encountering a lot of ...
2
votes
0answers
15 views

Is it possible to hatch format railroads in leaflet?

Within mapbox tilemill it is possible to make make rail-roads like this: To achieve this you need to write the following code: Source #railroads { ::line, ::hatch { line-color: #777; } ::line { ...
2
votes
0answers
34 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 ...
2
votes
0answers
78 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 ...
2
votes
0answers
30 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
0answers
44 views

Stray horizontal lines after converting from GeoJSON to topojson

After converting a GeoJSON file to topojson, and loading the topojson into Leaflet, stray lines appear in the resulting map. Like this: What is causing this? If I view the GeoJSON, these stray ...
2
votes
0answers
48 views

Popups not showing on layer/feature/marker groups

I had two problems. One was that, once I got lots of markers in one layer, and lots of polylines in another, someof my markers, starting from the north, started to vanish. I noted in the doco that ...
2
votes
0answers
48 views

loading geojson in leaflet

I just added the geoJSON vector layer in leaflet for my hybrid mobile app using phonegap, the problem is that when I add the geoJSON file of size larger than 2mb the application crashes. What is the ...
2
votes
0answers
72 views

Displaying a box with text on a leaflet map

Is there a way to display a label or textbox on a specific geo-place on a map produced by leaflet.js.? I know about the Marker- and Polygon Method But I can't find a way to put text in the polygon. I ...
2
votes
0answers
37 views

How do I change polygon opacity using a esri WFS in leaflet?

Note...Solved and here for anyone having this problem...damn simple problem, I had not used a higher case character for fillcolor and fillopacity....they should be fillColor and fillOpacity , it ...
2
votes
0answers
210 views

Z-Index in GeoJSON features using leaflet

I have a watershed polygon with sub-watersheds contained within the larger watershed. I would like the sub-watersheds drawn on top. Can i control the drawing order of features within a geojson object ...
2
votes
0answers
152 views

Leaflet Drag and drop to change existing markers

I'm working on a project where the user should be able to drag an image to a pre-existing marker and have the marker update color if the value of the marker (a value w/in the geojson) and image (a ...
2
votes
0answers
139 views

Load Leaflet map in canvas element

I am working with leaflet tiles loading tiles to a map div http://jsfiddle.net/tBCd5/ I am now playing with some html5 canvas distortions like below http://jsfiddle.net/UF4PK/ It would be cool to ...
2
votes
0answers
806 views

How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane?

I have SVG on top of GeoJSON in my map. How can a leaflet SVG overlay be placed outside of the leaflet-overlay-pane while keeping GeoJSON in place in the leaflet-overlay-pane? (For example, how could ...
2
votes
0answers
185 views

How to add an offset to a GeoJSON layer in Leaflet?

Using the example GeoJSON tutorial code at leafletjs.com. Change the myLines variable so that the two lines overlap, but run in opposite directions as follows: var myLines = [{ "type": ...
2
votes
0answers
114 views

QGIS 2.0 How to copy the color styling to a color column in a layer's attribute table

I have a polygon layer in QGIS that I have applied a random color style to each polygon. Under Layer Properties -> Style I selected a Categorized style and then generated a random color ramp. I added ...
2
votes
0answers
170 views

Leaflet wms offset on zoom out

I have Leaflet map with base layer (epsg4326) and wms layer of gps point (also epsg4326). I've noticed when I zoom out , the gps point offset to the left. Any idea why it happens ? Here you can see ...
2
votes
0answers
322 views

Leaflet Event Craziness: jQuery click events don't propagate to L.DomEvents

I noticed that calling .click() on jQuery selected DOM elements in Leaflet ( such as anchor icons ) will not do anything -- the click event isn't propagated to the events created with L.DomEvents. For ...
2
votes
0answers
66 views

How to draw ploygon in leaflet that use event?

Is there only one way to draw a polygon through the Leaflet.draw plugin? If you want draw anything, you must add the control ("map.addControl(drawControl);"). I want to draw a polygon on leaflet map ...
2
votes
0answers
368 views

Data visualization techniques for web maps using ESRI and open source suites

I want to represent statistical data over the web map and looking the examples/techniques to represent data on the web map (apart from Pie-chat, bar graph) with new tools like gauge widget etc. ...
2
votes
0answers
79 views

Is it possible to link polyline features on a web map to a Google Chart?

I would like to display a line chart and (leaflet) map beside each other on a web page. When I turn off a series on the chart the associated polyline feature (river) should turn off on the map. I am ...
2
votes
0answers
182 views

Show geoJSON properties in jQuery Mobile Panel

First off I'm a novice at JS so please bear with me if this is a simple task to complete. I'm currently using the stock LeafletJS popup bubble to display the properties from my geoJSON. However, I ...
2
votes
0answers
786 views

Projecting point in Leaflet from EPSG 900913 (same as 3857) to EPSG 2232 with proj4js returning unexpected results

I have a leaflet map from which I want to be able to query an api that accepts x y values in EPSG 2232 as inputs. Leaflet doesn't handle point transformations like Open Layers does so I am trying to ...
2
votes
0answers
796 views

Problem with multipolygon in Leaflet

I'm using Leaflet L.Polygon, but for some reason there's only blank site. Here's my code: var map = L.map('map').setView([37.8, -96], 4); var cloudmade = ...
2
votes
0answers
1k views

Overlaying a mbtiles tile layer produced with tilemill over another layer maintaining transperency

So using leaflet, I'm overlaying my base tile layer as google satellite imagery. I want to overlay another layer (Mbtiles layer) produced with tilemill over this satellite layer. I was successful in ...
1
vote
0answers
11 views

Leaflet Draw - Get Circle extent

I am using Leaflet.Draw to draw a circle. var circle = L.circle(new L.LatLng(latitude, longitude), number, circle_options).addTo(featureGroup); I need the coordinates of the circle as a polygon ...
1
vote
0answers
13 views

Geoserver GetCapabilities and CORS

Using WMS I do a GetCapabilities request on a geoserver. This works in FireFox, but nog in Chrome, Safari and Internet Explorer. The point is that in de web.xml from the server I did add: ...
1
vote
0answers
31 views

Legend not removed when layer changed

I made this webpage with JavaScript and CartoDB. The layer selector works like I expected it to but I noticed that the legend are stacking on top of each other and not being removed when the layer is ...
1
vote
0answers
81 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
0answers
83 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
0answers
71 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
41 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 ...
1
vote
0answers
61 views

Multiple Leaflet maps on website in different divs

I'm pretty new to leaflet.js and I'm trying to figure out how to assign the same map with the same set of options and layers to a different HTML container instead of having to remove and add a new one ...
1
vote
0answers
123 views

How to get the total route km route using machine leaflet

I'm using machine leaflet route to draw routes I can get the total route miles ?? How can I do this? I know the class IRouteSummary http://www.liedman.net/leaflet-routing-machine/api/#iroutesummary ...
1
vote
0answers
36 views

Geocoder leaflet for internal use in the company, which take addresses from any part of the street

I am making a personal application routing to be used internally in the company using machine leaflet route. The plugin uses nominatim geocoder, but he geocodificia according to the links of the OSM. ...
1
vote
0answers
67 views

What is wrong with my data receiving from php script for geoJSON TileLayer?

I want to get geo data as geojson for geojson tile layer requests in leaflet. I set up a geojson layer like this: https://github.com/glenrobertson/leaflet-tilelayer-geojson/ A php script answers ...
1
vote
0answers
28 views

Leaflet: Is there a way to use click event just like mouseout?

I made a map with leaflet by following the official Leaflet tutorial on interactive choropleth maps. I would like to make the map compatible with smartphones, so I added a click event, which acts ...
1
vote
0answers
47 views

Show large information in a map (millions of points)

I have millions of points (census data) about 1.5Gb in a text file. But I only want to show an area based on this points like a heat map, so maybe I have to build polygons based on these points. What ...
1
vote
0answers
84 views

send viewparams geoserver using leaflet

I need to pass my longitudes and latitudes of origin and destination for a sql view in geoserver to get a WMS layer with the route. I've performed in qgis to view and is working perfectly. This is ...
1
vote
0answers
132 views

Formating geojson file with leaflet ajax-plugin

First of all I apologize for my basic english. I have to say, too, that I'm really a newby in coding. I'm trying to create an interactive map using leaflet (you can see it here). I was able to show my ...
1
vote
0answers
61 views

Adding marker on a leaflet map

I'm very new to GIS and for learning I started with building a simple web app with GeoDjango. I am using dango-leaflet. Since I have a very limited knowledge I am facing many challenges. I'm trying to ...
1
vote
0answers
88 views

Callback method geocode items nominatim not work

function addr_search() { var inp = document.getElementById("addr"); $.getJSON('http://nominatim.openstreetmap.org/search?format=json&limit=5&q=' + inp.value, function(data) { ...
1
vote
0answers
62 views

Leaflet + GeoServer + British National Grid

I have followed along some examples and was able to display BNG 27700 data nicely on the map, however now I want to perform getFeatureInfo function on click. Again the code I used is as below: var ...