Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RobbS

macrumors newbie
Original poster
Pretty new to app development, still in the learning process.

In my app, I have three buttons for three different location. I want to set each button to take you to a different location, how would I achieve this?

I read through the documentation here, but still don't have an answer. Can someone help out?
 
Do you have the basics setup? By that I mean, does your app currently show a specified location? There's a bunch of tutorials on using the MapKit.

You need to setup a CLLocationCoordinate2D property and set it to the specific location for each button. Then you can create a region that contains this location and pass that to your mapView.

Look here: http://blog.objectgraph.com/index.php/2009/04/03/iphone-sdk-30-playing-with-map-kit-part-2/


[mapView setRegion:region animated:TRUE];
[mapView regionThatFits:region];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.