RyanInBinary
RyanInBinary

Reputation: 1547

MapView without Zoom Levels Android

I'm using the MapView object for my app and it's working really well. But I noticed that it "locks" to zoom levels, even if you don't use them. For instance, if you pinch to zoom and barely do it, the view will "snap" either forward or backward to whatever the closest zoom level is. The native google maps application does not do this at all. You can barely pinch, and it'll accept it (there are no 'hard' zoom levels built in). How can I get my mapview to mirror that?

[Edit]

Since there is no way possible to do this with Android currently, I opened a ticket on the Android code project page. If you face a similar issue, please star it so it will get Google's attention and we can have a better mapview/mapactivity going forward. https://code.google.com/p/android/issues/detail?id=38788

Upvotes: 2

Views: 205

Answers (1)

aromero
aromero

Reputation: 25761

The native Google Maps application doesn't use tiled images, they somehow render vector graphics, so they can scale the maps with more precision (notice that you can even change the view angle and get a pseudo 3d view).

The MapView we (developers) get uses tiled images. This means that for every zoom level you have pre renderer images of the map. This also means that you can't have any kind of precision, you have discrete zoom levels (ranging from 1 to 20 or so) and that's it, you don't get anything in between those two zoom levels. So if you are let's say in zoom level 15 and you barely pinch, you will get zoom level 14 or return to 15.

EDIT: Google has released Maps v2, which uses vector tiles and seems to be similar to the one used in the Google Maps application:

The Maps API now uses vector tiles. Their data representation is smaller, so maps appear in your apps faster, and use less bandwidth.

Upvotes: 3

Related Questions