The top seven alternatives to the Google Maps API

The top seven alternatives to the Google Maps API

Even free alternatives to Google's mapping API provide significant advantages. Wm Leler expands your mapping horizons by helping you pick the APIs that are right for your application

Google's Map API is one of the most popular JavaScript libraries on the web, used by more than 350,000 websites. And with good reason – it's powerful and for six years was absolutely free. It spawned a wave of map mashup websites (who initially hacked the then-private API, which Google not only tolerated but encouraged).

But Google dropped a bombshell in October 2011 when its announced it would start charging the heaviest users of Google Maps and would eventually start inserting ads for other users (as it does for videos on YouTube). Google's price was quite high – $4 per thousand map views – which had popular map-based websites scrambling to find cheaper alternatives rather than paying Google tens or even hundreds of thousands of dollars each month. By June, Google realised it had priced its maps too high and was in danger of losing most of its potential paying customers, so it dropped the price by 88% to 50 cents per thousand views. But the damage had been done. Other vendors and open-source solutions had already attracted attention as reasonable alternatives.

In fact, many of these alternatives have advantages over Google Maps beyond being cheaper (or free). Even if you are a small enough user of Google Maps that you wouldn't have to pay (you average less than 25,000 map views a day), it is worth your while to look at the alternatives.

What kind of map user are you?

This article assumes that you are a user of Google's JavaScript map API. But even if you know nothing about JavaScript and just want to embed a simple map on your website, there are alternatives. Mapbox Embed is an alternative to embeding a Google Map on a webpage, in case you don't like the idea of Google placing ads on your map.

Proprietary versus open APIs

In addition to Google Maps, there are a number of other proprietary APIs. Most proprietary APIs provide free or low-cost accounts to smaller users, as long as your maps are accessible to the public and not behind a password or other paywall.

Proprietary APIs are usually all-in-one solutions that include not just the API, but also basemaps and servers to serve map tiles to the API. This is both good (simpler to use) and bad (lack of flexibility). The main advantage of proprietary APIs is that they tend to include advanced features like real-time traffic, routing (directions), geocoding (translating addresses into locations), 3D buildings and 'bird's eye' views, street-level imagery, and information about businesses on the map.

On the other hand, some of the most popular alternatives to Google Maps API are open source. Mapping applications are incredibly diverse, and having access to the source makes it much easier to customise things to your needs.

Another advantage of open source is that you can mix and match components for your mapping solution. With Google Maps, Google controls all parts of the solution: the API, the maps, and the servers that serve these maps. Open-source map APIs allow you to pick from a large number of maps, or even create your own maps. You are also free to use your own servers, put your maps in the cloud, or outsource your map server needs.

Google Maps

Google Maps, of course, is still the 800-pound gorilla of mapping APIs. Google provides advanced features: powerful routing (including for walking, bicycling, and transit), street view, 3D buildings, weather, and traffic information. And the company isn't resting on its laurels, with a new Google Earth view and an experimental MapGL interface. Some of these features are unique to Google, so (depending on your application) you might have no choice but to use its API.

A big problem with Google is that you have little or no control. Indeed, a few years ago Google switched its Map API from V2 to V3. V3 was incompatible with V2, and Google deprecated V2 even before V3 was feature complete, causing problems for many users.

Google Maps comes with three base maps: street, satellite, and terrain. It is possible to use the Google Maps API with other maps but this is usually not a good idea because Google charges are based on API usage, even if you are not using its maps. If you aren't using Google's maps (or one of its other unique features), there is no reason to pay for them.

1. Microsoft Bing

www.microsoft.com/maps/developers/web.aspx

Microsoft has positioned Bing maps as an alternative to Google maps, especially for providing local information. A unique feature of Bing maps is their 'bird's eye' view, which gives aerial views from several perspective angles.

Free accounts for Bing maps limit you to 125K sessions or 500K transactions per year. Free accounts do not include 'bird's eye' or 'streetside' (streetview) maps. They also have educational and not-for-profit accounts, which do include free access to Streetside maps.

2. Nokia

www.developer.nokia.com/Develop/Maps

Nokia purchased Navteq (one of the major suppliers of map data) in 2007, and has been powering Yahoo maps since 2011. Not surprisingly, Nokia is largely focused on maps for mobile applications, although it does provide APIs for conventional browsers as well.

Currently, a free maps API account has a monthly limit of one million map views, which is slightly higher than the Google limit (750K / month). It also limits you to 500K searches and 500K routes per month.

3. MapQuest

developer.mapquest.com

MapQuest was one of the first providers for maps on the web, and today it's encouraging the transition to open maps. MapQuest is the only company that lets you choose between using licensed maps or open maps. Even using licensed map data, it has free accounts with no limits on map views. However, it does limit you to 5K calls per day for routing (including for multiple destinations), geocoding, and search.

The open map option – which uses OpenStreetMap and free satellite and aerial data – has no limits at all, but does not provide routing or traffic services. Unlike most non-open-source APIs, the open map option can be used for paid (non-public or password-protected) applications.

MapQuest also has servers for map tiles, which it lets you use with other APIs for free, even for heavy use. Using MapQuest's tile servers with open source APIs such as OpenLayers or Leaflet is a popular option.

4. OpenLayers

openlayers.org

The OpenLayers API is a project of the Open Source Geospatial Foundation, and is often used with OpenStreetMap maps and data. It is a very flexible and powerful API designed to be used in advanced mapping applications, but it is somewhat complicated and large. It is a mature API with lots of features, but it can be difficult to use in mobile applications since it was designed before they became popular.

