ProximaEPFL / proxima

A social app that encourages users to visit places in order to see posts.
7 stars 1 forks source link

Navigation to map #357

Closed Aderfish closed 3 months ago

Aderfish commented 3 months ago

Fixes #347,

This PR adds navigation from the post page, challenge page, and profile page to the map. In the post page and pop up of my posts, there is a new button, MapActions, that has the pin icon. On the challenge page, clicking on a challenge navigates to the map.

To do this I made a refactor of the home page navigation to use a viewmodel so that it can be accessible globaly. I have also added the possibility to pass arguments to this navigation, so that the map can be created with the correct position.

I have modified the map a bit to have an optional initial position parameter. If that parameter is null, than the map follows the user as before. Otherwise it centers on the point of interest and does not follow the user.

A lot of the file modifications are simply adding a position field to the challenge and post details classes.

I have added an extension method to transform a GeoPoint to a LatLng, so that it is easy to reuse.

image

image

Acceptance criteria: