nitaliano / react-native-mapbox-gl

A Mapbox GL react native module for creating custom maps
Other
2.16k stars 696 forks source link

[iOS] Issue with setVisibleCoordinateBounds edgePadding and contentInset #1693

Closed seanb520 closed 4 years ago

seanb520 commented 4 years ago

I'm having an issue setting my mapView to the coordinate bounds I need. I have set the mapView.automaticallyAdjustsContentInset to false, the mapView.contentInset to UIEdgeInsets.zero, and the functions edgePadding to UIEdgeInsets.zero as well. I expected the loaded view to fit my bounding box with no space between the edge of the view and bounding box, however the bounding box only takes up about 10% of the view. IMG_2200

I have tried to use setCamera as a workaround, I'm initializing my mapView in loadView and I can't seem to use the setCamera function before the view is loaded, although I'm not convinced I'm not just misunderstanding how to make this function work for my case. Any help is appreciated!