5. Leaflet

leaflet.cloudmade.com

Leaflet is the newest mapping API, but has gained popularity quickly. Many of the companies switching away from Google Maps use the Leaflet API, including Flightstats (the company I work for) and Foursquare. It was designed to work well with both desktop and mobile applications and is small and fast. Being newer, it is not as powerful as some of the other APIs, but what it lacks in features it makes up for in flexibility. It has a powerful object model that makes it easy to add features or customise existing features to your needs.

Leaflet specifies access to tile servers using templates, which means Leaflet can be used with almost any online map including proprietary tile servers. If you can figure out the URL for a tile server, you can probably use Leaflet to display its maps. For example, here is the template to access Google's map tile servers from Leaflet:

  1. var tiles = new L.TileLayer(
  2.  
  3.  'http://mt{s}.google.com/vt/v=w2.106&x={x}&y={y}&z={z}&s=',
  4.  
  5.  { subdomains:'0123', attribution:'© Google 2012' }
  6.  
  7. );

Note that it is unclear whether this violates Google's terms of service or copyright, and its servers can easily block your application if they want. Luckily, there are hundreds of non-proprietary map servers that you can access. Indeed, CloudMade, the company that created Leaflet and open sourced it, makes money by charging for their map servers.

6. Modest Maps

modestmaps.com

As its name implies, Modest Maps was designed to provide the minimal features to include maps inside applications. It originally used Adobe's Flash, but was later ported to JavaScript. There are a half dozen other ports, including for Python, PHP, Processing, and OpenFrameworks, which facilitate using Modest Maps in desktop (non-browser-based) applications, native mobile applications, and on servers.

7. Polymaps

polymaps.org

Unlike other map APIs, Polymaps uses SVG to display geographic information, rendering this data directly on the browser. Other APIs use image tiles to render maps, but they still need to display geographic information (such as markers and routes) by rendering it directly. Map data can be loaded using standard formats such as GeoJSON and rendered directly.

The use of SVG enables you to use CSS rules for styling map features like roads and boundaries, including changing styles on the fly. It also allows the use of SVG transitions and animations on maps.

Polymaps makes it easy to visualise large datasets of geographic information (for example, population density, crime statistics or voting patterns). Level of detail is controlled by tiling the raw geographic data, rather than tiling rendered images, so it can be changed dynamically.

Polymaps also doesn't limit map display to fixed zoom levels, as with maps based on tiled images. And because SVG is resolution independent, it works well on devices with higher pixel count displays, such as Apple's Retina displays.

The main disadvantage of the use of SVG is that it is not fully supported on all mobile browsers; and even if supported, it uses a lot of processing power. It is also not supported at all on Internet Explorer prior to IE9 (IE8 and before used VML instead of SVG).

The future

When Google Maps was free it supressed the development of alternatives, but now the number of both proprietary and open mapping APIs has exploded. This competition is good news for developers of  applications that involve maps. Different APIs have unique features and capabilities, enabling you to pick the API that best suits your needs.

Advances in mapping APIs are also being driven by the increasing capabilities and power of mobile devices including smartphones and tablets, where there is high demand for applications based on maps.

Mapping seems to be moving toward open solutions. Even proprietary mapping products from Google and Nokia encourage crowdsourcing, enabling users to add or edit their proprietary maps. It is impossible for even large companies to keep up with all the changes to maps around the world as roads are added or changed. But although this data is supplied by users (including governments and NGOs), once added to a proprietary map it becomes proprietary (even the user or organisation who added the data has to pay to use it). It makes more sense to keep this data open, using something like OpenStreetMap.

In the slightly more distant future, all-in-one APIs like Google's will likely be split up into separate APIs, so for example a developer can use an open API such as Leaflet to draw the map and an open map based on OpenStreetMap data, while still using (and paying for) proprietary APIs for advanced features such as traffic or routing.

In addition to APIs, there are companies that help you create and host your own maps (such as MapBox and CloudMade) so that the style of your maps can match the style of your applications. There are also new APIs and platforms emerging for developing location-based applications (GeoLoqi, for example). And marketplaces will emerge for sharing, buying, and selling geographic data (such as WeoGeo).

One thing is clear though – map APIs are going places quickly.

4 comments

Comment: 1

Open MapQuest does provide a routing API - http://open.mapquestapi.com/directions/

Must say though, using Open MapQuest with Leaflet is very nice. With it being open source you can edit the style of Leaflet to suit your application, which I never sussed how to do with Google Maps. Also, I prefer the coding style of Leaflet to Google; it's a lot cleaner and is going to be even cleaner when Mourner pushes the 4.0 update.

I documented the move over on our Fubra blog back in November - http://www.fubra.com/blog/2011/11/24/google-maps-free-alternatives/

Comment: 2

Thanks WolfieZero for the link to the routing API. I must have missed it because it is not part of the Open MapQuest API; it is a separate API. Which makes it even better, since it can be used with any mapping API, not just with the MapQuest ones.

I also highly recommend your post from the Fubra blog to other people switching -- it helped me a lot back when I was trying to figure out which mapping API to use.

Comment: 4

I like this Article, Thanks for sharing this Knowledge.
Summer issue on sale now!

The Week in Web Design

Sign up to our 'Week in Web Design' newsletter!

Hosting Directory
.net digital edition
Treat yourself to our geeky merchandise!

site stat collection