Outdooractive / route-me

Open source map library for iOS
Other
122 stars 400 forks source link

RMShape disappears if it gets re-added to map view until next zoom or pan #137

Open mohpor opened 10 years ago

mohpor commented 10 years ago

Hi, I'm experiencing with some kind of trouble here. When I add a shape (a Multi Point) to mapview it appears instantly on the map, but if I remove it and add it to map without changing the BBox or Zoom level, they won't show up, not until next change in map region being displayed. I have further investigated this issue, it rises from the fact that -mapView:layerForAnnotation: won't be called immediately after adding annotations to the map, as if they don't need to be styled. Interesting enough, it doesn't happen when adding RMMarkers to the map. (both added through RMAnnotation objects)

I'm not sure If I'm right, but handling shape and other vector elements along with standard annotations seems a little odd and unreasonable. I have worked with several mapping engines and SDKs (R&D for my current project) and it seems that most developers do that, but to be fair, most others use layers and group them that way.

anyway, the delegate method for styling annotations doesn't call enough times and it leads to yet another problem, if an RMShape's original coordinate (forced by annotation allocation BTW) isn't visible during the pan or zoom, that shape won't be added to map and leads to numerous layout jitters that are really annoying. So far I have been working real hard to find a way to use either route-me or map box iOS SDK, but there are problems that need immediate attention.

I can chip in to help mitigate some of these bugs, so, count me in.