views:

44

answers:

1

Hi guys. First off, sorry for my english. I have a problem :( I want to open the map of the city. I can use following construction:

NSString *opMap = [[NSString alloc]
initWithFormat:@"http://maps.google.com/maps?q=new+york+21st+street"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:opMap]];
[opMap release];

But, this - map opens up Safari. I want to open this address (for example New York 21st street(in reality - this address will be provided by a server) with MKMapView. How I can do that?

A: 

You can use geocoding and MKMapView. http://files.mettigel-software.com/TSGeocoder.zip is a sample code from my bookmarks, it uses google services. But I am not sure if it violates google's TOS or not.

You should just geocode the address and than show latitude and longitude in MKMapView.

Deniz Mert Edincik
Ok. Thanks, geocoding - that's what I need.
recount