Outdooractive / route-me

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

shape clipping when map view smaller than its superview #120

Closed incanus closed 11 years ago

incanus commented 11 years ago

I'm seeing weird behavior in our SDK reported by a user, so I tested it with your release and see the same effect.

Essentially, when a map view is inset from its superview, clipping of shape paths happens at that map edge.

For example, with this code:

https://gist.github.com/62053add1138f9ba03d9

The map view is inset from the main view by 220 pixels on the top. When the shape approaches the top via map panning, it gets clipped erratically.

IMG_0477

This does not seem to happen when the map view is the full size of the containing view.

The user also reports that it happens around 150 or more pixels, which of course draws me to this line:

https://github.com/Alpstein/route-me/blob/release/MapView/Map/RMShape.m#L191

But changing it doesn't seem to have any affect.

Any ideas here?

incanus commented 11 years ago

Think I might have fixed it above.

incanus commented 11 years ago

Cool, I'll send my fix up to you soon, along with a bunch more of our recent work.