开发者

iphone create placemark from latitude and longitude

开发者 https://www.devze.com 2023-01-15 13:01 出处:网络
I want to place \"pins\" on my map. I\'ve got the one for the user\'s location. Now I\'m downloading a feed of locations from the internet. For each one I receive a latitude and longitude.

I want to place "pins" on my map. I've got the one for the user's location.

Now I'm downloading a feed of locations from the internet. For each one I receive a latitude and longitude.

I want to place these all on the map. I know I have to use a reverse geocoder, but I'm not entirely sure how to do this. Plus I read somewhere you can only do one at once, so I don't know how I would get all of 开发者_JAVA技巧my results onto the map.

Thanks for you help. :)

Tom


To add a pin to map you need to do this:

CLLocationCoordinate2D coordinate;
MKPlacemark *mPlacemark = [[[MKPlacemark alloc] initWithCoordinate:coordinate addressDictionary:nil] autorelease];
    [mapView addAnnotation:mPlacemark];

And you can add any number of pins =)

0

精彩评论

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