Outdooractive / route-me

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

shapes disappear when zoomed inside them #94

Open incanus opened 12 years ago

incanus commented 12 years ago

If you create an RMShape and then zoom in within its bounds far enough that the borders are out of view, the polygon disappears. I discovered this accidentally when I created a filled polygon, then zoomed in, but noticed that the fill color disappeared once the borders out zoomed out of view.

noberasco commented 11 years ago

Actually the shape disappears when it's origin point (the location associated to the RMAnnotation) goes off bounds.

I managed to get it to work by:

The latter however has the nasty side effect of exhausting available memory if the annotation is a polyline with many points and zoom level is wide enough to allow most of these points to be visible. I'm still investigating this secondary issue, but since I don't really understand the RMQuadTree workings it's a bit difficult for me.

noberasco commented 11 years ago

In the end I just removed the entire RMQuadTree from my route-me fork as I had no need for it (I already had my own marker clustering implementation). That, and setting the proper projectedBoundingBox for the RMAnnotations, is enough to get rid of this problem without memory issues.

cloay commented 11 years ago

I have this issue too.

incanus commented 11 years ago

FWIW this no longer happens with https://github.com/mapbox/mapbox-ios-sdk due to fixes in RMShape.