We have a Qt
program written in C++
to request wms
tiles and display them. This works fine.
Now we want to display imaginery from Google Maps
and due to some restrictions in our program, we can't use javascript and we have to directly manage the url. For example, in the wms case:
www.idee.es/wms/PNOA-MR/PNOA-MR?SERVICE=WMS&VERSION=1.3.0&FORMAT=image/jpeg&CRS=epsg:32629&LAYERS=PNOA-MR&STYLES=&REQUEST=GetMap&EXCEPTIONS=INIMAGE&TRANSPARENT=TRUE&WIDTH=256&HEIGHT=256&BBOX=621921.34,4794536.07,622951.58,4801396.70
So I think the right choice for Google Maps
would be the static API.
Now, reading it I didn't find anything regarding querying by bounding box. Only querying via a center and a zoom level.
Is that the only way to retrieve an image? Wouldn't it possible to query with a bounding box without specifying a center and the zoom level and retrieve an image representing that extension? Just like with the wms
case before.
NOTE: I would like and url example if possible. We can't use javascript
for this.
Best Answer
Google Static map api requires centre,lat/lng and pixel size as well as zoom level
This is a non-JavaScript version (but python) for working out the pixel dimensions.
You will need to modify to suit your needs but the key point is that it contains
Which take a cluster of points and calculate the zoom level and centre of the map required.
http://code.google.com/p/google-ajax-examples/source/browse/trunk/nonjslocalsearch/localSearch.py