Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am working on a web-based mapping system and I'm trying to figure out the best/most appropriate library to use. There are a few of them about and they each have pros and cons. Even after trying a few of them out I still think I could do with getting a better overall picture.

Edit: I should really specify what I'm looking for. If anyone can post a link to a decent comparison of available libraries that would be great. If everyone could also post facts/features/criticism/whatever I will endeavour to add it to the list below.

The list so far:

  • Google Maps
  • Microsoft Virtual Earth
  • MapQuest
  • Leaflet - "The comment smaller, faster, newer, and more straightforward can also be read as less features and less tested." -Geographika (see below)
  • ESRI - Works best with ArcGIS Server (see below). Google Maps and Bing maps extensions are also available, letting you use the ESRI API with Google/Bing maps (though this is true of most libraries).
  • Yahoo Map API's
  • Via Michelin
  • OpenLayers - Extensive documentation and a good amount of functionality plus the ability to use different map providers.
  • Mapquery - The MapQuery project has the very worthwhile goal of combining OpenLayers and jQuery. The base functionality is there but the project is still quite young. If you're particularly keen on the idea of OpenLayers + jQuery, or if you want to contribute to a JavaScript Mapping Library then get involved and contribute your efforts (please do! I want to use it but don't have the time to contribute). However if you just want to be an end user, or are new to this area it may not be for you. Update 19/09/2011 - MapQuery has been released and now has some useful documentation!
  • Mapstraction - Makes things very simple, especially working with multiple basemap providers. However it is still a work in progress and the functionality is lacking in places, as is the documentation. (E.g. "A GeoJSON object with the type “FeatureCollection” is a feature collection object." Not very informative.) It appears that it is still being actively developed but as of 4/4/11 there hasn't been a commit on Github since January.
  • deCarta - Has a mobile and desktop javascript - first is HTML5/CSS3 compliant and the second has more browser compatibility. Source code provided. Friendliest developer terms for a commercial API. You are allowed to brand the map and there are several different map styles. You can choose NAVTEQ or OSM data. They also have several Mobile APIs as well. - editied by TheSteve0 - a deCarta employee
  • Cloudmade
  • Polymaps - Makes it very easy to composite raster and vector data from many different sources. Lets you easily add your own colouring, grouping, and interaction. Runs quickly, manages background tile loading well, and is only 30k of Javascript. One potential down side: it uses SVG which means it does not and will not work in MSIE 7 or 8. It works great in every other browser and should work in IE9
  • Jump - jump is a light weight maps library that works on its own, meaning, it is not a wrapper for OpenLayers or GoogleMaps API. Currently it is under development, but a lot of essential features work well.
  • ModestMaps - Another smaller, faster, newer JS mapping library from the makers of Mapbox and TileMill.

My recommendation:

OpenLayers has long been the best available open source library and it's the one I am currently using. You can do a lot with it and it supports most data types. However it's not the best for everything. For example, Leaflet seems smoother in many ways, with image fading and other visual tweaks. If you're into jQuery you might like to check out MapQuery which is like a combination of jQuery and OpenLayers. Basically, don't take my recommendation!


locked by PolyGeo Oct 3 '15 at 1:11

This question's answers are a collaborative effort: if you see something that can be improved, just edit the answer to improve it! No additional answers can be added here

I guess one important question is do you have access to ArcGIS Server? If you do the ESRI Javascript API is very good, if not one of the options you listed above would likely be a better choice. – badkins Apr 1 '11 at 14:27
Yahoo, MapQuest, and Esri also provide mapping APIs. – Bjorn Svensson Apr 1 '11 at 14:32
I don't have access to ArcGIS. Is that a requirement of the ESRI API or does it just improve it? – Mr_Chimp Apr 1 '11 at 15:11
@Bjorn Svensson - Do you have any experience with those APIs? Any insight you can offer? – Mr_Chimp Apr 1 '11 at 15:12
For those using Google Maps, you may want to take a look at the new usage limits that will take affect in 2012:… – Casey Oct 27 '11 at 12:40

18 Answers 18

up vote 82 down vote accepted

Commercial APIs (Google,Bing, Yahoo)

Using any commercial API leaves you at the mercy of whatever changes the provider makes to the API or Terms of Service. What happens for example if suddenly your local government portal that uses Google Maps suddenly has adverts popping up all over it? Want to reuse your JavaScript Google Maps code for an Intranet site? You'll find yourself having to pay the $10,000 licencing fee.

Microsoft often have more defined and fixed terms for their services (if paying) so there may be less of a risk here.

The recent backlash against Twitter is a good example of developers having an API that changed beneath them. If you aren't paying for a service then you (or your system) are the one being sold.

Update - Google starts charging for use of their maps from October 2011. I hope some of you got out in time..


As others have mentioned if you are using an ESRI stack then the ESRI JavaScript API will no doubt work well on top of it. Coming from a GIS background ESRI have probably thought more about traditional GIS tasks and features than the "neo-geography" web-giants (though this is just an opinion/feeling).

OpenLayers has built in support for ESRI REST layers, and if you are looking to reuse your code for non-ESRI based websites then again an open API serves you best.

