简体   繁体   中英

Problems with MapView when orientation changes

I have a MapView which autoresizes correctly when the orientation of the iPad changes. However the right 1/4 of the MapView shows a grey grid when I rotate to landscape. This part of the map won't load until it is touched or zoomed. Any ideas what I'm doing wrong?

Thanks

Do you mean rotating mapview on big mapview region spans (like on image )? If yes, try to center map on 0.0f, 0.0f coordinates or make displayed region a bit smaller. It seems that grey grid located on right might contains part of map, that actually should be shown on the very left, but for some reason map layer don't change it's position on MapView.

Anyway, try to implement - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation in your view controller containing mapview and play a bit with mapview region.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM