How to change Apple Map (MKMapView) background colors?
Asked Answered
S

1

6

enter image description here

I've Required an iOS application with a black theme, and would really like to make the displayed Apple Map also in black colors.

I see nothing in the native documentation that talks about changing look for MKMapView.

I've Googled the topic and tried to change MKOverlayView.But, I couldn't find anything.

Is this even possible? Can I change the background colors of the Apple Map.

Thank you.

Stenger answered 17/10, 2017 at 6:7 Comment(14)
not possible yetPenrod
@Penrod then how can achieve this?Stenger
google maps? any other maps libraryPenrod
@Penrod please suggest any library if you know.Stenger
You can use hybrid mapTye for black themeNicoline
@HarshalValanda how ? give some hint please.Stenger
I would try this developers.google.com/maps/documentation/ios-sdk/stylingPenrod
@Penrod but i use only apple map.Stenger
How is it a black theme? show us a screenshot.Hundredweight
did you saw my first comment? and you ask to suggest libraryPenrod
@KosukeOgawa see update question.Stenger
@DixitAkabari Any luck?Melvin
@DixitAkabari Are you done with integrating dark mode bro?Melvin
@AnuragSharma not using apple map but if you can use google map then go it because i did this using google map.Stenger
B
0

You can customize map using MapBoxKit

https://www.mapbox.com/ios-sdk/api/3.6.4/runtime-styling.html

In Mapkit you can only set dark mode as hybrid as follow:

in viewDidLoad write below code:-

 mapView.mapType = .Hybrid

enter image description here

Need to add Privacy - Photo Library Usage Description in info.plist

also you can set from IB as above:-

enter image description here

Ballottement answered 17/10, 2017 at 6:22 Comment(6)
and this is a dark mode?Penrod
It is only possible as you want dark theme. You can not do it as other way.Ballottement
then you should go with custom tile overlay. Did you try it? MKMapView also offers the possibility to use custom tile overlays.Ballottement
@Ballottement how ? give some hint please.Stenger
May be below will help you https://mcmap.net/q/800591/-custom-map-style-in-mapkitBallottement
@HarshalValanda Bro, MapBox is not free.Stenger

© 2022 - 2024 — McMap. All rights reserved.