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
0
votes
0 answers

Reusing iOS MapKit MKPointAnnotation object

I'm using this function to change the location of the map marker based on user selection: let annotation = MKPointAnnotation() //global reused annotation object func setPin(mapView: MKMapView, longitude: Double, latitude: Double, title: String) { …
iSofia
  • 1,412
  • 2
  • 19
  • 36
0
votes
0 answers

MKPointAnnotation() - callout to pass some information

The annotation is displayed in my map but I can't add a callout. I am planing to use the callout to change a label.text to the title of the annotation in the same ViewController. I tried this for example but what am I missing to make it work. I…
0
votes
2 answers

Custom Annotation Using MKPointAnnotation

This what I'm trying to do: Use a single custom annotation for all the locations that will populate the map. I have the custom image saved in the assets but, can't make it work. My code is as follows: ViewDidLoad() if let locationDict =…
0
votes
1 answer

Add an image to MKPointAnnotation without changing User Location image

I am using this code to add image to MKPointAnnotation. - (MKAnnotationView *)mapView:(MKMapView *)theMapView viewForAnnotation:(id )annotation { static NSString *SFAnnotationIdentifier = @"SFAnnotationIdentifier"; …
0
votes
2 answers

Customizing annotation pins

I would like to customize my annotations (pins) so I would be able to change its image. I used a function (mapview) to change the picture, so I don’t know if I should use it again to change the picture of another group of pins; let´s say I have two…
Daniel C.
  • 151
  • 1
  • 2
  • 10
0
votes
1 answer

How do I update an MKPointAnnotation image after downloading the right image?

I have a bunch of annotations on a map, which all have a custom photos. Some of the photos may not be downloaded to the application yet from Firebase, so if they do not the image available, it defaults to a white circle image and initiates a…
Cody Lucas
  • 682
  • 1
  • 6
  • 23
0
votes
1 answer

Errors using Custom Point Annotation in Swift

I am using a custom point annotation that includes an image. I am getting several errors such as "Computed property must have an explicit type" and "Variable with getter/setter cannot have an initial value" with the var annotation line. If I fix one…
Steve
  • 1,121
  • 1
  • 12
  • 32
0
votes
2 answers

How to show a UIView just above the MKpointAnnotation Pin

I want to show a UIView just above the pin location and if the user moves around the map the UIView should remain above the pin location. I dont want to use the callout bubble. Is there any other way?
0
votes
1 answer

Coordinates to MKPointAnnotation from CloudKit

I have coordinates in CloudKit as Location data type ("Koordinaatit"). I'am trying to draw MKPointAnnotation to map from these coordinates but i don't know how to get coordinates from array to annotation. var sijainnitArray:[CKRecord] = [] …
Erva
  • 47
  • 8
0
votes
1 answer

Why second MKPointAnnotation doesn't show?

I'am trying to show two annotations at MapView. Why second annotation doesn't show in MapView? I have tried to change placemarks[0] to place marks[1] but with no help. I could have used for clause but for testing i repeated the code. class Asiakas…
Erva
  • 47
  • 8
0
votes
1 answer

how can I make my pins drop on the MKMapView with animation (and possibly - slower than normally)

I have a code that displays 10 custom pins on the visible part of the MKMapView: func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? { if !(annotation is MKPointAnnotation) { return nil } …
user3766930
  • 5,629
  • 10
  • 51
  • 104
0
votes
0 answers

How change MKPointAnnotation image

I want to change MKPointAnnotation image but I cant this is my code . let drowPin = MKPointAnnotation() drowPin.title = pin.company drowPin.subtitle = pin.Description drowPin.coordinate = annotation …
Sam
  • 243
  • 3
  • 12
0
votes
1 answer

How to use callout button to open new uiviewcontroller. (Swift)

I have put several pins on my map for example corresponding to different bridge locations. Each of these pins have their own annotation when clicked on which displays their title and subtitle. I have added a info button within these annotations.…
user5740195
0
votes
1 answer

How to make remove a map pin after a certain amount of time has passed using Swift?

I have a pin on a map that I would like to be removed after a certain amount of time has passed. I have implemented all proper protocols to place the annotation. Just not sure where to have something that checks if the value for the time variable is…
IvOS
  • 323
  • 3
  • 13
0
votes
1 answer

MKPointAnnotation and PFObject

Summary: Linking (NOT Query) Annotation with Parse from app Completed: What I'm trying to do is have the newly created annotation, become a PFObject as a result. The way I am attempting to do this is to get the coordinates based off of the…