Use OpenLayers...

I can't really think why developers would use an API other than OpenLayers. Opensource projects lead to related opensource projects so there are a wealth of reusable components out there such as the GeoExt library, MapQuery, and GeoPrisma.

I'll just add that just because a project is opensource does not automatically make it better than commercial equivalents - but the OpenLayers API matches the commercial competition in this case, and the ability to see how the source works, the unit tests, the build scripts etc. mean that you can easily build new features on top of it.

Update - there has been some recent criticism of OpenLayers, mainly related to complexity, styling, and size. There have been counter-arguments made to these here and here by Christopher Schmidt one of the lead developers of OpenLayers.

It is worth noting that if you need a simple opensource mapping API then take a look at Cloudmade's Leaflet.

The comment smaller, faster, newer, and more straightforward can also be read as less features and less tested.

Scan the API documentation for Leaflet and OpenLayers. The latter includes items such as WFS layers, editing tools, and SLD support. It has also been tested in many different environments, and works in IE6 (allowing government and local authority users).

For simpler display of spatial data Leaflet looks ideal, and easier to get started. However I'll be sticking with OpenLayers for more feature-rich GIS applications.


One possible downside is often new innovations are seen first in commercial providers' systems - however these nearly always filter through to OpenLayers in time.

Finally I'm sure there are certain scenarios where other APIs are more suitable - on custom hardware, to fit in with an organisations other IT systems, or if you already know an API inside-out and can get a system developed in half the time.

All the APIs you mentioned are capable of producing great online mapping systems, but your choice should also fit in with you or your company's future development needs.

+1 4 openlayers – CaptDragon Apr 1 '11 at 17:38
+1 for "choice should fit future needs" – mwalker Apr 4 '11 at 16:07
There's no real "correct" answer but this is a good one! – Mr_Chimp May 26 '11 at 15:25
There are a few great reasons not to use OpenLayers. I documented them on my site. Mainly, it's rather gigantic, old, and, for not-great reasons, hard to use. Check out Leaflet or Modest Maps, both of which are smaller, faster, newer, and more straightforward than OL. – tmcw Jul 22 '11 at 14:14
To be fair to Google Maps, the charges only apply once you hit a relatively high 25,000 hits on 90 consecutive days - see usage limits – Stephen Lead Nov 19 '14 at 1:25

There is a new player on javascript mapping front - Leaflet. Developed by CloudMade under BSD licence.

Looks really promising.

enter image description here


Update: Pretty exhaustive comparison of FOSS libraries by German Carrillo can be found here:

enter image description here

Wow this seems to be an impressive library. I am surprised I wasn't aware of this one. – dkroy Jul 22 '11 at 20:45
Here is a comparison of leaflet and openlayers navigation behavior. – dkroy Jul 22 '11 at 21:28
Nice flowchart. Leaflet is actually really nice. – Mr_Chimp Oct 27 '11 at 15:32
After trying to use Leaflet for some more complex things I must admit that it is fairly limited compared to OpenLayers or GeoExt. It is very easy to set up and looks very nice but there is a limit to what you can do in terms of interactions. Again though, each has it's place. – Mr_Chimp Mar 22 '12 at 15:18
Updated copy of the chart (from January 2012) is available… – Will. Dec 4 '13 at 18:22

Go OpenLayers. I had a Google Maps / arcgis api project and about a year ago, i decided to try openlayers. The more i worked with it the more i saw how awesome it is. So i decided to migrate. I cut down 30 - 100 lines of google code into 1 - 3 lines over and over again throughout my code. Simply because openlayers had funtions for what i wanted to do and was having to manually code it in for google maps.

I know this might not be the comparison of all API's you are looking for, but i just wanted to put in my 2 cents.

It's all good. Thanks for your input! I'm not sure there's a right answer for this so opinions and anecdotes are useful. – Mr_Chimp Apr 1 '11 at 15:22
+1 I'd always chose OpenLayers over Google Maps if the task is to display more than a hand full of markers. – underdark Apr 1 '11 at 18:51

CartoDB is a tool for analyzzing, vizzualising and sharing your geospatial data in PostGIS. It's an open source geospatial database platform that provides an SQL API layer. It allows developers to make querys to a cloud PostrgreSQL + OpenGIS database optimized to geospatial purposes.

enter image description here

+1 for CartoDB. Easy to use, and quite powerful. – pconcepcion Jul 27 '12 at 17:18

One more time, you should also include Mapquery to your list (based on top of jQuery). Vmx clone seems to be particularly active.

By the way, I would provide again Laurent Jegou's benchmark (PDF, french). It is a global outlook on web mapping solutions (both client and server). Regarding your need, it can be a good start to exclude some of them.

  • edit June 2011 : You can also add Mapiator to your first post
  • edit July 2011 : Jump reference added into first post
  • edit August 2011 : Mapquery is officially out!
