Google and Microsoft web map services with access by key
Posted: 05 Sep 2016 18:43
Around 10 years ago I added online access to TransDEM, first WMS, Web Mapping Services, then Map Tiles, both well-known industry or de-facto standards. Map Tiles, also called Tile Maps, have become more and more popular over the years. One of the reasons probably is that Open Street Map makes use of them. Originally, however, these were introduced as free services by Google, Microsoft and a few other commercial data providers.
The map tile web service interface itself is rather simple, but the composition of the request URL is not. The URL asks for a specific tile by its address and that address automatically implies georeferencing. In return, you get a bitmap of 256 x 256 pixel, one tile. The whole thing is designed as a quadtree and the underlying projection is standard Mercator. But you will need some background knowledge to translate from a geographic location to a tile address. Google and Microsoft offered Javascript libraries to handle this for you, for the most typical application domain, the website.
With more powerful servers on hand, Google and Microsoft later offered new interfaces, that made it easier for the client side. While still using the quadtree structure internally, the newer interface asks for direct input of geographic coordinates and the resulting bitmap can have somewhat more flexible dimensions. URL compositions now look similar to WMS.
There is a catch. The newer interfaces are bound to new services and access is no longer anonymous. Instead, they require a key.
Basic keys are “free” with both Google and Microsoft, but, as we all know, there ain't no such thing as a free lunch. You pay with your data, or, as someone put it, when consuming a free product the user himself will become the product.
Hence, I have always been very reluctant to implement other than anonymous access clients in TransDEM.
During the last couple of months, however, a number of indicators have appeared which could suggest that at least Google may shut down the original anonymous map tile service in the not-so-distant future.
From the feedback I receive, many TransDEM users start with Google Earth. Not everyone is used to reading maps, particularly topographic ones. Aerial images seem easier to understand, and for many areas you can blow them up to the utmost detail. Google Earth functions in TransDEM are easy to handle, with very little preparation needed. But when the number of images increases the whole process becomes a bit cumbersome and you will look for partial automation. Map tiles offer remedy. A different interface to basically the same data. TransDEM will handle image acquisition, georeferencing and conversion to UTM. And, when working along a path, the map tile client even handles entire series of images.
We would lose all this automation for aerial images if Google and Microsoft retire their classic tile services.
For that reason I have decided to add support for the newer map services that require a key. I will try to hide the underlying procedures to contact the new servers as much as possible and plan to integrate this new variant in the existing Map Tile client. In the ideal case users will not notice any difference in the resulting bitmaps between the classic and the key-based servers.
TransDEM will not come with any key pre-installed. It will be completely up to the user to obtain such a key through the Google or Microsoft registration channels. Even with a key, access to their services will be limited. Free keys will have a lower quota than paid keys, but should be sufficient for our purposes. TransDEM will offer a dialog to store the key in the settings, separate from the common map tile settings.
If you have used Rail Simulator/Railworks and their Google Maps support, you may already have come across that key mechanism.
At the moment I do not yet know how long the implementation of this new service interface will take, since I have just started with the basics. I'll keep working on it and will update you once there is news.
The map tile web service interface itself is rather simple, but the composition of the request URL is not. The URL asks for a specific tile by its address and that address automatically implies georeferencing. In return, you get a bitmap of 256 x 256 pixel, one tile. The whole thing is designed as a quadtree and the underlying projection is standard Mercator. But you will need some background knowledge to translate from a geographic location to a tile address. Google and Microsoft offered Javascript libraries to handle this for you, for the most typical application domain, the website.
With more powerful servers on hand, Google and Microsoft later offered new interfaces, that made it easier for the client side. While still using the quadtree structure internally, the newer interface asks for direct input of geographic coordinates and the resulting bitmap can have somewhat more flexible dimensions. URL compositions now look similar to WMS.
There is a catch. The newer interfaces are bound to new services and access is no longer anonymous. Instead, they require a key.
Basic keys are “free” with both Google and Microsoft, but, as we all know, there ain't no such thing as a free lunch. You pay with your data, or, as someone put it, when consuming a free product the user himself will become the product.
Hence, I have always been very reluctant to implement other than anonymous access clients in TransDEM.
During the last couple of months, however, a number of indicators have appeared which could suggest that at least Google may shut down the original anonymous map tile service in the not-so-distant future.
From the feedback I receive, many TransDEM users start with Google Earth. Not everyone is used to reading maps, particularly topographic ones. Aerial images seem easier to understand, and for many areas you can blow them up to the utmost detail. Google Earth functions in TransDEM are easy to handle, with very little preparation needed. But when the number of images increases the whole process becomes a bit cumbersome and you will look for partial automation. Map tiles offer remedy. A different interface to basically the same data. TransDEM will handle image acquisition, georeferencing and conversion to UTM. And, when working along a path, the map tile client even handles entire series of images.
We would lose all this automation for aerial images if Google and Microsoft retire their classic tile services.
For that reason I have decided to add support for the newer map services that require a key. I will try to hide the underlying procedures to contact the new servers as much as possible and plan to integrate this new variant in the existing Map Tile client. In the ideal case users will not notice any difference in the resulting bitmaps between the classic and the key-based servers.
TransDEM will not come with any key pre-installed. It will be completely up to the user to obtain such a key through the Google or Microsoft registration channels. Even with a key, access to their services will be limited. Free keys will have a lower quota than paid keys, but should be sufficient for our purposes. TransDEM will offer a dialog to store the key in the settings, separate from the common map tile settings.
If you have used Rail Simulator/Railworks and their Google Maps support, you may already have come across that key mechanism.
At the moment I do not yet know how long the implementation of this new service interface will take, since I have just started with the basics. I'll keep working on it and will update you once there is news.






