Apple's latest Maps application allows a user to rotate a map. How can I add this functionality to my MKMapView? I presumed it'd just be a case of setting a boolean property (similar to zoomEnabled), but I can't find anything relevant in the documentation.
There is no built-in rotation support in the MapKit of iOS. You could use regular view transforms (but than all street names etc. will also be rotated of course), or you use the Google Maps SDK or MapBox or something else.
The Google Maps SDK does support rotation, even 3D rotation. The SDK Download includes an example project showcasing the functionality.
Actually MKMapView does support map rotation starting with iOS 5.0. Either you use the MKUserTrackingBarButtonItem control in your toolbar (user taps it until the map is rotating), or you set the userTrackingMode property to MKUserTrackingModeFollowWithHeading.
Related
I have integrated HERE maps successfully in my iOS app, but now I am facing an issue in implementing info-bubble on tap of markers on HERE map.I have searched on HERE documentation for iOS SDK, but can't find anything relevant. There are many solutions for JS, but nothing for iOS.
This feature doesn't seem to exist on iOS and Android. In order to create a similar behaviour in iOS, you should use NMAMapOverlay instead and add your own subviews/styling to it.
The iOS SDK documentation states that NMAMapOverlay can be used to display custom UIView-based content at a fixed location on the map. (...) Then, give the overlay a NMAGeoCoordinates location and add it to a map. The overlay will automatically be repositioned on the screen as the map moves.
You can find more information about the best practices for the implementation here:
https://developer.here.com/documentation/ios-premium/3.15/api_reference_jazzy/Classes/NMAMapOverlay.html
I have done everything using Baidu maps SDK for iOS. But I stuck at setting the course for one of the marker. I don't see any property for annotation to set rotation, where I can see for BMKMaPView.
I have an MKMapView with an MKOverlay on top, I'm wondering if its possible to have road names, place names, places of interest and everything like that, that comes by default with Apple Maps, can be displayed above my MKMapView so I don't have to add all this information manually as annotations. I know this is possible with the Google Maps API on Android so wasn't sure if I could do this with Apple Maps.
I've added an image that shows iOS versus Android to show what I am envisioning:
So, I've found a solution to this issue. If you're using the addOverlay: method in MKMapView, you can use:
[self.myMapView addOverlay:customOverlay level:MKOverlayLevelAboveRoads];
MKOverlayLevelAboveRoads means place labels including shields and point of interest icons are shown above your overlay.
MKOverlayLevelAboveLabels means your overlay will appear on top of everything (which i believe is the default based on my experiences).
Does the iOS 7.1+ SDK Mapkit offer Map Controls like the one in the image?
... or is this only covered via the gestures?
Are the controls exclusive to the google sdk?
No. MapKit doesn't include controls like the ones illustrated.
MKMapView (the map view in MapKit) typically uses touch gestures to adjust the scale and position of the map. You can pinch in/out to zoom out/in, and you can pan to adjust the displayed area.
There's nothing to prevent you from adding your own controls to a map view if you want to, but given the touch interface it's hard to see why that would be necessary. Indeed, even Google doesn't use those controls in its Google Maps app.
Does anybody knows how to set the padding on a MapBox mapView as Google Maps iOS SDK does?.
This example belongs to google maps iOS sdk 1.7.2 (VisibleRegionViewController).
What I want to do is to replicate the overlay view on MapBox SDK for iOS so I can keep the MapBox watermark logo visible when an overlay view is over the mapView.
I contacted MapBox support with the same question in 07/2014 and this was the response:
"Hi, No, there is no documentation for either of these use cases as they are somewhat custom.
We might add this sort of functionality in the future, but it's not there right now."
It looks like they don't provide a Google Maps equivalent of "padding".