Archive

Posts Tagged ‘Leaflet’

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 :

https://docs.google.com/spreadsheets/d/1w5czPofOXVfMGiCx0wjhNLB_dJnYyw3U5yTCrn13mOw/edit?usp=sharing

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

1. Google Maps JavaScript API
2.Leaflet
3.ArcGIS API for JavaScript
4.Bing Maps JavaScript API
5.OpenLayers

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…

2nd Book Review – Interactive Map designs with Leaflet JS Library How-to

July 23rd, 2013 Comments off

Again, it has been a long time since my last post. I’ve been quite busy with different projects so I can’t find any time to write on the blog. If you are wondering about my projects then you should wait for it 🙂 But I can give you a spoiler about one project : I’m also writing a book about Geo Stuff 😉

Anyway, last week Packt Publishing contact me about a book review and I’ll accept it due to its length. It is shorter than a book and it can be called as a starting guide. These series are Packt Publishing’s new series which are  publishing as an e-book or print. As it is stated in the book, the series are “Short, Fast and Focused”.

The book is written by Jonathan Derrough, who is also minor contributor to Leaflet library.

The book is composed of 52 pages and 7 small how-to chapters. You can access contents below :

  • Getting started with Leaflet (Simple)
  • Using Leaflet on mobile (Simple)
  • Creating markers with popups and handling events (Intermediate)
  • Creating layers and layer groups (Intermediate)
  • Using Leaflet map controls (Intermediate)
  • Using GeoJSON to create stylish map objects (Intermediate)
  • Designing interactive choropleth maps (Advanced)

As it is seen from the contents, book is for everyone in geo development. There are different topics according to their levels. Each chapter is complete within itself. You can easily learn what’s going on and what’s behind the code when you are reading.

If you want to dive in geo development with Leaflet and don’t want to read hundred pages books, this book is for you. It just makes a good start with its background.

As I wrote on previous book review, please buy the book to support writer instead of downloading the illegal copies. This will courage more people to write this kind of books to support Open Source projects like Leaflet.

PS : You can get book from these sellers :

Amazon.com
DZone
Goodreads

Categories: GeoWeb Tags: , ,

After a long period and Geo Products I Used in 2011

January 4th, 2012 Comments off

It has been a very long time (almost a year) since I wrote a blog post.

It was a great year both in private and work life. First off all, I got married and this is the greatest thing in my life. It was a busy period to do a wedding ceremony but it was worth it. I would like to thank God from here to join me and my wife together 🙂

Anyway, lets come to main topic which interests this blog : my work life. It was also a good year for my development side.

My development side started to move back to Open Source projects again after an “ESRI” period. Don’t get me understand wrong, ESRI has a great products both on desktop and server side and we are still using ESRI products in our environment, but the license costs are getting more and more even for large organisations like us.

There is also a Google Maps side for this story. I’ve been using Google Maps since it has an API and I’m also a “Qualified Developer for Google Maps JS API”, but the announcement of Google that Google Maps is no more free makes us to think about like other developers or companies. Google Maps has still good map coverage than Bing Maps or OSM, but we had to start looking for the alternatives. We are still using Google Maps JS APIs in our products, but we are thinking more than ever to shift from the API.

Last part of my development life is the Mobile. Mobile is getting more important and we don’t want to get behind from the technology. Most of our managers got an iPad and we started to build apps for mobile, especially for iOS. Some of them may be remember that I have one native and one web app for mobile, which are iExtMap and ExtMap Touch, respectively. I know some people expect to update these products, but I can’t find any time to update them. Hope I can find time this year to update them 🙂

I wrote a summary about 2011 and I just want to finish my post with the popular geo products I’ve used in 2011. I’ll also write about them if I find time.

Wish you all a good year 😉

Geo Products I used in 2011
Desktop :
– ESRI ArcMap (I can’t remember the new name) with Arc2Earth pluging :
Still great at working and symbolizing the data. Arc2Earth is a also a great product to export tiles and GeoJson to our web products.
– QGIS :
Works great with PostGIS to import/export data

Server Side :
– Oracle Spatial (as DB) :
Nothing to say about it, it’s still the best option in Enterprise level in Turkey due to support
– PostGIS (as DB) :
It is my new favorite to work with easily, but the support in Turkey is not good. So we have confusion to switch over in enterprise level.
– ArcGIS Server :
It is the complete product that you can do everything, but licensing is very expensive in Turkey if you want to make a load-balances structure with 6-10 machines.
– Tilemill (can be in desktop side too) :
This is my new favorite tool used for export tiles due to its UTFGrid support. MBTiles is also a great spec from DevelopmentSeed. Thanks a lot for these GREAT TOOLS, hope 2012 will be a great year for you.

API Side :
– Google Maps JS API v3 :
Still the king of APIs due to its easy use and documentation. Integration with Fusion Tables is a great plus the API.
– Leaflet :
This is also my new favorite with TileMill. The compactness and performance is killing me. I would also want to thank CloudMade to make this available.
– OpenLayers :
This was my old favorite. It has support for almost any thing in GIS but this also make it very slow library if you compare it with Google Maps API or Leaflet.
– ESRI JS API :
I’m very new to this API, but I have to be familiar with it 🙂 One thing is annoying that the usage of DOJO Toolkit with the API.