Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix RMPath #64

Open
michaeltyson opened this Issue · 8 comments

3 participants

@michaeltyson

(Quoting vyskocil:) Redraw is sometimes broken, slowdowns with small zoom level, out of memory error arise sometimes (layer too big), missing features

@michaeltyson

May I propose User/Project@SHA ref: michaeltyson/route-me@a54a756 as a starting point for revising RMPath: This introduces some more sensible path geometry (not the weird inverted thing that was there originally), and adds both bounds calculation and direct CGPath access. It's cleaner, too.

@amjaliks

Michael, why don't you put your proposed changes for RMPath to master branch?

@michaeltyson

I haven't done it yet mostly because it's largely untested, and I'm currently flat-out on a product development cycle.

Pretty soon I'm going to work on an update to one of my apps that'll use paths, and that'll necessitate a closer look at RMPath - I intend to roll it into the master when I do that. Will be a couple/several weeks yet, though.

@amjaliks

Now I am working also a project where I need to you RMPath a lot. Maybe you can share your change in a branch? Thus, we don't create two incompatible solutions?

@amjaliks

Michael, is there any chance you will share your improved RMPath code shortly? Or I need dig it my self? :)

@michaeltyson

I already have =) The link's the first comment, above

@matspetter

I have tried Michaels RMPath proposed in this issue and it works much better than the current version. I had one issue though. I got crashes when zooming in and out and when the path was outside the visible area. I tracked it down to the recalculateGeometry in the new RMPath. I changed the end of this method so that right after:

pixelBounds = CGRectIntersection(pixelBounds, CGRectInset(screenBounds, -outset, -outset));

the rest of the method now looks like:

if (!CGRectIsNull(pixelBounds))

{

pixelBounds.origin.x -= myPosition.x; pixelBounds.origin.y -= myPosition.y;

self.anchorPoint = CGPointMake(-pixelBounds.origin.x / pixelBounds.size.width,-pixelBounds.origin.y / pixelBounds.size.height);

}

self.bounds = pixelBounds;

[super setPosition:myPosition];

[self setNeedsDisplay];

@michaeltyson
Owner

Okay, I've submitted my implementation (with matspetter's fix - thanks!) for perusal - see route-me/#121.

@jklimke jklimke referenced this issue from a commit in jklimke/mapbox-ios-sdk
@incanus incanus refs #64: first cut of static map view d942f55
@jklimke jklimke referenced this issue from a commit in jklimke/mapbox-ios-sdk
@incanus incanus refs #64: simplestyle marker support for static map views 6ed8c42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.