
This is a follow up post to my 2 previous posts on the same subject. Please check them here.
iPhone SDK 3.0 – Playing with Map Kit
iPhone SDK 3.0 – Playing with Map Kit – Part 2
We also started a basics training program in iPhone development. If you or some one you know wants to learn development and live around NYC area, Please promote this
Blog Entry:http://blog.objectgraph.com/index.php/2009/05/13/iphone-developer-training-in-ny-city/
Meetup Group: http://www.meetup.com/iPhoneDeveloper
Many of the users were asking me how to draw a polyline on this map. From what i can see in the documentation as of today, there are no classes that provide this yet.
I am using this as a source of documentation. This might change in the near future as there is still time before the official release of the iPhone 3.0
You can draw something on the view using Quartz but I think this is not as useful as drawing directly on the map.
Currently you can do the following very easily as i explained in my previous posts.
– Display a Map in different styles (Standard, Satellite, Hybrid)
– Show current location
– Get current location
– Create an annotation
– Reverse Geocode lat and long to get more info about the location
So just by using this limited API you could create different kinds of applications.
– Friend Track Apps (Like Loopt)
– Car Park Finder (Just add an annotation where you left the car)
I found out the best way to get a users location is by using CoreLocation as it provides a nice delegate to let me know when the coordinates are obtained from the GPS asynchronously.
So I was able to combine the MapKit and the Core Location API to zoom into your current location and place an Annotaion.
Here is some of the code.
Header File
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #import "FlipsideViewController.h" #import "ParkPlaceMark.h" #import <MapKit/MapKit.h> #import <MapKit/MKReverseGeocoder.h> #import <CoreLocation/CoreLocation.h> @interface MainViewController : UIViewController <FlipsideViewControllerDelegate, MKMapViewDelegate, MKReverseGeocoderDelegate, CLLocationManagerDelegate> { MKMapView *mapView; MKPlacemark *mPlacemark; CLLocationCoordinate2D location; IBOutlet UIButton *mStoreLocationButton; } - (IBAction)showInfo; - (IBAction)storeLocationInfo:(id) sender; @end |
Code File
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | #import "MainViewController.h" #import "MainView.h" @implementation MainViewController - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; mapView=[[MKMapView alloc] initWithFrame:self.view.frame]; //mapView.showsUserLocation=TRUE; mapView.delegate=self; [self.view insertSubview:mapView atIndex:0]; CLLocationManager *locationManager=[[CLLocationManager alloc] init]; locationManager.delegate=self; locationManager.desiredAccuracy=kCLLocationAccuracyNearestTenMeters; [locationManager startUpdatingLocation]; } - (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller { [self dismissModalViewControllerAnimated:YES]; } - (IBAction)showInfo { FlipsideViewController *controller = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil]; controller.delegate = self; controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self presentModalViewController:controller animated:YES]; [controller release]; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } - (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFailWithError:(NSError *)error{ } - (void)reverseGeocoder:(MKReverseGeocoder *)geocoder didFindPlacemark:(MKPlacemark *)placemark{ NSLog(@"Geocoder completed"); mPlacemark=placemark; [mapView addAnnotation:placemark]; } - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation{ NSLog(@"This is called"); MKPinAnnotationView *test=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"parkingloc"]; if([annotation title]==@"Parked Location") { [test setPinColor:MKPinAnnotationColorPurple]; } else { [test setPinColor:MKPinAnnotationColorGreen]; } return test; } - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{ mStoreLocationButton.hidden=FALSE; location=newLocation.coordinate; //One location is obtained.. just zoom to that location MKCoordinateRegion region; region.center=location; //Set Zoom level using Span MKCoordinateSpan span; span.latitudeDelta=.005; span.longitudeDelta=.005; region.span=span; [mapView setRegion:region animated:TRUE]; } - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error{ } - (IBAction)storeLocationInfo:(id) sender{ //Either we can use geocoder to get a placemark or just create our own. /* MKReverseGeocoder *geocoder=[[MKReverseGeocoder alloc] initWithCoordinate:location]; geocoder.delegate=self; [geocoder start]; */ //Our own ParkPlaceMark *placemark=[[ParkPlaceMark alloc] initWithCoordinate:location]; [mapView addAnnotation:placemark]; } @end |
Also you could use a reverse Geocoder to obtain a placemark or create your own annotation. Here is some code on how to quickly create your own annotation by implementing the MKAnnotation protocol.
Header File
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | #import <Foundation/Foundation.h> #import <MapKit/MapKit.h> @interface ParkPlaceMark : NSObject<MKAnnotation> { CLLocationCoordinate2D coordinate; } @property (nonatomic, readonly) CLLocationCoordinate2D coordinate; -(id)initWithCoordinate:(CLLocationCoordinate2D) coordinate; - (NSString *)subtitle; - (NSString *)title; @end @end |
Source File
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #import "ParkPlaceMark.h" @implementation ParkPlaceMark @synthesize coordinate; - (NSString *)subtitle{ return @"Put some text here"; } - (NSString *)title{ return @"Parked Location"; } -(id)initWithCoordinate:(CLLocationCoordinate2D) c{ coordinate=c; NSLog(@"%f,%f",c.latitude,c.longitude); return self; } @end |
Related posts:
- iPhone SDK 3.0 – Playing with Map Kit – Part 2 This is the second part of "Playing with Map Kit"...
- Accessing Lon/Lat/Alt I could access Lon/Lat/Alt values from iPhone’s Location Manager class....
- iPhone SDK 3.0 – Playing with Game Kit – Part 1 My first series of articles explaining how to use Game...
- iPhone Development and a sample Objective C Program Kiichi and myself are learning how to program in Objective...
- iPhone SDK 3.0 – Playing with Map Kit I started looking at the Map Kit API for developing...
Related posts brought to you by Yet Another Related Posts Plugin.






















