MKMapView should support an overlay-only mode ("MKMapTypeNone")
| Originator: | |||
| Number: | rdar://20132462 | Date Originated: | 11-Mar-2015 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | any |
| Classification: | new feature | Reproducible: | always |
It would be very handy if an MKMapView could be used just as the basis for displaying only an overlay view, especially without loading any map data from Apple. Example: I've an app that displays OpenStreetMap tiles as a world-wide overlay to a MKMapView. As the OpenStreetMap is a complete map in itself, the overlay's alpha is set to 1.0. Therefore the underlying Apple map is loaded in the background but never visible. This works like a charm - but it smells like wasting a lot of bandwidth for loading map data that's never being displayed. On the other hand an MKMapView has so many features (like overlays & annotations) that it would be overkill to re-implement the whole MKMapView class just in order to display one's own overlay, e.g. OpenStreetMap data. A viable solution seems to be a MKMapView that does ONLY provide it's features OTHER than actually displaying Apple map data. Think of it as a usual MKMapView with a new style "MKMapTypeNone" that just displays the grey squared background, annotations & overlays (thus doesn't consume any bandwidth) and leaves it to the developer to display something useful as an overlay to it. I imagine this should be rather easy to implement with access to the MKMapView sources ... ;-)
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
You can implement this using -[MKOverlay canReplaceMapContent]