Posts Tagged ‘google maps js api’

Web Mapping APIs’ Vector Performance Comparison

June 1st, 2014 Comments off

It’s again a lot time since I wrote a blog post. I’m in a very busy schedule these days so I can’t find any time to write or share except Twitter. Last week I joined a conversion with Zev Ross and Mano Marks on Twitter about web mapping APIs’ vector performance. Then I realized that I wrote a paper for a national GIS conference in September 2013 and I have not shared with any of the results. After the conversation, I started writing this blog post. Before start, I want to emphasize that results of the paper should not be a real guide nor a real usage test.

This paper only shows the vector loading test results of 5 mapping APIs: Google Maps JS API v3, Bing Maps JS API v7, ESRI ArcGIS JS API v3.6, Leaflet v0.6.4 and Openlayers v2.13.1. All tests are done on Windows 8 OS due to lack of Internet Explorer (IE)  in other operating system. IE 10 is used as a main IE test browser and IE 7, 8 and 9 are tested in compatibility modes in IE 10. Chrome (v29), Firefox (v23) and Safari (v5.1) also used as an other test browsers.

For testing purposes, a province of Turkey (Muğla) is used in GeoJSON format in following vertice numbers : 40K, 10K, 5K, 2K, 1K and 500. Some APIs’ have native GeoJSON support, but to be fair in reading the GeoJSON, a simple JavaScript function is written and used in all tests in different APIs. After loading the GeoJSON file, all vertices in polygon are iterated through and an array of points is created. Then this array is added to map. This process is also tried 30 times to get average load times. Then each test on each browser is also run 5 times to make sure the values are normalized. At the end we have  210 tests for each Mapping API (5 Reloads X 7 Different Browsers X 6 GeoJSON files) and province polygon is loaded for 6300 times to get these results. The results of all the tests are shared as a Google SpreadSheet from the following address :

As a result of the test, Mapping APIs are ranked as follows :

1. Google Maps JavaScript API
3.ArcGIS API for JavaScript
4.Bing Maps JavaScript API

As it is stated before, this is a outdated test but it gives the idea. Openlayers is placed at the end but it is the most outdated API which also works in IE 6. At the time when we are testing APIs, Openlayers v3 is still in beta (or alpha, I can’t remember) phase and we skipped it, but we are sure that V3 will get much much better results in the following tests 🙂

Google Maps JavaScript API V3 is the best for vector presentation, but due to its proprietary license the second winner Leaflet can be a good candidate as a mapping API. Even though I’m a co-author of a Google Maps JavaScript API Cookbook, I used all of the APIs in different cases and each one has different advantages and disadvantages. These tests only shows the vector loading performance of mapping APIs and this is only one side of web mapping.

As a result, I’m not a professional test guru and there may be problems with my testing style, but these tests are only shared with you to give a rough idea to use mapping APIs when you are dealing with vector datasets. There are lots of things to consider when choosing a mapping API.

Hope to do these tests again with the new versions of mapping APIs…