我知道这可能很简单,但我似乎无法通过互联网找到任何东西:
我要做的就是加载带有一些纬度和经度坐标的地图。如果有人可以删除片段或将我链接到我将不胜感激的资源。
谢谢
我希望这有帮助:
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];