Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shapes disappear when zoomed inside them #94

Open
incanus opened this issue Jul 26, 2012 · 4 comments
Open

shapes disappear when zoomed inside them #94

incanus opened this issue Jul 26, 2012 · 4 comments

Comments

@incanus
Copy link

incanus commented Jul 26, 2012

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
Copy link

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:

  • setting the correct projectedBoundingBox property for the annotation (it must take into consideration the full shape not just the origin point)
  • changing the addAnnotation: method of RMQuadTree so that the instructions [self removeUpwardsAllCachedClusterAnnotations]; return; are executed unconditionally

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
Copy link

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
Copy link

cloay commented Jan 24, 2013

I have this issue too.

@incanus
Copy link
Author

incanus commented Feb 12, 2013

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

yarry pushed a commit to yarry/route-me that referenced this issue Jul 18, 2015
Allow delegate to be set via IBOutlet in IB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants