Add clearer notes to setMapBoundaries method#2707
Add clearer notes to setMapBoundaries method#2707christopherdro merged 1 commit intoreact-native-maps:masterfrom chris-poe:update-mapview-readme
Conversation
When using the setMapBoundaries method, it is not immediately clear why the user is able to scroll past the specified boundaries. Noting that the method uses the maps center coordinates would help clarify.
|
@chris-poe I'm trying to use the function and I must concur, it is not clear. Unfortunately not even with your improvement. Are the boundary coordinates somehow relative to something? Doesn't make any sense to me. |
|
@EskelCz what is meant by that is the center coordinates of the phone's viewport will not move past the boundaries you set. Maybe a visual would help. As you can see below, we have a bounding box around the United States (red line) which represents the boundaries specified by the I think the confusion we were all having is that we thought the viewport itself (purple line) would stay within the bounds of the red box, but that is not the case. I think I will be editing my change because after coming back I agree that I still didn't quite clarify as well as I could have. Hope this helps. |
|
Ah I see, that's where an image is worth a thousand words :) Thanks! |
When using the setMapBoundaries method, it is not immediately clear why the user is able to scroll past the specified boundaries. Noting that the method uses the maps center coordinates would help clarify.

When using the setMapBoundaries method, it is not immediately clear why the user is able to scroll past the specified boundaries. Noting that the method uses the maps center coordinates would help clarify.
Does any other open PR do the same thing?
No, there are no other pull requests open on this issue.
What issue is this PR fixing?
Clarifies the use of the setMapBoundaries method.
How did you test this PR?
No testing needed for markdown edits.