saoirse
saoirse

Reputation: 53

using gps on a static map in android?

I have a map view in my application and I am able to show the current GPS location on this map easily enough. However I want to be able to offer an offline capability or at least a limited connectivity option.

I decided the best way to do this would be to use a static google map but as i have to use webview to display this and it doesnt extend mapactivity is there anyway i can still get the mylocation overlay to work with a static map? Or do i need to always have that connection for live maps?

Upvotes: 4

Views: 947

Answers (1)

scottyab
scottyab

Reputation: 24039

I guess you could get their location at the time they last had connectivity and pass the coordinates to the static map api to place marker on map image.

Then you could implement a LocationChangedListener and OnLocationChanged (and if connection) reload the static map with the new location marker.

Also you don't have to use Webview, I've used static map images as URL in AysncImageView (but you could just use a standard Imageview and use something like AQuery to download Async)

Upvotes: 1

Related Questions