[英]IOS Swift remove Capitals from Google Maps
I'm building a Quiz with capitals of Europe, the map will move to the specific country, and I dont want the user to scroll and see the name of the capital. 我正在用欧洲的首都建造测验,地图将移动到特定的国家,并且我不希望用户滚动查看首都的名称。 So basically I have 2 options that I need help with : 1. Not to let the user to scroll 2. Hide all capitals or cities from Google map
因此,基本上,我有2个需要帮助的选项:1.不允许用户滚动2.从Google地图隐藏所有首都或城市
here is the code: 这是代码:
switch(randomNumber) {
case 1:
let latitude:Double = 45.943161
let longitude:Double = 24.966760000000022
let span = MKCoordinateSpanMake(25, 25)
let region = MKCoordinateRegion(center: CLLocationCoordinate2D(latitude: latitude, longitude: longitude), span: span)
mapView.setRegion(region, animated: true)
let pinLocation: CLLocationCoordinate2D = CLLocationCoordinate2DMake(latitude, longitude)
let objectAnn = MKPointAnnotation()
objectAnn.coordinate = pinLocation
self.mapView.addAnnotation(objectAnn)
questionLabel.text = "Iceland"
button1.setTitle("Copenhagen", for: UIControlState.normal)
button2.setTitle("Reykiavik", for: UIControlState.normal)
button3.setTitle("Oslo", for: UIControlState.normal)
button4.setTitle("Ljubiana", for: UIControlState.normal)
correctAnswer = "2"
break
Similar MapKit question for user interactions 用户交互的类似MapKit 问题
To remove capitals you could try the Apple documentation for MapKit: showsPointsOfInterest 要删除大写字母,您可以尝试使用MapKit的Apple文档: showsPointsOfInterest
Also, it looks like you are using Apple's MapKit, not Google Maps, just fyi. 而且,您似乎正在使用Apple的MapKit,而不是Google Maps,只是在使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.