iphone - Using MKPolyLineOverlays and MKAnnotation efficiently -
i creating map application, in showing mkpolylineview(around 2000) , mkannotations pin drop.
i want make visible either set of mkpolylineviews or mkannotations @ time. managing 2 buttons, 1 button display set of mkpolylineviews , set of mkannotations. tried 2 methods manage scenario, following:
for mkannotations, removing , adding again. in case of mkpolylineviews, tried 2 ways:
i tried make mkpolylineviews hidden yes , no manage visibility based on button click. in case, when make mkpolylineviews visible it's hidden state, not mkpolylineview visible. tried alpha , hidden property. in both cases, result same, not lines visible. there mechanism make lines visible. because performance in case.
then tried way, in removed mkpolylineoverlays , add again. case, works well. main thread freeze ui seconds. remember adding around 2000 mkpolylineview. how can manage it.
instead of removing overlay, when used hidden , alpha property, performance good. half of lines not visible, when make visible it's hidden state. around half of overlays couldn't visible.
another need since using around 2000 mkoverlays, app got free few seconds while zooming. think in case, map re rendering overlay @ each zoom level. there way handle efficiently?
can me best way handle scenario.
thanks , regards, sreelash
Comments
Post a Comment