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

learn more… | top users | synonyms (1)

1
vote
1answer
829 views

GeoJSON in Leaflet

I'm just starting to work with leaflet and have a basic question about showing a geoJSON file. First, I found this excellent article with example code: http://bl.ocks.org/lxbarth/4019660 However I ...
0
votes
1answer
313 views

How to render only those Leaflet layers which are in current map view?

Is it possible to render Leaflet layers which are in current map view so that other layers which are not in that map view doesn't render? I have many polgons (buildings) and it is really slow ...
1
vote
1answer
124 views

Removing Places from OSM

Doe is exists a way to remove all the places from the OSM map? Also like shops, bars, restorations, hotels etc. I wish to use a maps with a less info. Is it possible to do this from the original OSM ...
1
vote
0answers
573 views

Leaflet's worldCopyJump breaks map, zooming fixes it up (updated)

I had my map working with worldCopyJump set to true, but then it stopped working. I'm not sure exactly what broke it (the original form of this question said there was a connection to a plugin, but ...
3
votes
3answers
430 views

Is it possible to check incoming GeoJSON to see if any of the features are identical to existing ones before adding to map?

I am working on a Rails/PostGIS app and doing a typical ajax call to retrieve GeoJSON within the map viewport bounds. Whenever the map is shifted or zoomed all of the markers are removed and then ...
1
vote
1answer
286 views

Get latest tiles from TileMill's tile server in Leaflet

My leaflet app gets the tiles from TileMill's tile server in the standard way: L.tileLayer('http://<myip>/tile/SteveCountryVic/{z}/{x}/{y}.png', { ... }); These tiles are often old, not ...
0
votes
2answers
977 views

How to create multiple polylines using an external geoJSON file using Leaflet?

I'm starting with Leaflet and I'm using some georeferenced information collected from twitter. I already manage to load an external geoJSON with some points. But now I wan't to draw some connections ...
2
votes
2answers
920 views

How to determine intersection between geojson feature and given coordinates?

I'm overlaying a leaflet map with features of geojson, fetched with d3 and added as SVG elements to the DOM. My geojson contains too many features to render at once, so my goal is to add to the map ...
0
votes
1answer
331 views

CartoDB Convert from the_geom to google's lat long

I have a CartoDB table that when I query it via the rest api I get something like this: { "name": "sas", "street": "la plata 2390", "cartodb_id": 1, "created_at": "2013-06-26T00:46:21.412Z", ...
2
votes
3answers
3k views

Getting WFS data from Geoserver into leaflet

I'm trying to use a ajax call to load WFS data from geoserver into a GeoJson layer in leaflet. When I do the following message in the console: XMLHttpRequest cannot load ...
2
votes
1answer
364 views

How can I make a leaflet control open by default?

I'm using leaflet to display a map. I have a control section that I'd like to be open by default, but I can't find a way to do it through the API. Is there a way to do this?
1
vote
0answers
132 views

How to select GeoJSON vector feature in Leaflet?

I've been using OpenLayers for years,instead of comparing OL & Leaflet libraries,I decided to use Leaflet for the job for now. I have a GeoJSON data layer where I show point objects only.Just as ...
1
vote
2answers
253 views

Where to store geodata to be layered over an OSM tile map?

I'm working on a project for which most data can come straight from OSM. But some data is not relevant to OSM and will need to be stored separately then layered over the top. Probably the tiles will ...
0
votes
1answer
2k views

leaflet fitBounds with multiple marker

I have created two checkboxes. If I check one it will zoom to a point with marker. If I uncheck the checkbox the marker removed. Similarly second one is working. But I want to do if the two checkboxes ...
3
votes
4answers
1k views

Display GeoJSON layer on top a SVG image instead of a map.

I'm very new to GIS, so hope this is the correct place to ask. Not sure if this will even be possible. This is what I want to achieve: In short, I want to display a set of polygons, lines etc. in a ...
0
votes
0answers
764 views

Unable to dynamically locate map boundary coordinates in OSM/Leaflet

I have been trying for the past hour to take the coordinates of the map edge in a OSM/leaflet application I am making. While I can get the coordinates of the center, and I can get the coordinates of ...
1
vote
1answer
277 views

How to prevent data scraping in a web map?

I would like to use Leaflet or a Leaflet-like mobile-friendly library to produce a web map of points of interest, but I am concerned with how easy it is to just scrape the data from the javascript. Is ...
1
vote
1answer
547 views

Leaflet Marker Cluster: Popups won't open after first

I built a map using Leaflet and markercluster.js, and I'm having a strange issue where after I click on the first popup, I'm unable to open any other popup. This happens whether you close the first ...
0
votes
2answers
510 views

Leaflet WMS layer not working until zoomed

I created a toggle button to add and remove wms layer from the map. In the default zoom level, it is working fine. But when I remove layer and zoom in or out, then do "Add Layer", the layer does not ...
3
votes
3answers
3k 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 ...
5
votes
1answer
3k 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
214 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
1k 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
2answers
386 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
392 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
1k 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
615 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
214 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 ...
6
votes
3answers
7k 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
276 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 ...
4
votes
3answers
5k 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
245 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
356 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
454 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
133 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
1k 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
381 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
237 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', ...
5
votes
3answers
747 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
2answers
3k 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 ...
4
votes
2answers
1k 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
167 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
962 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
2k 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
396 views

Leaflet: maximum number of layers?

Is there a limit to have many layers you can have in a leaflet map?