Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift 4 MKMapView change map style like GoogleMap

I am using MKMapView in my application. Now I want to change map style to dark theme.

In GoogleMap we can change style of map. So How can I achieve style in MKMapView.

Please help me.

like image 357
Ekta Padaliya Avatar asked Nov 29 '25 07:11

Ekta Padaliya


1 Answers

You can achieve the Dark Theme in MapView using Google Maps API. Have a look at this documentation for styling the MapView https://developers.google.com/maps/documentation/ios-sdk/styling.

With Google Maps APIs Styling Wizard, you can customize themes, roads, labels etc. Then add a new file to your project named style.json and paste this custom style.

See the below link for selecting map themes such as Standard, Dark, Silver, Night, Retro etc. Take a look at https://mapstyle.withgoogle.com to create map style for MapView.

Here's the sample repository on GitHub, it demonstrate the use of styling the MapView. See this medium post too

like image 173
Vinoth Vino Avatar answered Dec 01 '25 21:12

Vinoth Vino