React-Native Maps: EdgePadding has no effect on fitToCoordinates
Asked Answered
E

0

10

It seems that edgePadding does not do anything in the fitToCoordinates function. No matter which value I set, the result is always the same. I tried setting top, right, bottom left at 0, at 300, changing them from one another... The mapview is always the same.

 <MapView
      ref={(ref) => { this.mapRef = ref }}
      onLayout = { () => this.mapRef.fitToCoordinates([{longitude: x, latitude: y}], { edgePadding: { top: 0, right: 0, bottom: 120, left: 0 }, animated: false })}
/>

I would like to be able to zoom out a little bit from given coordinates. There is no LongitudeDelta or LatitudeDelta in the given region so I assume zooming out must be done with the edgePadding parameter.

Have you met this issue before?

Eudora answered 21/12, 2017 at 15:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.