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

Request to help on how to stop the animation for a certain period of 2 seconds and then resume the moving annotation #1

Open
deepcodingios opened this issue Oct 9, 2012 · 3 comments

Comments

@deepcodingios
Copy link

Hi,

Thanks a lot for the Post Moving MKAnnotationView. Its very helpful and its been used by many. I came across a similar kind of requirement where i need to animate the annotation points between multiple map points. I was able to do it with the post u have suggested but apart from that i need to stop the animation at certain annotation points and wait for 2 seconds and then start the animation again. Can you please help me? It would be of great help if any alternative or suggestion is provided for this..

@100grams
Copy link
Collaborator

100grams commented Oct 9, 2012

Hi Pradeep,

MKMovingAnnotation has a start and stop methods which will do what you want. All you need to do is have MKMovingAnnotation store (e.g. in an ivar) the last location, and when start is called, resume movement from this location, and not from the beginning of you path.

@deepcodingios
Copy link
Author

Hii Rotem,

I understand the answer and i have checked the same about stop method. But i am confused on the code where start method is implemented. My actual requirement is to start the animation of moving object from the starting point. But when it reaches the second point it should stop for about 2 seconds and the resume the movement again. In my example I have 5 Annotation points and the Moving object should stop at 2nd,3rd and 4th point. Can u please explain me on how to implement this with a sample code?

My Annotation points:-

50.842720,4.362010
50.842330,4.364860
50.843550,4.371950
50.842990,4.371330
50.843180,4.370370

Thanks & Regards,
Pradeep Reddy Kypa
8801908980
Sr.Developer - Mobility

@deepcodingios
Copy link
Author

i Rotem,

I understand the answer and i have checked the same about stop method. But
i am confused on the code where start method is implemented. My actual
requirement is to start the animation of moving object from the starting
point. But when it reaches the second point it should stop for about 2
seconds and the resume the movement again. In my example I have 5
Annotation points and the Moving object should stop at 2nd,3rd and 4th
point. Can u please explain me on how to implement this with a sample code?

*My Annotation points:- *

50.842720,4.362010

50.842330,4.364860

50.843550,4.371950

50.842990,4.371330

50.843180,4.370370

Thanks & Regards,
Pradeep Reddy Kypa
8801908980
Sr.Developer - Mobility

On Tue, Oct 9, 2012 at 2:12 PM, Rotem Rubnov [email protected]:

Hi Pradeep,

MKMovingAnnotation has a start and stop methods which will do what you
want. All you need to do is have MKMovingAnnotation store (e.g. in an ivar)
the last location, and when start is called, resume movement from this
location, and not from the beginning of you path.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-9253250.

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

1 participant