Jump to content

Best way to integrate large number of icons with MapKit (Apple Maps)

I'm developing an iOS app that displays store locations on a map using Apple Maps (MapKit). I've limit the number of icons that can be displayed on the map to 100, but there's still huge performance issues and the app is very laggy even on modern iPhone models. What's the best practice when displaying a large number of icons on a map, should the icons be in PNG format with a small resolution (~10kb) or should the icons be vector (SVG) for best performance? Should I use the MapKit framework for iOS 17 or the UIKit approach?

Link to comment
Share on other sites

Link to post
Share on other sites

You should use dequeueReusableAnnotationViewWithIdentifier, if you're not already. Performance shouldn't be that bad with 100 annotations. If you have a lot then you can conditionally render the icons based on the region that the user is viewing or by grouping them as the user zooms out (like with MKClusterAnnotation). Can't comment on MapKit performance since I haven't really used it.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×