Skip to content Skip to sidebar Skip to footer

Google Static Map Without Using Google Map Api

I am using android 2.9 or something for my project. Now the project is an image button on the main activity and when a user clicks on it, the user will see a google static map. Pro

Solution 1:

yes thats quite possible but in that case you will only get a static image without zoom in/out options... u can also add markers on it...

just send a Http request with/without your markers to http://code.google.com/apis/maps/documentation/staticmaps/

save the reply in a file and that would be the map.

Solution 2:

I'm not sure I understand your question completely - but Google Static Maps API is simply a web-service.

Ie - you hit a URL, where the parameters describe what map you are after and you are returned (by HTTP) an image of the map rendered for use in your application.

Check out the Static Maps documentation. There are plenty of examples. You'll see you don't need to use any API in your project at all, you just need to construct a URL that describes the map you would like and catch the response!

Edit:

Here is a simple example of a URL your app could generate:

http://maps.google.com/maps/api/staticmap?center=London,%20England&zoom=14&size=512x512&maptype=roadmap&sensor=false

URL parameters pass in values to the web service to describe the map you would like to generate.

The URL above generates a map centered on London, England. The zoom level is set to 14 (higher numbers = a closer zoom), and the map is 512x512 pixels. If you look in the static Maps API documentation, you'll see there are many many other options you can pass into the service place markers and annotations on the map.

I hope this helps! N

Post a Comment for "Google Static Map Without Using Google Map Api"