Resize a custom MKAnnotationView to fit the MapKit zoom level

Here is the situation: I display images on a map using custom annotations. Everything works fine, but I would like to improve it visually by resizing AnnotationView so that it shrinks as the map zooms out . I want to do this because obviously more annotations fill the screen and need to be compressed so that they do not overlap each other too much and the user can see more annotations. (Of course, I would like to enlarge AnnotationViews when the map is enlarged again).

I achieved this by removing all annotations from the map and adding them back when RegionDidChangeAnimated is called. However, these images are downloaded from the Internet, so downloading the images again (since the annotations have been deleted) does not seem to make sense.

I hope I explained the situation well and hope to contribute to the JI in the future.

Thanks in advance.

PS I am developing iOS 4.0

+3
source share
2 answers

iOS 4.0, , MKOverlay MKAnnotationView. . , 1 . HazardMap, Apple WWDC 2010 http://developer.apple.com

- k . , . , . , 1000 .

+1

, , . - , , ( , , , ), , , ?

+1

Source: https://habr.com/ru/post/1777368/


All Articles