views:

155

answers:

2

Hi,

In My application i am using MKMapview to display the googleMap,but it is not displaying the search field in the Map. I have downloaded the Maps application from the Appstore in my real device and which is disaplying the seach field in the map.

can any body have any solution for displaying the search field in the Existing Map, as i want to search the text into the search field and want to display its content to the Map?

Pls provide any solution, which would be appreaciated.

Thanks,

Mishal Shah

+4  A: 

The MKMapView control does not include a search control - it simpy displays a map. You can center the map and contro lthe zoom but that is about all.

You will have to implement the search field yourself (use a UISearchBar) and then use google's web services to find the logitude and latitude of your search term.

This isn't trivial but it is not difficult either.

Roger Nolan
I would actually suggest using a UISearchBar instead of a UITextField.
bpapa
+1  A: 

Another answer provides a bit of info on the URLs to query for the relevant info: http://stackoverflow.com/questions/1640932/search-and-display-buisness-locations-on-mkmapview

Jason Prado