我知道这可能很简单,但我似乎无法通过互联网找到任何相关内容:
我想要做的就是加载一个具有一些纬度和经度坐标的地图。如果有人可以删除片段或将我链接到我感兴趣的资源。
由于
答案 0 :(得分:1)
我希望这会有所帮助:
CLLocationCoordinate2D zoomLocation;
float zoom;
CLLocationCoordinate2D longPointLightLocation;
//the coords for Long Point Lighthouse, Provincetown, MA
longPointLightLocation.latitude = 42.033126;
longPointLightLocation.longitude = -70.168621;
[mapView setCenterCoordinate:longPointLightLocation animated:NO];
zoomLocation = longPointLightLocation;
zoom = 50;
MKCoordinateRegion viewRegion = MKCoordinateRegionMakeWithDistance(zoomLocation, zoom*METERS_PER_MILE, zoom*METERS_PER_MILE);
[mapView setRegion:[mapView regionThatFits:viewRegion] animated:NO];