Questions tagged [mkpointannotation]

MKPointAnnotation is a specific part of Apple's general MapKit system.

Apple's MapKit system in iOS generally allows developers to show real-world maps, GPS directions, and so on inside a UIView.

MKPointAnnotations are the small "speech bubble-like" annotations, which you can add to a MKMapItem, shown on a MapKit map.

99 questions
1
vote
1 answer

iOS MKMapView - Animate map Pins

MKAnnotationView animation in iOS using Swift 4 Add animation to pins for adding pins to map smoothly. While adding pins to map, it is not smooth or it has no animation effect. Is there any simple solution to achieve this?
1
vote
1 answer

Pass information in MapKit

I have POI's in Dictionary: ["_id": "12345ACB", "title": "Some Shop Place", "category": "Shop", "latitude": 12.345677, "longitude": 21.12348], ... and I have function for adding annotations: func addPlaces() { for poi in pois { let pin…
miff
  • 185
  • 4
  • 15
1
vote
1 answer

How to get Apple Maps App (not MapKit) to add an annotation?

It's quite easy to add an annotation to a MapKit view which is inside your app. theMap: MKMapView! let pa = MKPointAnnotation() pa.title = "title!!" etc theMap.addAnnotation(pa) But how the heck do you make the Maps App add an annotation?? Here's…
Fattie
  • 27,874
  • 70
  • 431
  • 719
1
vote
1 answer

iOS swift: MKPointAnnotation not always showing title

I've been breaking my head over a strange piece of behaviour I am noticing when trying to display MKPointAnnotation's on an MKMapView in iOS 10. I found 2 related posts on StackOverflow, but neither actually answers the problem I am facing. They…
1
vote
0 answers

Using an Array to Transfer Coordinates To Be Placed on MkMapView

I have one view controller that lets the user input coordinates into textfields and updates these coordinates (as well as a title) into an array. In my MapView VC, I want to be able to place pins down according to what the user has inputed. However,…
Kevin
  • 1,189
  • 2
  • 17
  • 44
1
vote
0 answers

Casting MKPointAnnotation Fails

I am trying to cast a variable by the name of annotation that is of type MKPointAnnotation (and is inside of a mapview function) to the type of CustomPointAnnotation, which is a class I created that extends from MKPointAnnotation. Here is the line…
1
vote
1 answer

Add extra detail to MKPointAnnotation other than title and subtitle

I wish to pass informations from a Pin annotation to another viewController.I can pass the title and subtitle of the annotation but I need to pass some extra information along with these. Is there a way to add extra information to a…
user5740195
1
vote
1 answer

Show Annotation Title and SubTitle in Custom MKPinAnnotationView

I am using MKPinAnnotationView inside my App. I am setting MapView object as delegate, and using this code for customising my AnnotationView func mapView(mapView: MKMapView, viewForAnnotation annotation: MKAnnotation) -> MKAnnotationView? { …
onkar
  • 4,427
  • 10
  • 52
  • 89
1
vote
1 answer

Swift - adding a button to my MKPointAnnotation

On Swift 1.2 : I'd like to add a button to my annotations on the map. First tap on pin shows user's id, and this is working, but then, by pressing the button, I want to send the user to a detail view controller. you can have an idea of what I'm…
biggreentree
  • 1,633
  • 3
  • 20
  • 35
1
vote
2 answers

MKMapView add annotation and remove it after some time

I have a MKMapView and I add some annotations to it. I want to remove annotations one by one after some time that it was added. I need that every annotation have its own lifespan. Is it possible? How should I achieve that?
Roo
  • 613
  • 1
  • 7
  • 24
1
vote
2 answers

Preparing for Segue

I am trying to pass data from a map view about an point annotation whenever the right detail accessory is tapped to another view that will display more information about the point annotation that isn't displayed in the callous view. I know I need to…
Trip Phillips
  • 430
  • 1
  • 5
  • 18
1
vote
1 answer

No MKPointAnnotation in swift

I am trying to add a MKPointAnnotation that marks the destination. That destination is a MKMapItem that is passed from the previous view controller. I know that the destination has a value because the CLCircularRegion right below it uses the…
Pablo Picasso
  • 251
  • 1
  • 4
  • 13
1
vote
1 answer

MapKit annotation button not showing up

I'm trying to build an app for iOS 8 using Swift which uses a Parse.com database to display pins on a MapView. I've succeeded in loading all the pins on the map us PFGeoPoints, but I'm trying to add a disclosure button to each pin which will perform…
bzatrok
  • 35
  • 1
  • 1
  • 5
1
vote
1 answer

Updating annotation coordinates/location in Swift

I queried a set of coordinates for users around me from Parse(PFGeoPoint) and I have created annotations for said locations/coordinates. I will be updating the users location every 5 seconds and updating the location of the annotations, everything…
Eric Prieto
  • 11
  • 1
  • 2
1
vote
0 answers

Recognize a tap on a callout using a MKPointAnnotation

each answer, I've found to the topic about says that I just need to add a UIButtonType.DetailDisclosure button to the right, and then this method would be notified: func mapView(mapView: MKMapView!, annotationView: MKAnnotationView,…
Christian
  • 6,961
  • 10
  • 54
  • 82