Questions tagged [mapkit]

MapKit is Apple's framework for presenting and annotating scrollable and zoom-enabled maps on iOS, IPadOS, tvOS, watchOS, and macOS.

MapKit is Apple's framework for presenting and annotating maps for iOS, IPadOS, tvOS, watchOS, and macOS. Maps are rendered via the MKMapView control, which offers scrolling, zooming, and optionally real-time highlighting of the user's current location on both traditional maps as well as satellite imagery.

Maps can be further customized by:

  • Adding annotations (information about a point on the map), which can then be represented on the MKMapView using annotation views, graphical representations (such as a drop pin or a custom image). Annotations also may have associated attributes (such as text that can appear in a callout box that appears when you tap on an annotation view), and these callout boxes can also have additional behaviors (e.g. left and right accessory controls that you can use to perform custom operations, etc);

  • Adding overlays, graphical representations between a collection of map points (e.g. a MKPolyline that represents one or more line segments, such as a path, along the map; a MKPolygon that represents a shaded portion of the map defined by the coordinates of a polygon, a MKCircle that represents a shaded circle around a particular map point, etc.). Overlays are represented by MKOverlayView objects which define the particulars of how the overlay is represented (line thickness, line color, shading, etc.).

  • The Map Kit framework also provides local search capabilities (as of iOS 6.1, OS X 10.9), via MKLocalSearch, which will asynchronously return establishments and points of interest based upon the search criteria.

The reverse geocoding, via MKReverseGeocoder, is deprecated as of iOS 5.0, superseded by the CLGeocoder class of the Core Location framework

MapKit is part of the following SDKs:

  • iOS 3.0 and later,
  • macOS 10.9 and later,
  • Mac Catalyst 13.0 and later,
  • tvOS 9.2 and later,
  • watchOS 2.0 and later.

###Related tags:

###References:

5877 questions
2
votes
2 answers

How to change the colors of MapKit Swift

In my app i used mapKit, the problem is the map should be in specific color like this : i try to change the type of map, but nothing match with this picture, so i thought if i can change the color of the mapKit. anyone faced like this problem ?…
Rawan
  • 1,589
  • 4
  • 23
  • 47
2
votes
4 answers

MKMapView with iOS 8 crash

I've a simply view controller with a MKMapView object inside, defined in this way: Class declaration: @interface GeoViewController : UIViewController @property (nonatomic, strong) MKMapView*…
Luca Davanzo
  • 21,000
  • 15
  • 120
  • 146
2
votes
1 answer

Update custom annotation pin image to standard annotation pin in swift

I want to update map view every 60 seconds & make an annotation with custom pin/image but want to show standard pin [red color - See Figure 6-1] icon to the previously drawn annotation. I tried like below code but that does not working properly.…
Nuibb
  • 1,800
  • 2
  • 22
  • 36
2
votes
1 answer

Reverse geocode street name and city as text

I have been having some trouble finding a good way to output just the street name and city as text (Infinite Loop, Cupertino shown here) that can be displayed in my iPhone app. This needs to be able to dynamically change as you change streets and…
2
votes
1 answer

ReverseGeoCoder Fail Error in Mapkit

I am making the ReverseGeoCoder request with the following latitude and longitude Latitude = 37.296740 Longitude = -122.001878 I am getting an error as "/SourceCache/ProtocolBuffer/ProtocolBuffer-19/Runtime/PBRequester.m:446 server returned error:…
Biranchi
  • 16,120
  • 23
  • 124
  • 161
2
votes
1 answer

Add Overlay to Mapview

I have been doing iOS dev for a few months. I already have a map view with a couple of annotations pinned to it and can show the users current location. I haven been trying to read through the docs to implement a simple overlay using a set of…
wambambizzle
  • 105
  • 7
2
votes
0 answers

MKPolyline / MKPolyline renderer change color animation

I working on app that relate with map and polyline. I want to animate color changing of polyline what I have to do to achieve this. I search to properly method all days yesterday and decide to ask question today. Something like this code do but do…
majorl3oat
  • 4,327
  • 1
  • 18
  • 21
2
votes
1 answer

Adding accessory button on user location callout

I'm making a clickable placemark. I set the title of the placemark. Title is adress. I want If you click on that adress It will push to another View to Show Adress Number,City,Country etc. I Tried this code. But It haven't UIButton in application in…
dafinoo
  • 61
  • 9
2
votes
0 answers

Show the correct image associated with the directives of the direction instructions

I have use the code below in order to get directions from my position and to show it in a list view. -(void)getDirectionFromMyPosition:(id)sender{ Reachability *networkReachability = [Reachability reachabilityForInternetConnection]; …
melix
  • 468
  • 4
  • 16
2
votes
1 answer

swift MapKit annotation drag state icon

I have run into a slight problem. I am trying to use a custom icon for my mapView annotation. The trouble is that when the user drags the icon it always changes back to the default icon. I set the icon image in my mapView delegate like so, this…
BpRocker
  • 41
  • 4
2
votes
1 answer

Query a GeoPoint from Parse and add it to MapKit as MKAnnotation?

I am trying to query an array of PFGeoPoints stored on the Parse backend. I have a PFObject in Parse called "Post", with data assigned to it such as "location", "title", "message", etc. everything is being sent to Parse upon posting from my app and…
Zach
  • 180
  • 1
  • 2
  • 12
2
votes
0 answers

MKAnnotationView does not show custom image (Swift)

I'm trying to display a custom annotation image for a map pin. However it always shows the default red pin. The following delegate method gets called correctly. func mapView(mapView: MKMapView!, viewForAnnotation annotation: MKAnnotation!) ->…
gpichler
  • 2,181
  • 2
  • 27
  • 52
2
votes
0 answers

Intersection of two routes

I have two routes (MKRoute *), which intersects each other. If I add overlay from them I get something like this http://tinypic.com/view.php?pic=2e3349u&s=8#.VSpjvFy5Kuc The first one is begins and ends in pins (going upwards), another is going left…
Vladyslav Zavalykhatko
  • 15,202
  • 8
  • 65
  • 100
2
votes
1 answer

MKMapView: getting latiude and longitude for a point

I'm developing an iPhone application and I want to know the location on a MkMapView where the user has touch. I have a MKMapView that fills the screen. When the user touch over the map, I need to know the location of the point the user has touched.…
VansFannel
  • 45,055
  • 107
  • 359
  • 626
2
votes
2 answers

string under Map Kit pin (mkannotationview image)

I am trying to set names under pins that are on a map. Each name should be specific. I am not using default pins, hence each pin is a specific image. I was thinking of generating some kind of image that would present the image of the pin and the…
Quentin Malgaud
  • 405
  • 6
  • 21
1 2 3
99
100