101 Responses
Thanks for these code snippets. i have been following along your posts, and they have been very helpful.
A few questions: I noticed that you are setting the Pin color to either purple or green. However, your screenshot shows the pin as red. Though my code is a bit different than yours, conceptually, it’s similar. And, I too am getting red pins no matter what color I set them to. Is this a bug with MapKit?
Also, without the pins, I could zoom into the map. With the pins, I am unable to do so. Do you get the same behavior where your map is not scrollable or zoomable? Again, are these bugs with the MapKit framework that Apple has yet to fix?
Nihil, To Answer your questions. You are right, The Pin color seems to be a bug, I am not able to change the color.
But I was able to zoom in and out after putting the Pin annotation on the map
Thanks for the code snippets, they’ve been extremely useful. I was wondering if there’s a way to click on the map and return the lat/long of the point. I’m trying to dynamically place pins on the map by clicking on the map. After I click I want to be able to store the lat/long from the point, but I’m not sure how to do that using the MapKit. I know that Google can return a lat/long based on a click on the map.
Do you know how to do this using MapKit?
Thanks for writing these articles. This is a great introduction.
I was wondering how one would subclass or otherwise change the view (”callout”? UIView?) that pops up above the MKAnnotationView pin in your example.
For example, in addition to “Parked Here”, I might want to add a “right arrow” button that opens an information UIView page.
I added the following MKMapView delegate method to my MKMapView delegate controller:
- (void) mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control {
NSLog(@”touched mapview annotation view %@”, [view description]);
NSLog(@”touched mapview annotation view control %@”, [control description]);
}
But when I touch the pin or its callout, the MKMapView delegate method does not get called.
@Alex:
You can definitely create your own annotation by extending MKAnnotationView.
I didn’t try this until I got to 3.0 Beta 3, and I get an exception thrown after the call to addAnnotation: call. The exception comes several frames after that call, making me suspect a bug in MapKit. Has anyone else tried this with Beta 3?
Also: when you successfully drop a pin, can you drag it the eway you can in Google Maps?
@David:
I just got beta3. I will try it out and let you know.
A way to preserve battery life should be to use an NSTimer with an interval of some secs, and check the properties of MKMapView mapview.userLocation.coordinate.latitude/longitude to get user coords.
Thanks for this example. It helped me to understand how it works. But what I miss in the SDK is the geocoding possibility, e.g. to get the coordinates from zip, city, street, etc. (set a MKPlacemark from adressbook entry).
Possible that this will come in a next beta release of the SDK?
Hi Mate …
Just a quick question .. am I able to perform a search on the map, like as in google maps we enter some address and it shows up on the map .. is there anything like such for the mapkit ?
Cheers again
@Ali: There is no GeoCoder functionality, but there is a reverse Geocoder to get information provided you give lat and long.. This might change in a future release
In this method I am getting compiling errors for not declaring mStoreLocationButton and locationManager. What types are these and they should be declared in the header file correct? Thanks
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{
mStoreLocationButton.hidden=FALSE;
location=newLocation.coordinate;
//One location is obtained.. just zoom to that location
MKCoordinateRegion region;
region.center=location;
//Set Zoom level using Span
MKCoordinateSpan span;
span.latitudeDelta=.005;
span.longitudeDelta=.005;
region.span=span;
[mapView setRegion:region animated:TRUE];
}
Hi Gavi,
I have read all your posts and wants to contact to solve or suggest about my problem.
I have SDK 2.1 and iPhone OS 2.1 and creating an app that takes GPS and show on google map with polylines and marker. everything runs perfectly and now it is ready.
The bug is memory management. While playing the location on google map, if map is at larger zoom then iPhone OS halt down and crashes app.
If I am making map zoom at minimum level then everything is fine.
Kindly suggest me how can I solve this problem or any suggesstion will be helpful.
Regards,
Shoaib
I am getting the same problem with mStoreLocationButton ? Please provide the header also ….
gavi,
Is there a way to get the lat/long when I click on a specific location on the map? I’m trying to place a pin on the map, and somehow need to get the lat/long returned from the point where I placed the pin.
Do you know how to do this using the MapKit API?
gavi,
is there a way to get the list of coordinates when i enter the combination of “zipcode and hotels” keyword in my search box.
gavi,
If i am having list of coordinates, then how to do the reverse geocoding for it , bcoz while initiating the MKReverseGeocder it will take only one coordinate, so can u help me out in getting the placemarks of the list of coordinates please .
if any body can help me out , it would be great.
thank you ,
is it required to create a new object of MKReverseGeocoder for every coordinate.
Sir,
I am just a beginner in Iphone. Please tell me from where i can download Mapkit Framework, I am not able to find it.
Hi Gavi,
Nice post! I’m having troubles compiling the code snips from all 3 posts, could you post the latest project/source or send me a link?
thanks,
Greg
Can you please share the header for the third part ? PLEASE PLEASE PLEASE.
I dded the header file. Please check it now. I need to update it for the latest Beta
Any tips on getting the lat/longitude of an address string?
thanks
How do you handle annotation touches?
I would like to load in a different view when an annotation/placemark is clicked on
I can see the purple pin there but the other Parker Location View there what could be wrong ?
Excellent Tutorial.
I get the callout until the user selects the annotation view by tapping on it.
Is there a way to have the calleout already displayed?
Thanks
@Jordan
If you’re talking about performing a search and getting the coordinates, you’d be disappointed because MapKit doesn’t include it yet. Probably, in the future release (current is beta5) you might as well see it.(I reckon the reason for it not to be included might be the terms and conditions between Apple and Google)
However, you could use the GeoCoder API from google … open a NSURLConnection and get the CSV or XML response.
Excellent and very interessting tutorial.
Are you sure the code works with iPhone SDK OS 3 beta 5?
I got several compiler errors, e.g.
“.objc_class_name_MKPinAnnotationView”, referenced from:
literal-pointer@__OBJC@__cls_refs@MKPinAnnotationView in MainViewController.o
The reason is this code line:
MKPinAnnotationView *test=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@”parkingloc”];
Probably the SDK / Framework has changed. But the code line looks fine to me (regular allocation).
Any hints / suggestions?
Sorry, my mistake.
I have forgotten to integrate the MapKit.framework in the project.
Of course the MapKit Framework has to be bind to the project.
Hi, Can anyone help me with callouts?
I want the Annotation Callout to be displayed before the user selects the annotation view by tapping on it.
Is there a way to do it?. Thanks.
how can I add FlipsideViewControllerDelegate…whether this code works in iphone simulator or it will be working in iphone only please help me…..
Does the map position work?
In my app it shows always the map with the Infinite Loop Address.
The location (latitute/longitute) is correct, that means outside of california.
Is it a bug or feature, the map kit shows alway california?
Hello all
while i m importing it gives me error “There is no such file MKReverseGeocoder.h” also is i can not find MKReverseGeocoder through intellisense .can some one help me how to sort this.Is this class removed from framework?
Thanks
Tarun sharma
Can you please post the files?
Is this project and files downloadable somewhere?
Hello Everyone, On popular request, I added the files.
http://blog.objectgraph.com/wp-content/uploads/2009/05/mapkit3.zip
Although the code works I can’t seem to get the annotation to appear. Is there something else I need to do? Thanks.
A fantastic example, thanks. However I cannot seem to get the annotation to appear. Is there something else I need to do? Thanks.
I have noticed that the annotation does not work also. Let me see where it might have screwed up!
you need to add…
test.canShowCallout = YES
@Visitor(o.f): Thanks
Thanks very much for that. Works like a charm.
Hi, I downloaded the mapkit example files. When I try to build the source It returns “There is no SDK with specified name or path ‘Unknown Path’”.
I use sdk 3.1.
Could you help me?
Thanks
I found out that delegate method:
- (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control
does not work in beta5 ..
Or anyone did manage to make it work properly (tap on accessory in an annotation view) ?
Hi, Many many thnks first.
One small qn, I am not able to see that parked Location box , Can you suggest me.
i am running your code only..
I can not get the pin or the annotation to show where the car is parked.
I am using Beta 5
I get the “I parked here” but no pinpoint
Has this been figured out
Gavi,
Your articles have been very useful. They work great & yours is the only helpful resource for Maps so far on Internet for iPhone Apps.
I have these 2 questions. Please help.
1. Is it possible to provide a text on the click of a pushpin in the map? If so, how do I do it?
2. I am trying to find the cityname based on current location’s lat/long values usng MKReverseGeocoder. How do I do this?
Thanks
Fred,
add:
test.rightCalloutAccessoryView = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
after:
test.userInteractionEnabled=TRUE;
I have downloaded the project and it does not seem to completely work, it does display the “I parked here” message but
There is no pushpin, I am running GM
For some reason It did work in Beta 4
Does anyone know how this can be fixed?
Can anyone help me finding the north east and south west bounds
Hi Shashank,
Basically you need to know the zoom level to find out what the corrosponding coordinates will be on the north, west, south and east.
If you look at my span values, they are hardcoded at .005
Looking at documentation here is some data that might help you
latitudeDelta
The amount of north-to-south distance (measured in degrees) to use for the span. Unlike longitudinal distances, which vary based on the latitude, one degree of latitude is approximately 111 kilometers (69 miles) at all times.
longitudeDelta
The amount of east-to-west distance (measured in degrees) to use for the span. The number of kilometers spanned by a longitude range varies based on the current latitude. For example, one degree of longitude spans a distance of approximately 111 kilometers (69 milies) at the equator but shrinks to 0 kilometers at the poles.
several have asked about the parked location in Beta 5 and above not showing, the pushpin….just wondering if everyone is having this issue or only a few?
thanks for your tutorail ,it helped me a lot
I have some ques?
Is it possible to provide a text on the click of a pushpin in the map? If so, how do I do it?
Is there a way to get the lat/long when I click on a specific location on the map .somehow need to get the lat/long returned from the point where I placed the pin.
Do you know how to do this using the MapKit API?
Is it possible to provide a text on the click of a pushpin in the map? If so, how do I do it?
Is there a way to get the lat/long when I click on a specific location on the map .somehow need to get the lat/long returned from the point where I placed the pin.
Do you know how to do this using the MapKit API?
Can anybody explain where is the default location is set? And how can i modify it ?
Is it possible to supply my own map graphics for use in MKMapView? (I know how to do custom annotations, but it’s the map that I’m looking to change out…)
Thanks.
hi Gavi, thanks for this tutorial ,but i have question:
is there any code to make the pin(MKPinAnnotationView) to move when the user moved or touch?
if([annotation title]==@”Parked Location”)
should be:
if([@"Parked Location" isEqualToString:[annotation title]])
That’s why you have the pin color bug. The first line compares pointers, not the string content.
@ Max: Thank you for the find. Actually i stopped looking at this code for a long time now
Gavi,
I am developing an application where the user needs to find his/her location on a map. Is it possible to drop a Pin and get the location coordinates, whit mapkit?
Thanks for your help.
@Jissa
Did you have any luck with moving the pin based on user touches? I’m stuck on the same problem. Even if I were to handle touches on my own, I’d need a way to translate touch coordinates to map coordinates.
Hello,
Thanks for this great tutorial. I have a question, ¿Is possible with the mapkit framework to use the Street View view?
Thanks in advance.
@Manu,
The current MapKit API does not allow StreetView.
Your Comments
@flyx
I try this code:
[mapView setUserIntersection:YES];//on viewDidLoad
if (touch==mapView)
{NSLog(”touch”);} //on touch began
but i don’t have any result .I can’t find touch on mapView.
I search more
Could you please tell me if there is any possibility to use Driving Directions / Routes with this MapKit . I’ve done a little research but nothing found .
- Annotation still not showing -
I downloaded and run the project again (new copy)
When I press the button “I Parked Here”
The code runs through the lines
ParkPlaceMark *placemark=[[ParkPlaceMark alloc] initWithCoordinate:location];
[mapView addAnnotation:placemark];
Then through
[test setPinColor:MKPinAnnotationColorPurple];
I do get the purple pin, but I get no annotation text that says “Parked Location” like in your screenshot.
Should I do something besides pressing the button to get the annotation, I am not sure if theres something wrong with I am doing or if this is a known issue.
To everybody who is looking for drag and drop of annotations:
Take a look at the iPhone Application Programming guide. You can find it at developer.apple.com. In the section Device Support -> Displaying Maps and Annotations you will find example code for movable annotation views
HTH
Has anyone been able to get the drag and drop annotations to work? I tried taking the code provided in the Displaying Maps and Annotations section of the iPhone Application Programming Guide and wasn’t able to get it working. If anyone has been successful, can you provide the sample code? Thanks
Bry
@gavi,
its really a nice tutorial for the beginners.
Have you tried showing the driving directions from source to destination using map kit?. if yes please post the blog .
i have searched for it in the net but no luck.
if anybody aware of this please direct me to the right approach
Do you know if mapkit supports managing custom overlays (custom map tiles) like their brower APIs do?
@Chris: Actually the API does not do many things that Google Maps API allows you to do like drawing on the map directly etc.
I hope they will improve it in later releases
Hey Gavi,
thanks for this introduction, it is hard to find stuff on the MapKit. You are first choice.
I am an experienced Java developer, but new to Objective-C, and there are still many things I don´t understand. With the help of your tutorial and a bit of tinkering at least I got a basic “where is my goddam car” app on my phone. I must admit I really need this, because just about every morning I wonder just where I parked my car
Thnaks again and keep up the good work!!
Cheers
Marc from Germany
Hi bro ,
I have worked on MapKit and manged to do the Annotation adding stuff and Reverse geocoding stuff ,
But now I am stuck at point where I want to Pick a Point on the point and reverse geocoding that point means ill touch on the screen and should be able to add annotation there.
Thanks in advance.
Thanks for this great article. How would I use my own drawn map to display locations at a very large campus instead of Google’s?
hi,
thnxs for the great post, im starting an app where i want to show in a map the certain places near my current location (i have the places i want to pin in sqlite database), how can i make this possible?
Hi ,
Is there any way to select a particular area in the map(circle or polygon area)
Hi, is it possible to work on sdk 3.1? the compiler can’t seem to find the mapkit framework. I really need help in this. Thanks.
hello, thanks for your tutorial, I am new to XCode,I want to create a parking lot finder. Can the mapkit API show the nearest location to a marked point?
the tooltip does not show because the following line is missing before return test:
test.canShowCallout = YES;
Gavi,
Thanks for the information and examples. This fits into my project exactly. I am able to get two points on the map that I want with pins of the proper color. Callouts work well too. What I want to do now is draw a line between the two pins. I am able to get the points from the coordinates easily enough, but am unable to figure what the correct drawing context is to draw the line. The only “context” that does not provide compilation errors is the mapView object, but under what context is mapView? How do I get a line to draw on the map?
Thanks for any guidance you may provide.
GAVI,
I am a Student doing my thesis at Illinois State University. I decided to develop an iphone application something same as the mapkit example you shown. Can you please send me all the map kits example so that i can use it as reference.
Great tutorial, im new to objective c programming and this was great help getting my head round it all.
I was wondering if there was a way of using search method, like the one in google maps instead of one specific location. For example, a search for coffee shops near your current location?
Thanks
Adam
Hi Gavi
thanks for sharing. Just one question: I’m not an expert, but shouldn’t locationManager be released somewhere?
Yes,
You are absolutely correct! It needs to be released in dealloc
A great tutorial, Please can you help me with the code, to display multiple annotations on the map.
say i want to point 4-5 retailers, who are with 10 kms from my current location.
how am i to do it
Hi everyone,
I want to ask a question if anybody can help me in that, how i can highlight an area surrounded by a polygon using Maplkit?? or is there anyway of doing that?
regards,
Hassan Ali
i downloaded your code but i still can’t find my car. Help please!….
I really appreciate this tutorial and your explaination, and followed it successfully. But in part 3 my pushpin showing “Parked Location” in black does pops out on clicking placemark on the map, although when I click button “I parked here” so my placemark is getting darker and darker upto some extent. So please help me as I am looking for Pushpin displaying my custom text and introducing detaildisclosure button on it. I have also downloaded your project but it has the same output as I copied.
Great tutorial. In your “real” application do remember to call [locationManager stopUpdatingLocation]; when there is no need to continuously poll for location (to avoid battery drain).
Good Point!
Thanks for the warm welcome. Ah, this is a recent post, I was wondering due to the date error…
Looking on the web for maps related problems, seems like a generic issue is how to find location based information from google or yahoo. (e.g. finding near by restaurants).
One old discussion was to use JSP wrapper written @ http://code.google.com/p/iphone-google-maps-component
Another old discussion is here: http://stackoverflow.com/questions/551886/integrate-google-maps-api-into-an-iphone-app. But it also highlights the legal issues for commercial apps. It does mention about using static maps, geonames or Yahoo.
Looks like the easiest way is to send http queries (having the key words inserted in the query) to maps.google.maps/maps & then parse the KML to find the relevant information. Gavi & visitors, have you found legal issues doing that for your commercial iphone app?
-GammaPoint
Hi,
Again, It is a very useful article.
Thanks for sharing it.
Could you please tell me instead of latitude/longitude can i add annotations using string. I mean search using a string.
Thanks in advance.
HI Friend, I checked your source code. How did you enable the Google Log in the Maps?
is there any way to detect the mouse click in map.. and also to find the lat and log of the mouse click
[...] Developers: map example [...]
Hello everyone,
I have a list of annotations which i am successfully able to show on the map using Mapkit . Can somebody tell me how to zoom to the extent of the annotation list . or suggest me seeting a zoom level
Hi, when i press Home button in the iphone the app still running how can i stop the app when the home button is pressed?
I wanted to know how to find stuff near you in Mapkit, like “Sushi” and Mapkit will find all the Sushi restaurants near you.
@Alex Reynolds: Did u figure out the way to add a SideArrow button in “Title/SubTitle Section” ?
hello evry one tell me can show me how to draw the way between 2 localisations? thank you .