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

learn more… | top users | synonyms

41
votes
8answers
7k views

How to create Vector Polygons at the same amazing speeds GISCloud is able to render them?

EDIT (outlining new bounty added): I have added the largest bounty possible to this question in hope of getting a very detailed answer. Your solution should outline a step-by-step guide utilizing open ...
31
votes
3answers
11k views

Should I use OpenLayers or Leaflet?

I was debating with one of my collegues on OpenLayers v/s Leaflet. I made a point that OpenLayers is much better API if we wish to build a project, where you need direct connectivity to the Geoserver ...
15
votes
3answers
2k views

Database for offline slippy map tiles

I currently have an offline HTML5 map application (built on Leaflet & KendoUI with custom additions) that has an app manifest and works fine on multiple platforms. However, I am hesitant to use ...
14
votes
8answers
9k views

How to Create Animated Cluster Markers in OpenLayers/Leaflet?

I want to use Leaflet due to the smooth transitions which Openlayers seems like they can't match. I specifically require the ability to cluster markers with custom styled marker groups. The best ...
13
votes
5answers
735 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: ...
12
votes
5answers
2k views

Visualizing large datasets with Leaflet

When using Leaflet to visualize a large dataset (GeoJSON with 10,000 point features), not surprisingly the browser crashes or hangs. A sub-sample of 1000 features from the same dataset works ...
11
votes
7answers
6k views

How to convert ArcGIS Server JSON to GeoJSON?

I'm creating a web map using Leaflet, and I want to be able to grab feature layers from our ArcServer. I have successfully been able to retrieve a feature class as JSON, but Esri's JSON objects don't ...
11
votes
2answers
1k views

Understanding web mapping tools

Before I start, this is going to be a general question but with specific cases. I've been trying to understand GIS tools and applications to achieve the following: Build my own basemap Publish the ...
11
votes
3answers
3k views

Open source alternatives to Google's StreetView engine?

