开发者

How to save image on Google map in iPhone

I have map application in which I have a button. On clicking that button the user can capture image through iPhone and the image that is captured by the user should be 开发者_Go百科save on the map at the particular location where he has captured the image.


If you know where you want to display image on map then you have two ways to display particular image on map.
1. You can add image as a overlay on map. Below link contains code in question: code link
2. Add image as a annoation. (http://blog.asolutions.com/2010/09/building-custom-map-annotation-callouts-part-1/)


Use core location to get the user current location, so that you can get his location where he is capturing image and then show that location on map.


By "save on the map" I'm assuming you want to show a dropped pin on the spot where the photo was taken- to do this, you'll need to:

  1. Get the user's current location with CLLocationManager and CLLocationManagerDelegate.
  2. Use UIImagePickerController to let the user take the photo.
  3. Use MKAnnotation and MKPinAnnotationView to drop a pin where the user's location is. You can even insert the picture in the annotation view's callout.

A bit of Googling will net you tutorials using these classes. This one looks decent.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