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

learn more… | top users | synonyms

3
votes
0answers
369 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 ...
4
votes
2answers
418 views

LeafletJS: Load Tile Layer based on bounding box

I have a LeafletJS map application with lots of layers. I have a few layers that only have imagery for certain regions across the world. Because everything goes on a world base map. All tile caches ...
2
votes
0answers
219 views

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

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. ...
1
vote
1answer
152 views

projection error on Leaflet map

I am trying to add a converted shapefile (now a geojson) to a Leaflet basemap, using EPSG 26986, so I tried using proj4leaflet to reproject it. However, I keep getting an error message "phi2z has ...
-4
votes
1answer
933 views

How to create a layer switcher in leaflet

I had used the following layers in leaflet,now i want to switch between the 4 layers ,please tell the code to create a layer switcher control in leaflet // night layer //var osmUrl = ...
1
vote
2answers
466 views

Leaflet: Container coordinates vs Layer coordinates?

What is the difference between map container coordinates and layer coordinates? From what I gathered, the map container coordinates are always relative to the map viewport, and while layer ...
1
vote
1answer
626 views

Leaflet export to jpg

Does anybody know if there is a way to export the current view of a Leaflet map to jpg? The setup is as follows: Leaflet is hooked up to an Oracle database. Depending on user interaction, various ...
7
votes
1answer
5k views

How to Add/Remove Legend with Leaflet Layers Control?

I have two overlays http://02d0c8c.netsolhost.com/dev/lcb_census_layers3.html that can be turned on and off with a Layer Control. I’d like the legend for each layer to turn on/off along with the ...
1
vote
0answers
62 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 ...
3
votes
4answers
4k views

How to load external geojson file into leaflet map

I would like to load a geoJSON (polygon) file into my leaflet map. I have seen examples where geoJSON is embedded into the javascript code but I can't find any examples showing how it is done with an ...
6
votes
2answers
460 views

Progress bar for Leaflet map

Is there any way to show progress bar while waiting that all layers are rendered on Leaflet map? In this specific case, while geojson layers are rendered. Thanks.
2
votes
0answers
34 views

Protect our WMS map tiles to only accessible from our site [duplicate]

We are using geoserver (2.3) to serve WMS map tiles generated from mapping data we licenced. We use leaflet on the client side to show the map (part of a ruby on rails site running on heroku). Because ...
0
votes
0answers
132 views

Web App: Convert from Equirectangular projection to Spherical Mercator projection

I currently have image overlays that are output in an Equirectangular projection that I need to place into a Spherical Mercator projected map. Image generation (using GrADs software) -> Leaflet ...
1
vote
1answer
93 views

Gdal2tiles with tif projection failure

I downloaded this .tif image of the world (small version) from Natureal Earth and tried to convert it to tiles using Gdal2tiles in OSGeo4W. In the terminal, I used the following commmand: gdal2tiles ...
6
votes
5answers
351 views

Is it possible to redesign OpenStreetMaps tiles?

We have an application working with open layers and are using open street maps for the map tiles However they don't look great Is there anyway to style these maps? I read something about Mapbox but ...
0
votes
1answer
97 views

Leaflet Draw Popup text unselectable in Chrome

I have a map here: http://maps.gcc.tas.gov.au/measure.html I have some simple popups happening, and it's working well. But, I can't select the text for markers when using Chrome or Firefox. This ...
0
votes
1answer
376 views

PHP-MBTiles Server implementation with Leaflet and Wax

Using PHP tile server from infostreams with Leaflet and Wax Connector for Leaflet to visualize my .mbtiles. I upped the source and the .mbtiles on a free hosting service. I am getting a blank Leaflet ...
0
votes
0answers
130 views

How to populate an asp.net text box with values rather than display them as popups

I am using Leaflet Vector Layers from here and Esri ArcGIS Server 9.3.1 and developing in the .NET Framework. I would like to send the information that displays in a popup to text boxes when the user ...
2
votes
2answers
869 views

gdal2tiles.py generates wrong tiles / MapTiler the right ones

I'm trying to generate tiles with gdal2tiles.py and the resulting tiles are stored as 18/132639/164219. If I do the same thing with MapTiler (the GUI variant of gdal2tiles) the tile result is ...
2
votes
1answer
871 views

display a choropleth map using D3 and Leaftlet

I am trying to get a leaflet map to display a choropleth map using d3. I have written this code using samples I have found however the map just displays as the black fill, not the color classes I ...
2
votes
1answer
328 views

Programmatic conversion between GML and GeoJSON

I am modifying a .Net (C#, MSSQL) system to add some geography that I'd like to display on a leaflet map. I had originally expected to save GeoJSON directly into text strings in the DB, but after ...
3
votes
1answer
639 views

Multiple instance of leaflet on my page

I need a few pointers really; I've got a series of tabs running down the left hand of my page and on each page I have a leaflet map. Each map is based on the choropleth example but I'm running into ...
2
votes
1answer
548 views

Leaftlet and ArcGIS Server REST

I am fairly new to all of this and am looking for some guidance. Any information is appreciated! I am trying to use leaftlet to display shapefiles from an ArcGIS Server using the REST URL. I have ...
0
votes
1answer
4k views

How can I change the style of marker in leaflet (from GeoJSON)?

I'm serving GeoJSON to leaflet and by default it get a blue icon marker. I'm trying to change the style so I'll be able to use the feature properties as part of the style , but no matter what I do , ...
1
vote
1answer
413 views

GeoJSON is valid according to JSONLint but jquery gives error

I have the following GeoJSON (from webservice) { "Features": [ { "Id": "1", "Geometry": { "Coordinates": [ { "Latitude": 31.2812, ...
2
votes
0answers
152 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 ...
3
votes
1answer
337 views

What is the best practice to show GPS movements on map (Openlayers or Leaflet) using DB and Geoserver?

I have GPS unit which update the DB with Points every 10 seconds. I want to show the position in real time (as much as I can) on map using OL or Leaflet. What I did is serving the Point as Layer in ...
0
votes
1answer
736 views

How to add Mapserver layer to Leaflet?

I have a layer in PostGIS in epsg:4326. Put in in MapServer: MAP IMAGETYPE PNG EXTENT 60.0 56.0 61.2 57.4701 SIZE 800 600 OUTPUTFORMAT NAME "png" DRIVER GD/PNG IMAGEMODE PC256 ...
1
vote
0answers
16 views

Alrign Track from GPX file with roads [duplicate]

I'm looking into possibilities to align track data from a GPX file with known roads, perhaps coming from OSM. So far I'm able to show the tack as such on a map powered by leaflet. Since the app ...
1
vote
1answer
682 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
254 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
95 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
410 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
2answers
219 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
251 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
551 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
624 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
259 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
2k 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 ...
1
vote
1answer
192 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
124 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
174 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
3answers
685 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
617 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
201 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
428 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
396 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 ...
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 ...