Why not use the world coordinates instead? They do not have the issue of the coordinate system being non-linear with Latitude.
I use "fromLatLngToPoint(latLng:LatLng, point?:Point)". You get a float coordinate between 0-256. When you have caculated the displacement in world coordinates you simply convert back to lng/lat whenplacing it. .nikolaj On Feb 8, 7:56 pm, magicrat75 <[email protected]> wrote: > Hi > > Thanks for telling me about the problem when zooming with the marker > open Martin. I'll try to sort it out. > > Bratliff, even though it is not linear, as happens to Martin, the line > is good enough for my purposes. What I effectively need is the line to > go from the marker actual coordinat to "somewhere under the icon" so > that the icon is clearly marked. Taking into account the little pixels > and the small range of zooms I allow, this works well enough for me. > > D. > > On 8 feb, 17:44, Martin Matysiak <[email protected]> wrote: > > > > > > > > > Great to hear that it works, I noticed a small bug, though: when you click > > on a marker and then change the zoom, the line does not get updated and it > > appears too long or too short. So maybe you should listen for the "zoom > > changed" event and update the lines if this happens :-) > > > And thanks to bratliff for pointing out the fact that the latitude isn't > > linear, didn't know that. However in my use case the linear approximation > > seems to work out quite well, as I don't need highly accurate conversions. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
