开发者

how do i feed longtitude and latitude coordinates into annotations on mapkit? (xcode)

开发者 https://www.devze.com 2023-03-21 16:17 出处:网络
right now i have the sample code for adding annotations onto a map using manual coord开发者_开发百科inates:

right now i have the sample code for adding annotations onto a map using manual coord开发者_开发百科inates:

CLLocationCoordinate2D add1=mapView.userLocation.coordinate;
add1.latitude=53.278611;
add1.longitude=-6.243056;
addAnnotation=[[AddAnnotation alloc] initWithCoordinate:add1];
[mapView addAnnotation:addAnnotation];

etc, etc, etc.

but i want to input longtitude and latitude into annotations via a plist located on an online server instead of using manual input methods. is this possbile and can anyone give me any tips? thanks :)


Yes downlaod the plist from server use ASIHttpRequest and then copy that plist to documents directory using NSFIleManager and then read the plist file create an array or dictionary using the plist search on stackoverflow or google for this and then create your MKAnnonations in a loop and show on MAP.

0

精彩评论

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