Questions tagged [mkmapcamera]

An MKMapCamera object describes a virtual camera that you use to define the appearance of the map.

A camera object creates a virtual viewpoint above the map surface and affects how the map renders its tiles and other content. You use a camera object to specify the location of the camera on the map, the compass heading that corresponds to the camera’s viewing direction, the pitch of the camera relative to the map perpendicular, and the camera’s altitude above the map. These factors let you create a map view that is not just flat but offers a more 3D-like experience.

Official link: https://developer.apple.com/library/ios/documentation/mapkit/reference/MKMapCamera_class/Reference/Reference.html

17 questions
5
votes
2 answers

What is the best way to use MKMapCamera

I've found three ways to use the MKMapCamera and I want to know which one is the most recommended one. My goal is to follow the user and I want to update the camera on each location update (so each second). 1. MKMapCamera *newCamera =…
Sjoerd Perfors
  • 2,317
  • 22
  • 37
5
votes
1 answer

iOS MapKit camera resetting heading values between 6 and 354

I have an MKMapView and I am trying to rotate the map camera heading to follow the users heading. I don't want to do the auto-tracking because it forces a zoom level which is something I would like to have control over at the same time. The thing is…
shiznatix
  • 1,087
  • 1
  • 20
  • 37
3
votes
0 answers

MapKit: How to transform a location indicator image to the correct bearing when the map pitch != 0

I have an MKMap view with a custom image (as an MKAnnotationView) that shows the current course bearing direction as shown below (The image is the blue circle with the directional arrow and extending dotted blue line): MapKit provides the current…
3
votes
0 answers

Set the zoom for MKMapCamera and MKUserTrackingMode to be equal in a view controller

I'm using both MKUserTrackingMode and MKMapCamera in the same ViewController to be able to track the user when they're navigating and to rotate the camera accordingly as the user travels along their route. MKUserTrackingMode zooms into a certain…
Pablo Picasso
  • 133
  • 2
  • 12
2
votes
1 answer

MKMapCamera showing south

is there a way to load mapKit facing south instead of north in swift 2? I have tried MKMapCamera and looked at apple documentation but nothing I have read or tried is working. Thanks in advance.
Graeme K
  • 89
  • 8
2
votes
0 answers

MKMapview fix user at bottom of map

I'm creating a navigation app and want the map to show the users location at the bottom of the map, like in Maps app when routing/navigating. However you can only determine which coordinate to focus on by using the centre coordinate. Therefore I…
dgee4
  • 381
  • 3
  • 16
1
vote
0 answers

Setting permanent Map Camera Angle in Hybrid Flyover

The app I am developing(using Xcode 9 and swift 4) requires the user to move through the map in hybrid flyover mode. I have achieved that much, but I want to permanently change the angle (so they can see buildings and statues) as the navigate…
1
vote
1 answer

Zoom MKMapView to fit polyline and annotation pins - Horizontal orientation

I have an iOS app with a view that contains a few different labels plus a small MKMapView. On the map view, I have draw a trip route (using a polyline) and have added two annotation pins, one at the start of the route and the other at the end of the…
Supertecnoboff
  • 6,406
  • 11
  • 57
  • 98
1
vote
0 answers

keep zoom when using mkmapcamera issue

I'm newbie on IOS develope app with Swift 3 and Xcode 8. In my app I use regionDidChangeAnimated delegate method to keep zoomLevel in meters by mapView.region.span.latitudeDelta * 111.000. When new location data is available I use MKMapCamera to…
1
vote
1 answer

Compass won't work on MKMapView if I use MKMapCamera

So I am trying to do 3 things. Have a map which shows my location. Map should be slightly slanted to give a 3d feel; same like when we scroll up and down with 2 fingers on apple map. Use compass to rotate the map. I have enabled userTrackingMode…
KD.
  • 2,015
  • 3
  • 28
  • 59
1
vote
0 answers

MKLaunchOptionsCameraKey in 'openInMapsWithLaunchOptions:' not accepting MKCameraItem* as valid property list format

I am attempting to open the Maps app upon tapping on an annotation callout accessory, which works fine, except when I pass a dictionary containing a MKMapCamera* as value for MKLaunchOptionsCameraKey. (This is to open Maps with a 3D scene loaded)…
SmokeyTBear
  • 129
  • 1
  • 6
1
vote
0 answers

iOS MKMapViewCamera rotation animation

I have been fiddling around with Google Maps for iOS and iOS maps for sometime now and in the Google maps sample code I found an awesome animation wherein the the map keeps rotating with a centre. The code that they used was this, animationTimer = …
Satheesh
  • 10,998
  • 6
  • 50
  • 93
0
votes
0 answers

How to set a default altitude for MKMapView if MKMapCamera:fromDistance is being ignored?

struct MapViewExample: UIViewRepresentable { let location = CLLocation() func makeUIView(context: Context) -> MKMapView { let mapView = MKMapView() mapView.showsUserLocation = true mapView.userTrackingMode =…
netsplatter
  • 559
  • 3
  • 14
0
votes
0 answers

How to add MKMapCamera and read current value?

I have a map with marks. When you press it, it centers. But when I rotate the map and click on the marker, it returns to its original value. I don't want the map to come back and the degrees stay the same. I think that this can be solved through the…
0
votes
1 answer

MKMapCamera pitch adjustment not working in some locations

In my app I use satellite imagery in MapKit. I use a 2D satellite map most of the time using MKMapCamera with a pitch of 0. The user can change to a 3D map with a pitch of 80 and a much lower distance setting since I don't need to see too far away…
corleyq
  • 93
  • 7
1
2