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

learn more… | top users | synonyms

44
votes
8answers
8k 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 ...
34
votes
4answers
15k 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
3k 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
11k 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
9answers
9k 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 ...
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: ...
13
votes
6answers
3k 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 ...
12
votes
3answers
4k 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 ...
11
votes
2answers
2k 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 ...
10
votes
5answers
3k 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
1k 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
4answers
9k 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', ...
10
votes
3answers
1k 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 ...
10
votes
3answers
3k 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 ...
9
votes
3answers
6k 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
1answer
193 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 ...
8
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 ...
8
votes
1answer
6k 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
855 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
2answers
9k 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 ...
7
votes
1answer
6k 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 ...
7
votes
1answer
4k 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 ...
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
4answers
5k 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
5answers
386 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
732 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 ...
6
votes
3answers
9k 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
1k 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...
6
votes
2answers
620 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
2k 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
147 views

LeafletJS animated marker with video

I have used the leaflet.animatedmarker from openplans on GitHub to create a marker that moves along a line. I also have added a video that will popup above the line. This plays fine with the marker ...
6
votes
2answers
331 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
711 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
77 views

Data Feed for Space Weather / Aurora

I am building a map application for a northerly area and would love to bring in a feed of northern lights prediction/probability (like below). http://www.gi.alaska.edu/AuroraForecast Does anyone ...
6
votes
1answer
705 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
840 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. ...
6
votes
4answers
204 views

How to use Leaflet to efficiently show parts of a massive dataset?

I keep seeing non-GIS web developers running into this problem, and I'm not sure what the solution is. There is some dataset of thousands of items. We want to show a map to the user, with the ...
6
votes
3answers
277 views

How to generate image tiles from custom geo data for use with Leaflet

Migrating a webapp from Google Maps API V3 to OSM + Leaflet, which displays custom data that consists of lots of lines and points, on a background map. When this custom data is drawn by Leaflet on ...
5
votes
3answers
217 views

Guidance when to style your features in Tilemill vs. Leaflet?

I've found this generally to be dependent on each project's goals (or what the client wants), but when you have the options, what any rules of thumb or guidelines do use you in a project to determine ...
5
votes
1answer
1k 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?
5
votes
1answer
4k views

How to change Leaflet Map panes layering order (z-index)?

Leaflet maintains that the Map panes elements contain all layers added to the map. The difference between many of the Map panes is strictly the z-index order of layering. I would like to use a ...
5
votes
1answer
112 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 ...
5
votes
6answers
2k views

3D perspective on maps in Leaflet, CartoDB?

Are there any JS library out there that would render normal, flat maps (like Leaflet) into a perspective map like this one, on the web: Also, anyone seen anything that could turn CartoDB data into ...
5
votes
1answer
1k views

Trigger a click event on a leaflet map?

Is it possible to make a click event occur at a particular lat/lon on a leaflet map? I would like to make a popup appear that is associated with a point at a particular location. I have tried several ...
5
votes
1answer
3k views

setStyle() function for GeoJSON features - Leaflet

Ok, since I already asked a very long question about this, but since it didn't get any new replies for a while, and not to get confused in details, I will keep this one simple the best way I can. If ...
5
votes
1answer
5k 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 ...
5
votes
2answers
3k 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
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 ...