pingzing / trippit

An experimental Windows 10 Helsinki DigiTransit client
MIT License
1 stars 1 forks source link

[Polish] Map UX Improvements #37

Open pingzing opened 7 years ago

pingzing commented 7 years ago
pingzing commented 7 years ago

Note about zoom levels: This is actually really hard.

This is because we aren't using ZoomLevel directly. We're simulating it by creating a small bounding box around an individual point on the map, and then moving to that. We have to do that, because we need to be able to accommodate the FloatingPanel, and that's the only way to give a margin to the MapControl's SetView.

Possible solution: Figure out what a few breakpoints for which bounding box size maps to which zoomlevel (i.e. we know that a bounding box of .005 on Desktop maps to about 15.77 ZoomLevel). Using this mapping, we can track what our previous bounding box and zoomlevel were, and if our new bounding box forces us to zoom out, we can adjust as necessary.

pingzing commented 6 years ago

Alternate solution: Make the FloatingPanel's wide state...not float. It doesn't add much value, and it makes the map operations hellishly-complicated.

Doesn't address the narrow state though. Hm.

pingzing commented 6 years ago

Alternate alternate solution: Looking into the MapControl's TransformOrigin property: https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.maps.mapcontrol . We might be able to play with this and move the Y/X values around when the floating panels are open. That way we can avoid all the BoundingBox methods entirely.