简体   繁体   中英

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 : mapKit 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 ? any help please ? thanks

Try using the Mapbox API. I currently have the same problem and this library has come in-handy.

You can apply a mask by adding an Overlay betwen the map and Label/Road:

let path = NSBundle.mainBundle().pathForResource("overlay", ofType: "png")
let fileURL = NSURL(fileURLWithPath: path!)
self.overlay = MKTileOverlay(URLTemplate: fileURL.absoluteString)
self.overlay!.canReplaceMapContent = false
self.mapView.addOverlay(self.overlay!, level: MKOverlayLevel.AboveRoads)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM