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

learn more… | top users | synonyms

2
votes
3answers
2k views

Sizing Leaflet Map inside bootstrap

I have been trying to change the height of my leaflet map to a percentage inside of bootstrap but everytime I do the map will not draw. Thus, I always have to revert to px value. I'm pretty sure its a ...
4
votes
2answers
2k views

Offline SLIPPY Map (Tiles) Database for Leaflet

How can create an offline cache of a large number of SLIPPY tile (PNG, 256x256) inside a web browser and then display them from that offline cache. For example, can one use HTML5 IndexedDB as an ...
0
votes
1answer
178 views

How to apply bounding box filter in leaflet WMS?

There is a working example in leaflet site for adding WMS Layer in leaflet map at : http://leafletjs.com/reference.html#tilelayer-wms. But I don't see methods to provide the filter for bounding box. ...
0
votes
1answer
750 views

Loop over features of a GeoJSON object from CartoDB

I have just little knowledge about HTML and JavaScript. Nevertheless I was playing, copying and pasting around with Leaflet and CartoDB. I want to display the features GeoJson in a table. This is ...
1
vote
1answer
313 views

Looking for a GeoJSON describing the french departments

Is there any place where I could find a GeoJson describing the borders of the french departments, or do I have to convert a .shp file?
3
votes
1answer
349 views

Does leaflet support KML Ground Overlays?

I found an example showing KML overlays at http://harrywood.co.uk/maps/examples/leaflet/kml.html but it only plots vector layer using polygons. Is there any way to plot Ground overlays of KML (like ...
1
vote
1answer
861 views

How to get correct format of coordinates for export to geojson from QGIS?

I've created a custom map in QGIS with a few shapefiles. I'm using leaflet.js to render the map and the shapefile points and everything lines up correctly. The CRS is set to 4326. When I export the ...
0
votes
0answers
493 views

How do I add elevation data to a GeoJSON line from a GPX file?

I understand that elevation can be added as an optional third value in Coordinates (lat, long, elev) in a geojson file, but I can't find a way to actually do that from a gpx file. I've used ogr2ogr to ...
3
votes
2answers
2k views

OpenLayers vs Leaflet for specific app

Could anybody give me some advice on which one should I use? OpenLayers or Leaflet I will implement OSM on a web-app for taxi management. The requirements for the map part are: Tracking of the ...
1
vote
0answers
187 views

Point Within, Query in a buffer polygon in WMS like in ArcGIS ESRI

I need to do a query to filter the result inside a polygon or geometry, like this: http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/query_buffer.html But, i need to do this in a opengeo ...
3
votes
2answers
1k views

Leaflet proj4leaflet with multiple projections

I am looking at having both EPSG4326 tiles and EPSG3857(cloudmade) tiles on a single map (but separate layers). I have been looking at the proj4leaflet plugin, and it "appears" to me that this might ...
3
votes
3answers
5k views

Custom Leaflet Controls

I have gotton some help in creating a custom control for leaflet, but I am still having trouble upgrading to the CSS styles used by the latest versions of Leaflet. Basically, all I need is a icon in ...
3
votes
3answers
1k views

How to add a polygon from PostGIS ST_AsGeoJSON into Leaflet?

