-
Notifications
You must be signed in to change notification settings - Fork 236
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
Can I get the original position of a marker? #26
Comments
Yes, it's undocumented (and theoretically subject to change), but you can see an example of this in the A spiderfied marker has an So in CoffeeScript, you can get the original position as follows:
And in plain JS it's:
|
Well, that was fast. Thanks a lot! |
Sorry to reopen, but the "usualPosition" does not seem to be available when using the javascript, compiled version of the script. The property is called mkr._omsData.l - I supposed it's the compiler that rename it since it is not exposed... would probably be a good idea to expose it (and document it ;) ) |
Yes, I guess you're right on both counts. I'll reopen this as an enhancement, but it may be a little while before I get round to it. |
First of all - thanks a bunch for a great utility :-) I also stumbled upon this theme on markers original position vs. spiderfied position. |
I implemented the plugin in a project and it works really fine.
But there is one thing I really miss: I use the markers position to calculate the distance between my location and the marker. When a marker is spiderfied it changes its position. Due to this my calculations are not correct. In most cases it's just a few meters, but sometimes several hundred meter if I have a large amount of markers and therefor a big spiral.
Long story short: Is there any way to get the markers original position without unspiderfying them?
The text was updated successfully, but these errors were encountered: