New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UWP MapRenderer fixes. #724

Merged
merged 2 commits into from Mar 7, 2017

Conversation

Projects
None yet
4 participants
@indydawgy
Contributor

indydawgy commented Jan 27, 2017

Description of Change

Issues:

  1. The MapRenderer calls TrySetViewBoundsAsync before the map is ready for it. This causes the map to hardly ever initialize to the correct position.
  2. The visible region calculation gets the zoom wrong.
  3. Map can cause a crash if you rotate/zoom a lot when setting the visible region.

Fixes:

  1. Call MoveToRegion using MapControl's RunIdleAsync to have it move after the map starts rendering
  2. lat/long delta should be:
    var latitudeDelta = Math.Abs(nw.Position.Latitude - se.Position.Latitude);
    var longitudeDelta = Math.Abs(nw.Position.Longitude - se.Position.Longitude);
    rather than calculated from the center
  3. Move the visible region set into the try/catch block.

Bugs Fixed

API Changes

None

Behavioral Changes

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense
Christophe Christophe
Issues:
1. The MapRenderer calls TrySetViewBoundsAsync before the map is ready for it. This causes the map to hardly ever initialize to the correct position.
2. The visible region calculation gets the zoom wrong.
3. Map can cause a crash if you rotate/zoom a lot when setting the visible region.

Fixes:
1. Call MoveToRegion using MapControl's RunIdleAsync to have it move after the map starts rendering
2. lat/long delta should be:
var latitudeDelta = Math.Abs(nw.Position.Latitude - se.Position.Latitude);
var longitudeDelta = Math.Abs(nw.Position.Longitude - se.Position.Longitude);
rather than calculated from the center
3. Move the visible region set into the try/catch block.
@dnfclas

This comment has been minimized.

Show comment
Hide comment
@dnfclas

dnfclas Jan 27, 2017

Hi @indydawgy, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

dnfclas commented Jan 27, 2017

Hi @indydawgy, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

@JKennedy24 JKennedy24 referenced this pull request Feb 16, 2017

Closed

Uwp map fixes #238

@rmarinho rmarinho merged commit 917d27e into xamarin:master Mar 7, 2017

2 checks passed

OSX-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: OSX Debug : Running
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Stable - Cycle 9 :: Windows Debug : Tests passed: 3717, ignored: 10
Details

@samhouts samhouts added D-15.4 and removed cla-already-signed labels Oct 10, 2017

@samhouts samhouts modified the milestone: 3.1.0 Jun 1, 2018

@samhouts samhouts added this to Done in vNext+1 (master) Jun 26, 2018

@samhouts samhouts removed this from Done in vNext+1 (master) Jun 26, 2018

@samhouts samhouts modified the milestones: 2.3.0, 2.3.5 Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment