'How to remove landmarks while using MapKit API (iOS)?

What function would be able to hide local landmarks when browsing a confined region via Apple Maps API ?



Solution 1:[1]

There is a property called showsPointsOfInterest for MKMapView, you can set it to NO to hide icons and labels for restaurants, schools, and other relevant points of interest.

Solution 2:[2]

showsPointsOfInterest is deprecated.

With IOS 13 you have the option to filter: here a example to show no items on the map

mapView.pointOfInterestFilter = .some(MKPointOfInterestFilter(including: []))

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Paras Gorasiya
Solution 2 Usman Nisar