2 Replies
      Latest reply on Mar 17, 2020 4:54 PM by theonlyvicki
      Erickit Level 1 Level 1 (0 points)

        I create a map with a coordinate region in the constructor. Then, I later call `map.setRegionAnimated(coordinateRegion, false);` with the same exact coordinate region. This results in a more zoomed in map. Further calls to setRegionAnimated result in the same zoomed in map.

         

        Is there a reason the region passed in the constructor results in a different map than the same region passed into setRegionAnimated?

         

        Calling `map.region` after each call also produces the same result.

        • Re: Different Zoom Levels with same Coordinate region
          Erickit Level 1 Level 1 (0 points)

          More data, using visibleMapRect this time:

           

          Passing into map options in the constructor:

           

          options.visibleMapRect

          1. origin: u {x: 0.17668707222222219, y: 0.3874875696729686}
          2. size: p {width: 0.000005555555555591951, height: 0.0000070024680076663515}
          3. __proto__: Object

           

           

          console.log(map?.visibleMapRect);

           

          1. origin: u {x: 0.1766822802101135, y: 0.38748522965178445}
          2. size: p {width: 0.000015139579772949219, height: 0.000011682510375976562}
          3. __proto__: Object

           

          Setting the visible map rect with the same map rect passed in the constructor:

           

          map.setVisibleMapRectAnimated(mapRect, false);

          console.log(map?.visibleMapRect);

           

          1. origin: u {x: 0.17668531268654603, y: 0.38748756967296866}
          2. size: p {width: 0.000009074626907894139, height: 0.000007002468007666344}
          3. __proto__: Object
          • Re: Different Zoom Levels with same Coordinate region
            theonlyvicki Apple Staff Apple Staff (60 points)

            We received your Feedback Assistant report on this -- thank you! Looking into it.