Support for Google Map

Jun 15, 2010 at 1:46 PM
Edited Jun 15, 2010 at 2:03 PM

Can you add support for Google Map, for example based on their static API, they have limitation on number of requests per user/day but with help of ITileCache it should not be a big problem? 

See http://code.google.com/apis/maps/documentation/staticmaps/

Coordinator
Jun 17, 2010 at 7:35 AM

hi Gennady,

There is no specific support for it but it can be configured. You need to fake the user agent and referer so it is not usable in a professional application.

string userAgent = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14"; 
string referer = "http://maps.google.com/maps";
var request = new BasicRequest("http://khm0.google.com/kh/v=60&x={1}&s=&y={2}&z={0}&s=");
ITileSource tileSource = new TileSource(new WebTileProvider(request, userAgent, referer, false), new SphericalMercatorInvertedWorldSchema());

I had not looked into the staticmaps api before, thanks for the link. Perhaps that is an option. It seems to be tile less but it is always possible to call it through a tile schema. It might not be as fast.

Paul