Info window implementation
Description
Implements info windows.
Screenshots
Technical details
When an InfoWindow is shown, the corresponding view – which is created based on marker's title and snippet if necessary, and to which a white bubble is added if necessary – is positioned correctly on top of the map.
Tests
- Install https://github.com/googlemaps/android-samples/tree/main/ApiDemos/kotlin
- Use the markers demo
- Info windows are shown when markers are clicked
- Info windows move to stay at the top middle of views when the icons are rotated using the slider at the top and when map is moved
- Info windows close when the map is touched
- Toasts indicate when info windows are closed, clicked, and long-clicked
- Info windows change style corresponding to the selection at the bottom left instantly
- Switching styles at the bottom left does not trigger any toast
- Touching the same marker that is already opened triggers a "close" toast, this is expected per docs
- Draggable markers do open an info window when clicked, but Mapbox / MapLibre is very picky about what counts as a touch and always likes to start moving the marker instead
- Note: the "flat" option does not have any effect because flat markers are not implemented in general in microG
Issues
10 commandments of code reviews
Note: this MR contains the commit in !57 (merged), because it depends on it to work for draggable markers.
Edited by Fynn Godau