xamarin/Xamarin.Forms

Forms Map resets back to last set region on resizing

オープン

#1,520 opened on 2018/01/07

 (20 件のコメント) (0 件のリアクション) (0 人の担当者)C# (1,926 件のフォーク)batch import
a/maps :globe_with_meridians:e/3 :clock3:help wantedp/Androidp/iOS 🍎t/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Bug report best practices: https://github.com/xamarin/Xamarin.Forms/wiki/Submitting-Issues

Description

When the forms map control is resized, the map's region is set to the LastMoveToRegion which is not the current region of the map (as the user has panned / zoomed after the MoveToRegion method was called). This is because the LastMoveToRegion is not updated based on user action.

I observed this both on iOS and Android.

Steps to Reproduce

  1. Create a Forms Map with a preset region.
  2. Pan / zoom the map to a different region.
  3. Resize the forms map (using code) or change the orientation of the mobile.

Expected Behavior

  1. The map control should expand / shrink based on the new size but the center coordinates / zoom level should be retained.

Actual Behavior

  1. It resets to the last value set with the MoveToRegion method.

Basic Information

  • Version with issue: 2.3.4 ( but the issue exists in the latest version as well )
  • Last known good version:
  • IDE:
  • Platform Target Frameworks:
    • iOS:
    • Android:
  • Android Support Library Version:
  • Nuget Packages:
  • Affected Devices:

Screenshots

Reproduction Link

コントリビューターガイド