Question

I have created a whole heap of overlays using MKPolygon and created into a MKPolygonView. This works fine but one of the overlays has a butt load of points (about 800 points) and this causes memory and performance issues. I tried shouldRasterize on the MKPolygonView but this had the opposite affect which I am not surprised.

Is there any other thing I can do to increase the performance of it besides lowing the amount of points (which I am in the process of doing)?

Was it helpful?

Solution

This is an issue that is known by Apple but unlikely to change. Basically anything more then a couple of MKOverlayViews you will have performance issues no matter what your hardware. What you have to basically do is to subclass MKPolygonView and merge all the MKPolygons into one MKPolygonView.

Code is available on Apple Forums but as I didn't write it I don't think I should post it here.

OTHER TIPS

I would look at reducing the number of points in the polygon. depending on wher you got it from. Most geopatial manipulation data has functions that will alow you to reduce the number of points in a polygon. (all you need to do is supply an accuracy measurement.)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top