ev-map / EVMap

Android app to find electric vehicle charging stations - compatible with community databases such as GoingElectric.de and OpenChargeMap.org.
https://ev-map.app/
MIT License
203 stars 55 forks source link

Android Auto/Automotive: Pan and zoom the map #184

Open greentux opened 2 years ago

greentux commented 2 years ago

While not possible to pan the map it would be nixe to change map scale in settings. (zoom level). Useful after solving "no POI on map".

johan12345 commented 2 years ago

The zoom level can currently also not be set manually in the template, it is set automatically to contain all POIs that are currently shown. But I think if Google adds panning to the map, zooming would be added at the same time as well.

So let's make this issue about both panning and zooming. I have requested that in the Google Issue Tracker.

PulsarFX commented 2 years ago

How does OsmAnd do this? You can use the map like it would be on the phone. 🤔

johan12345 commented 2 years ago

That is because OsmAnd is a navigation app in the AA classification and not a POI app. These have slightly different UI templates available on AA, with navigation apps more focused on displaying a navigation route and POI apps showing a list of POIs.

POI app templates include a ready-made Google Map that can't be influenced much, while navigation apps need to draw the map on their own - but get the benefit of being able to detect pan/zoom events (and, in the most recent update, also tap events).

Google enforces the separation between AA app categories pretty strictly, so as long as EVMap is not about navigation routing I don't think I would be allowed to switch to the navigation templates.

PulsarFX commented 2 years ago

Oh good to know. And here we come back to the routing from charger to charger combined with feeding live data to EvMap we talked about once ;-)

johan12345 commented 10 months ago

Things seem to be heading in the right direction for this to be possible with one of the next releases of the Car App Library: https://issuetracker.google.com/issues/264558094#comment3