Skip to content

Animation#87

Open
viskin wants to merge 9 commits intojawj:masterfrom
terikon:animation
Open

Animation#87
viskin wants to merge 9 commits intojawj:masterfrom
terikon:animation

Conversation

@viskin
Copy link

@viskin viskin commented Mar 21, 2015

Hi George.

This PR adds possibility to use marker-animate-unobtrusive to perform marker animations. The process is explained here.
It includes non-functional and functional changes.

Non-functional changes are:

  • As I use Windows, I added build.bat script, which is just converted version of build.sh.
  • Updated google maps version to current (3.19).
  • Attached 2 annotation files of marker-animate-unobtrusive library, for closure compiler.

Functional changes are calls to ghostPosition instead of position everywhere.

What marker-animate-unobtrusive provide is MarkerWithGhost class that one can use instead of google.maps.Marker. It makes marker animate between setPosition calls, and in addition it provides "ghost mode", in which marker moves without notifying its position changes to user code. You enter "ghost mode" by calling setGhostPosition, and position changes are traced with ghostposition_changed events. It makes spiderfying completely transparent to user code.

My knowledge of coffeescript is close to zero, so I hope you can fix changes I made in oms.coffee.

What I did not implement is, of course, feature detection. It should check for existence of setGhostPosition method on marker, and if not found, call plain setPosition, as usual. Same with ghostposition_changed event and ghostPosition field.

Hope you will find this functionality useful.

@viskin
Copy link
Author

viskin commented Apr 20, 2015

Just an afterthought.

It would be nice to receive (optionally) alternative getPosition and setPosition functions for marker, as well as name of 'position_changed' event.
This way without affecting original implementation, it will be possible for marker-animate-unobtrusive to use the original version Spiderfier by providing these alternative implementations.

I just don't know coffeescript, otherwise I'd provide a PR for this.

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

Successfully merging this pull request may close these issues.

2 participants