+1 for MapQuery (OpenLayers + JQuery) – geographika Apr 1 '11 at 16:56
OpenLayers + jQuery sounds ideal! Is there any documentation for it? – Mr_Chimp Apr 4 '11 at 9:10
@Mr_Chimp > from what I know there is no documentation yet. Just a poor wiki ( ) and a mailing-list : – simo Apr 4 '11 at 10:28

I'd like to know a bit more. Licensing can be an issue with some of the libraries.

Others you can look at are deCatra and Cloudmade.

Do you have any experience with deCatra or Cloudmade? Any comments or criticisms? – Mr_Chimp Apr 1 '11 at 15:13
I've been playing with it a bit, they've got a [](good dev center). – James Fee Apr 1 '11 at 15:38

I compare (with highlights & notes) the code required to do a simple, specific & common task in:

  • MapQuest
  • Google Maps
  • bing
  • Ovi
  • Esri
  • OpenLayers
  • jQuery Geo


The post is for a presentation I gave on jQuery Geo, which is sadly missing from your list.

That's a good article. I like your colour coding! Very good idea. – Mr_Chimp Jan 9 '12 at 10:55
jQuery Geo FTW! – Sameer Alibhai Nov 26 '14 at 19:07
Thank you @SameerAlibhai! Stay tuned, we will be publishing Release Candidate 1 soon. – ryanttb Nov 26 '14 at 23:09

I'm not competent to do a full comparison, but I've done three different small projects with Polymaps and can comment on that. Its main strength is it makes it very easy to composite raster and vector data from many different sources. It can meet all your requirements, particularly in letting you easily add your own colouring, grouping, and interaction. Polymaps is also quite efficient: it runs quickly, it manages background tile loading well, and it's only 30k of Javascript.

The primary drawback with Polymaps is it uses SVG which means it does not and will not work in MSIE 7 or 8. It works great in every other browser and should work in IE9, but I'm not sure how well tested it is. SVG is also a strength: it's easy to program and the rendering looks great, particularly scaling vector and raster features in small increments.

One caveat about libraries: if you want to use Google's raster tiles as a basemap you must use their Javascript libraries. OpenStreetMap, etc have much more permissive licenses that allow your choice of libraries.

(This answer is from 2011 and a lot has changed. Polymaps is no longer maintained. At this point Leaflet is the preferred open source library.)

Just an update on my answer; Polymaps hasn't had any development in a couple of years. It's still an interesting library with some unique abilities, but I wouldn't use it for a new project. These days I'm using Leaflet. – Nelson Apr 8 '13 at 14:36

I you want to visualize a globe within the browser Cesium is a nice one. (Works without plugin but browser Needs WebGL support)

Can display 3D, 2D and 2.5D view

Cesium supports 3D, 2D and 2.5D

Support for different raster/vector formats (KML etc.)

Support for differnet raster/vector data

Free control the Camera and Camera flights

Control the camera

... and everything within (modern) browsers.

wow, this is realy very nice project! :) – Krystian Feb 12 '13 at 8:34

I am a cartography grad student and a newcomer to web mapping, but I've been working on a project to compare the different technologies out there and put together a basic "how to" guide for getting started with web mapping. My analysis is by no means comprehensive, and I've been trying to get a sense of each library through playing around with them and through posts like these from more seasoned programmers. I'd be delighted to get any feedback.

(+1) Thank you for your contribution--welcome to our community! – whuber Jul 25 '12 at 15:27

I found comparison among google fusion tables, polymaps, openlayers, and Cartographer.js with example images under :


Mapfluence from Urban Mapping is also in the mix. Hosted mapping platform that offers web-based geoservices, accessible RESTfully and with JavaScript (improved docs/tutorials en route) API. Or OL if you want it. We render our own base tiles, have a massive catalog of on-demand data,and support data and other visualization queries.

Check out the O'Reilly webinar on Wed about geoservices + big data for an overview of what is what in geo.


You could also have a look at Geomajas. This is a GIS framework which is written in Java (including a Java client using GWT). However, there is currently a plug-in in progress to provide a full client-side API in JavaScript. Not quite stable yet but worth a look. The advantage of using Geomajas is the strong integration between back-end and client which has a few advantages including the ability to easily offload work to the server and added especially for security.


I would recommend ammap: They used to have flash maps, but recently introduced JavaScript maps with a lot of great features.


An interesting methodology can be found to compare features you want from JavaScript mapping libraries (not restricted to this use case) It was presented at the NACIS 2012 event by Richard Donohue & al.. The interesting part is about how they makes classification depending of the purpose and required features.


If you are looking for a data visualization library, check out Highmaps, from the people behind Highcharts (myself included - currently employed as a software developer). It's free for non-commercial use, works great with mobile browsers (full touch support) and old IE down to IE6. Supports advanced dynamic features like drilldown and rich tooltips.

enter image description here enter image description here

Fair enough, edited. – Oystein Jun 25 '14 at 11:29

I found this post after a search for a comparison of current web mapping toolkits. I think it is still mostly relevant. However, I wanted to share OSGeo's comprehensive list of toolkits as an additional resource.


May be you can also consider Heron . It is built on Ext and open layers together they have many templates that you can customize .


Not the answer you're looking for? Browse other questions tagged or ask your own question.