I am looking to create an open source javascript app using either Leaflet or OpenLayers. Is there any way to implement panoramic views (similar to Google's StreetView) into either of these, or any ...
10
votes
5answers
2k views

How do you convert OSM XML to geojson?

I want to take the XML output of a Xapi query and display it using leaflet or polymaps. How can I do that? Is there an easy way to convert XML to geojson
10
votes
2answers
913 views

How can I make a polyline wrap around the world?

I am using leaflet maps to create a representation of a round-the-world challenge. I would like to add a polyline which heads east from tokyo and then appears west of south america on the map - but ...
10
votes
3answers
672 views

Leaflet: how to draw curved lines?

So, I'm trying to draw curved lines in my application which is based on a Leaflet map. As far as I know Leaflet does not support drawing curved lines at the moment, so my question is really more ...
9
votes
3answers
4k views

Does Leaflet JS API provide a Geocoding service?

I am considering replacement of Google Maps with Open Street Maps and the Leaflet JS API. Does the Leaflet JS API provide a Geocoding service?
9
votes
3answers
1k views

Chart inside pop up window in Javascript

How to show a chart inside pop up window? I'm using Leaflet JS, which has support for raphael plugin http://dynmeth.github.com/RaphaelLayer/. Is it possible to create a div inside popup window? I was ...
9
votes
3answers
2k views

Examples of leaflet interactive mapping applications

I would like to develop a simple mapping application. One where users can digitize lines, polygons and points and attribute the features. The attributes will then be stored in a database for later ...
8
votes
1answer
5k views

How to get Leaflet interactivity from Geoserver WMS?

I have geoserver serving shapefiles as a WMS into Leaflet. I'd like to add interativity that shows a popup with WMS attributes in the Leaflet map when the user hovers over or clicks on a WMS feature. ...
8
votes
1answer
658 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 ...
8
votes
0answers
96 views

Mercator bias plot in Leaflet

I was inspired by this wikipedia image from the mercator projections page to hack around with leaflet. The idea was to interactively have your cursor move a continent and that it would be corrected ...
7
votes
4answers
1k views

GeoJSON too bulky - what to do?

I am using leaflet.js to allow web users to select a region. Valid regions are US states, Canadian providences, and world countries (except for US and Canada). I constructed a shapefile myself using ...
7
votes
2answers
5k views

How to show a popup on mouse-over, not on click?

Is it possible in Leaflet that popup opens on mouse-over, not on click? This is working for just one marker at a time, but I need it for a bigger number of markers: marker.on('mouseover', ...
7
votes
1answer
1k views

How to configure custom scale in Leaflet?

I have a custom WMS tileset generated using ESRI ArcGIS Server. I have successfully configured an OpenLayers page to display this basemap. The code is as follows: var map = new ...
6
votes
5answers
313 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 ...
6
votes
3answers
7k views

Creating a Bing and Google Tile Layer for Leaflet

I want to use the Leaflet Javascript Library to display both a Google and Bing Tile Layer, though I'm unsure how to construct the url. The documentation shows an example using OSM: var cloudmadeUrl = ...
6
votes
2answers
288 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.
6
votes
2answers
2k views

Leaflet / Google Map baselayer / markers not visible

New to Leaflet, currently trying to migrate a project from native Google Maps to Leaflet; having been drawn to Leaflet by the layer management and options of using better 'roadmap' style basemaps. ...
6
votes
3answers
1k views

How do I stop event propagation with rightclick on Leaflet marker?

I didn't find a rightclick event in Leaflet markers so I started listening to the mousedown event. In the method that resolves this event I check if (event.originalEvent.button == 2) { ...
6
votes
1answer
2k views

What is the default projection in Leaflet?

I've read an API documentation for Leaflet on its site, but I can't realize: what is a default projection to view maps? It was written about spherical and elliptical Mercator and Equirectangular - so ...
6
votes
1answer
3k 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 ...
6
votes
2answers
5k views

Adding/Removing Leaflet GeoJSON layers

I'm trying to show different GeoJSON layers at different zoom layers using the Leaflet API. I can load and display all three layers at once (though I don't actually want them all to show at once). I ...
6
votes
2answers
86 views

Color-code a Leaflet polyline based on additional values, e.g. altitude, speed,

I'd like to draw a GPX-track on a Leaflet map. The polyline shouldn't have only one color, but I'd like to show certain values like altitude, speed, heart-rate, temperature, cadence, slope ...
6
votes
1answer
626 views

What server and API to use for displaying complex polygons with dynamic symbology?

Background I need to interface a map into an existing website which allows the user to query a database and which currently results in a table listing population statistics per county. For example, ...
6
votes
1answer
345 views

Using Tilestache and Leaflet To Display Rasters In Native Projection

I have a collection of old Idaho state highway maps in GeoTiff format. The projection that these maps have been georeferenced in is a transverse mercator projection, called IDTM83 (Idaho Transverse ...
6
votes
2answers
653 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. ...
5
votes
2answers
466 views

What is the most common way of displaying geodata from Postgis on Leaflet?

For example, in my database I've some points with geographic coordinates. I want to display them on Leaflet JS layer. Which instruments should I use? Maybe there is some API...
5
votes
2answers
2k views

Leaflet: How to move the layer-control menu?

This might be a silly question, but I could not find a documented way to achieve this. I'd like to freely position the layer-control menu, probably to the top left near the default zoom-in/out ...
5
votes
2answers
749 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 ...
5
votes
1answer
3k views

How to open popup on mouseover in Leaflet? [duplicate]

Possible Duplicate: How to show a popup on mouse-over, not on click? I'm working with Leaflet library. I defined L.layerGroup and add some markers to the group. Can somebody help me with ...
5
votes
1answer
425 views

Is it possible to create filters based on attributes for markers in Leaflet?

I need to create filters based on attributes of markers. I have markers defined this way: var locations = [ ['AB11 5HW','17','A',57.147701,-2.085442 ] , ['AB11 8DG','3','B',57.129372,-2.090916 ] ...
5
votes
2answers
180 views

How to download Leaflet vectors in GPX format?

I would like to use the leaflet.draw plugin to allow users to digitize vectors on the map. At the end the data should be downloadable as a GPX-file. Is there any sample that shows how this can be ...
5
votes
2answers
172 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 ...
5
votes
1answer
1k views

Leaflet and EPSG 4326 Projections

UPDATE: LEAFLET fixed support for EPSG 4326 (LL84) in the latest betas: https://github.com/Leaflet/Leaflet/issues/1207 Leaflet says it supports EPSG 4326 (Plate Carree, aka ll84) projections. I think ...
5
votes
1answer
671 views

Working examples of Leaflet/Polymaps with GeoJSON tiles generated from Tilestache using Shapefiles?

I'm looking to create choropleths using GeoJSON tiles generated from ESRI Shapefiles by TileStache(or similar), in either Leaflet or Polymaps. So far reading and drawing GeoJSON from both Leaflet and ...
4
votes
3answers
321 views

Advantages of WFS over GeoJSON/KML?

I'm planning to create an online map with openlayers (2 or 3) or leaflet. I have to show some points/markers (~30.000), polygons (~500) and lines on top of an OSM map in several layers. Those points ...
4
votes
1answer
75 views

Why do these points send me to the middle of the ocean or middle of nowhere? [duplicate]

I've been beating my head against the wall trying to map some points using Leaflet + OSM. I put in some sample points (near Bellingham, WA, USA). I've checked the JSON with JSfiddle and ...
4
votes
5answers
656 views

How to get a Leaflet app with a big GeoJSON file to work on mobile devices?

I have a leaflet app which displays a GeoJSON file as a layer. It works fine in the web browser. On the mobile browser it starts up, but quits after panning around on the map. I think the reason for ...
4
votes
1answer
983 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 ...
4
votes
3answers
2k views

MySQL to GeoJSON - Formatting Issue

I'm trying to make a select on a mysql table and then write it out to a geojson file. I'm getting close but there are a few issues. Here's what I have so far: <?php require("dbinfo.php"); // ...
4
votes
1answer
69 views

toggling a list of paths in Leaflet

I drew a bus map of San Juan, Puerto Rico in leaflet.js. It's on dropbox. Using the layers control I let users toggle the bus routes they want to see. Unfortunately, the list of 45 or so bus ...
4
votes
2answers
1k 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 ...
4
votes
1answer
854 views

What is the difference between Leaflet and Mapbox?

What is the difference between Leaflet and Mapbox, and how are they used together? Like the API and what exactly are they and is Mapbox using Leaflet?