MapKit Ios Adding photo to annotation - ios

I'm writing application for ios and I have a problem. I would like to add a photo to my annotation on MapKit.After adding annotation on AnnotationView, user has a button that invocates UIImagePicker.From this moment I have two problems.
1) How to update image after adding an annotation ?
2) How to add image to annotation? I can add small icon using leftCalloutAccessoryView but I would like something bigger. Is there a way to put a bigger image to AnnotationView? Or maybe someone knows how to make this small image resize on click?
Thanks for answering.

Related

Create Custom Maps Xcode?

I would like to Create a Custom Map !
There is a way to do it so as to add this map to Xcode ?
I have an example in this picture below:
http://a1.mzstatic.com/eu/r30/Purple2/v4/92/d6/a8/92d6a818-1966-3a87-da0e-1aa6251d7e6a/screen568x568.jpeg
Thanks
Many way to do it.
Easy one is add UIImageView to UIScrollView and enable zoom on scrollview.
this way you can have basic map not good in memory.
Or, you can use some opensource like Mapbox, you can custom tile image map.
https://www.mapbox.com/

How to get the image from map in apple watch

I am creating a map with custom image for annotation, I want an image from my map object.
Is it possible?
Assuming you are using WKInterfaceMap it is not possible to get the map image (at least not that I know of). You can create a map image locally in your map extension and then set that image on a WKInterfaceImage or WKInterfaceGroup. I am not sure what would be involved in creating a map image with MapKit. I create map images from tiles for use in my app and set it as the background on a WKInterfaceGroup to create a UI that looks like this Is it possible to position views on top of each other.

ios MapKit have annotation description visible on launch and not on tap

I am using map on my IOS application. I can see the annotation on my map, and when I tap on that there is the description, which I have set. My question is whether I can have this description visible when map first loads and not make the user tap on the annotation to view it?
is that possible?
Thanks.
use an overlay instead of an annotation

Adding Custom Image on Mkannotationview, or on callout bubble?

i'm trying to reproduce the kind of map behavior of the app "Stuck On Earth". Here's a screenshot :
Here's the behavior :
On the map, as you can see there is pin
When you click on a pin, it display the picture attach to it. Really important : the picture stai with the pin, and it stays BEHIND it
If you click on the picture, a new controller is called
if you click on the pin, the picture disappear
I'm trying to do something similar. For now, as i can read, i've got two solutions :
Using callout : callout is HELL. I can try to use a false annotation, but MapKit deals with the depth of elements, and the picture is always in front of the pin
Using Custom Annotation : i was going for the plan of making custom annotation view, when the pin is tapped, i launch a method of the CustomAnnotationView, adding (or removing) the thumbnail.
I think the method number 2 could work, but i've got no idea how to deal with the touch on the thumbnail.
Any suggestions or help on this ?
Thanks you !
Updated 2016-09-02:
My colleague devised an workaround by making popup views as subview of the view container which contains the map view. The position can be calculated according to the CGPoint transform in different reference systems.
Original Answer:
I also got this kind of problem, after following the tutorial 'Building Custom Map Annotation Callouts – Part 1', the interaction becomes difficult.
Have you tried the tap gesture recognizer? I added it to a subview, it works, although the code smell bad.

Use custom map image in UIMapView

I wanna accomplish the following, i wanna display a static map image that i have on UIMapView to use the benefits of the zooming and annotation, i've search very hard and i came up with these solution.
There is a library called route-me that give you the ability to customize the map, change the color of the map, specify a predefined road and building, highlight them, but it didn't help me in my issue.
I've looked on apple example that using the MKOverLay class, HazardMap, KMLViewer but they are not showing how to use an image to replace it with the map.
All i want is to display a map image that i have for a place and use it in UIMapView. can anyone put me in the right direction.
Thx in advance.
I replied to this question in this other post. Maybe it helps you:
How do I create an image overlay and add to MKMapView?

Resources