I try to use the following function to add polygons to my Leaflet map. function polygon(geojson) { alert(geojson); // alert for testing layer = L.geoJson(geojson); layer.addTo(map); } ...
1
vote
0answers
238 views

Updating leaflet variable using dajax?

Really, I think this a somewhat easy question for someone with some more experience in javascript programming. I have a Django app to map some locations using leaflet. I'm using dajax for some on ...
0
votes
0answers
28 views

repost: how to show context menu in Leaflet [duplicate]

I asked similar question earlier but didn't get suitable answer. I am now asking again with more clarification. Please see the following google right click menu. I want to create something like this ...
2
votes
3answers
3k views

How to add text-only labels on Leaflet map with no icon

I'm looking for a way to show text on Leaflet map using markers or anything else without showing any icon. I want to show text only and be able to style and rotate it... Any suggestion? Thanks a lot ...
0
votes
1answer
216 views

QuantumGIS EPSG:3857 doesn't match with leaflet

Leaflet documentation said that they has EPSG:3857 as default projection. Using QGIS with open layer plugin, I point to a location to find it's coordinate. I used EPSG:3857 in QGIS as well. The ...
2
votes
2answers
296 views

Can Geoserver return the raster value of a lat/lon point

I have a GeoTIFF published by Geoserver 2.2 and being used by Leaflet via WMS. How can I get Geoserver to return the raster value at a lat/long point? I'm guessing it has to do with using WCS, but ...
3
votes
2answers
384 views

Slippy map format

When do you decide which to use? I've started using Geoserver and it seems like map files are downloaded to the browser (using Leaflet) in the WFS format. When I look at OSM, Mapbox etc, they use ...
1
vote
0answers
122 views

Creating polygons for a choropleth map using PostGIS

I have a grid of points, each with a value to it as shown in the image below. The data was retrieved from PostGIS and rendered in Quantum GIS. The final result should be a polygons of a choropleth map ...
13
votes
5answers
957 views

Comparing two maps with nice web interface?

Is it possible in Leaflet or OpenLayers to compare two maps with a bar to slide between the two? Examples include: ...
2
votes
3answers
2k views

get latitude & longitude as per address given for leaflet

In my project I am using leaflet to display points. I am getting address from my database & want to show point for that particular address. I dident found anything which will give me latitude ...
3
votes
1answer
325 views

GeoServer 2.3.0 Proxy Setting

I've upgraded to GeoServer 2.3.0 running on Apache Tomcat 7.0.39 on my host WebFaction. My websites and GeoServer are on same host but different ports. How do I go about setting a proxy so that my ...
1
vote
1answer
194 views

TypeError in leaflet on zoom in or out

I am working on an application that renders land parcels from PostGIS as polygons in Leaflet. I have an event handler set for 'viewreset' on the map: this.leaflet_map.on('viewreset', ...
4
votes
3answers
558 views

Create buffer around point in LeafletJS?

I am using LeafletJS. I want to create buffer around point. after Selecting a point buffer radius will be specifed by user in feet. After searching of awhile I found this link of JSTS. does JSTS ...
4
votes
1answer
2k views

How do I add my own map layers to Leaflet

I have a Leaflet map and want to add two of my own small polygon layers (currently in shapefile format, but they could be converted to GeoJSON). Can this be done without a mapserver to publish them ...
3
votes
2answers
869 views

Leaflet offline tiles problem

I hate to ask this kind of questions, but i ve been stuck for 2 days now: I rendered some tiles with mapnik which i want to serve in my offline application which will run from a portable disk, but ...
2
votes
1answer
148 views

Value at a particular spot on Geoserver Heatmap

Geoserver is drawing from a PostGIS database to generate a heatmap using this SLD extension. Leaflet then overlays the heatmap over the base layer. Question: How can you determine the value at a ...
8
votes
1answer
804 views

Generating Heatmap from PostGIS

I have GIS data in a PostGIS data base and would like to generate a density map and display them on a Leaflet/Google Maps. Question: What is the recommended/typical method for doing so, without ...
2
votes
1answer
1k views

Leaflet - how can I call custom js after drawing polygon?

I want to draw a polygon on a leaflet map and afterwards send it to the DB and retrieve all objects that intersect that polygon. In Openlayers I did it by using custom function in "featureAdded:" ...
1
vote
2answers
328 views

Leaflet: maximum number of layers?

Is there a limit to have many layers you can have in a leaflet map?
0
votes
2answers
551 views

How to draw line in leaflet using postGIS road data

I have few points from server and I want to draw a line with this point on road. But the leaflet drawing point to point line as shown in picture in orange color. But I want to draw the line ...
1
vote
0answers
269 views

Leaflet: Linking a marker click event to an image

I'm breaking down my question into three parts. I am a beginner to Leaflet and to writing code. Currently, I have a JSON file with all of my markers linked to my map page. The idea is that every ...
5
votes
2answers
1k views

Leaflet Polyline with custom fill pattern

I'm drawing Lines with leaflet.js an have to create custom styled polylines. So i got various image files which should be like a repeated background image in HTML. So is it possible to give a drawn ...
1
vote
1answer
637 views

What is the best way to use Leaflet and Geoserver to highligh a feature after a WMS request?

I have a web map, and I'm hoping to make it interactive. The layer I have is reasonably large, at 15 mb in GeoJSON format 4 mb compressed, so I don't want to load the whole layer as one file. But, I ...
0
votes
2answers
925 views

label for circle marker in leaflet

I am able to add label to circlemarker like this L.circleMarker(points[i],{title: 'unselected'}).bindLabel('Destination').addTo(map); This adds label which appears on mouse hover on circle marker. ...
1
vote
1answer
354 views

Reprojecting coordinates and geoJSON in leaflet

I have a Leaflet map in default projection and a wms layer also in default (web mercator) projection. I would like to add polylines and a geoJSON layer to my map, but the coordinates are in EPSG4326. ...
2
votes
1answer
232 views

leaflet geojson contextmenu

I want to add a context menu on right click for various elements on my geojson layer (I'm doing a road map so on a right click on the road at any part I want to show the context menu). I've managed ...
0
votes
1answer
454 views

find route distance & time taken to travel between two points using leaflet

I am able to find route between two points using cloud mode & leaflet using this. CloudMade Routing with Leaflet: route is not displayed But I also want to find distance & time taken to travel ...
5
votes
1answer
4k views

Change marker icon on click using leaflet

I have a map with many (>100) markers on it. I would like to make it so that clicking on these changes the icon to a highlighted version. I've created two custom icons, one regular, and one ...
2
votes
1answer
1k views

leaflet show miles/kilometers

Googlemaps shows you how large an area is on a map by showing a small bar with the number of miles/kilometers at the bottem left. Does leaflet also support this somehow? I do not see it listed in ...
2
votes
1answer
2k views

Disable leaflet interaction temporary

How can I temporary disable zoming/draging the Mapview in Leaflet.js Tried so many ways but without any luck. It's important to make it temporary and I also need the option to enable again.
1
vote
1answer
620 views

create polylines with different colors in leaflet

I have one function which creates poly line & adds that polyline to map function makeRoute(e) { if(pointsSelection.length > 0) { pointsSelection.push(e.target.getLatLng()); ...
4
votes
1answer
1k views

leaflet geojson coordinate problem

I just started to play with leflet/geojson a little. But my coordinates are not rendered properly and I have no clue what is going on. My coordinates are: 52.23943, 4.97599. They work correct with ...
5
votes
2answers
189 views

Simplest way to make web maps with lots of shapes

I have some computed data about US Census blocks. I'd like to make a web map to display that data. I've searched around and found various tools, but I can't tell what is the simplest "lazy man's ...
6
votes
2answers
796 views

Tilemill Dynamic Tile Generation

I have recently used Tilemill and I wish to implement it for dynamic tile rendering.As I've seen an CartoDB doing in cloud system,they can query & generate dynamic tile for request with UTFGrid. ...
2
votes
1answer
1k views

select two markers & draw line between them in leaflet

I am very much new to leaflet. I have multiple markers plotted on my map in leaflet. now I have to draw line between two markers when I select them. Can any one help in doing this.
-1
votes
2answers
1k views

Adding the draw control in Leaflet

I'm trying to add the Draw Control availble in with the Leaflet.Draw Plugin I've downloaded the code and stored in htdocs and point my page towards the js and css libraries needed. The page loads ok ...
1
vote
1answer
681 views

leaflet layerGroup is rendered behind baselayer

I have several baselayers and overlays. Everything is fine except the lauerGroup is rendered behind the baselayer. First I define the baselayers and add them to a 'baselayer' variable. // base ...
-1
votes
1answer
236 views

How to properly use PostGIS with Maps

First time using PostGIS in an app. Target: - Get Heat Map of customers from address table using leaflet.js and heatmap.js Have DB called store_dev. Installed OSM Bright from Mapbox in it. Have a ...