Post

Replies

Boosts

Views

Activity

Reply to Disable showing bikesharing POI pins in Maps
We found a solution. Apparently, there is a hidden ".bikeSharing" option or something like that in Maps API. Which is not available to us, therefore we can't really exclude it. If we use .excludeAll, then it removes vehicles from the app. So our solution is instead of excluding, include everything which is available to us. var categories: [MKPointOfInterestCategory] = [ .airport, .amusementPark, // all the other ones ] if #available(iOS 18.0, *) { categories.append(contentsOf: [ .animalService, .automotiveRepair, .baseball, // all the iOS 18 ones ]) } let filter = MKPointOfInterestFilter(including: categories) if #available(iOS 16.0, *) { let configuration = MKStandardMapConfiguration() configuration.pointOfInterestFilter = filter mapView.preferredConfiguration = configuration } else { mapView.pointOfInterestFilter = filter } This way, that hidden .bikeSharing option is not being enabled and done! Those bikesharing vehicles are gone. Leaving this here so if in the future someone else search for it, they will see.
Topic: Programming Languages SubTopic: Swift Tags:
12h
Reply to Disable showing bikesharing POI pins in Maps
We found a solution. Apparently, there is a hidden ".bikeSharing" option or something like that in Maps API. Which is not available to us, therefore we can't really exclude it. If we use .excludeAll, then it removes vehicles from the app. So our solution is instead of excluding, include everything which is available to us. var categories: [MKPointOfInterestCategory] = [ .airport, .amusementPark, // all the other ones ] if #available(iOS 18.0, *) { categories.append(contentsOf: [ .animalService, .automotiveRepair, .baseball, // all the iOS 18 ones ]) } let filter = MKPointOfInterestFilter(including: categories) if #available(iOS 16.0, *) { let configuration = MKStandardMapConfiguration() configuration.pointOfInterestFilter = filter mapView.preferredConfiguration = configuration } else { mapView.pointOfInterestFilter = filter } This way, that hidden .bikeSharing option is not being enabled and done! Those bikesharing vehicles are gone. Leaving this here so if in the future someone else search for it, they will see.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
12h