开发者

Show only a specific world region on map

开发者 https://www.devze.com 2023-03-29 18:22 出处:网络
I want to show one part of t开发者_如何学Pythonhe world on a map. For example, I want to show only the cities and states in India; how can I do this?Your question is badly worded but this example may

I want to show one part of t开发者_如何学Pythonhe world on a map. For example, I want to show only the cities and states in India; how can I do this?


Your question is badly worded but this example may help.

MKCoordinateRegion region;
MKCoordinateSpan span;

span.latitudeDelta=0.2;
span.longitudeDelta=0.2;
CLLocationCoordinate2D location = {latitude: 51.6657, longitude: 0.032563};

region.span=span;
region.center=location;

[mapView setRegion:region animated:TRUE];
[mapView regionThatFits:region];
0

精彩评论

暂无评论...
验证码 换一张
取 消