UPDATE:
I've now got the marker logic in place so that - on initial display - the 
infowindow will appear in the correct place relative to the marker position. 
Marker on the left, window on the right, marker at the bottom, window above, 
and so on....

Now I just need something to update all of the marker positions for this when 
the map is moved.......

Regards,
Michael Price

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Michael Price
Sent: 16 June 2009 11:19
To: [email protected]
Subject: RE: Update result of fromLatLngToDivPixel if map is moved?


Unfortunately being able to upload it is tricky - I'm forbidden to go live with 
it until it works! They have a staging server but I'm not allowed to give THAT 
URL out either. It would take me all day to deconstruct what I have for demo 
purposes :(

Essentially what our client wants is an infowindow which appears without having 
to pan the map. I've written a custom overlay to display the window (he didn't 
want the bubble either), and the rule is essentially that the window will 
appear in different positions depending on the marker position relative to the 
map.

If the marker is too close to the left edge (and therefore some of the window 
would be off the left edge), display the window to the RIGHT of the marker.

If the marker is too close to the bottom edge, display the window ABOVE the 
marker.

If the marker is too close to the right edge, display the window to the LEFT of 
the marker.

These rules can also be combined so a marker in the bottom left corner, for 
example, the window would open above and to the right.

I have all of the logic for this but I just can't make it work - even if I 
offset the markers and alert the new left and top positions the window winds up 
BELOW the marker regardless. If I use fromLatLngToDivPixel then the result of 
that function doesn't change on a map move, and if I use 
fromLatLngToContainerPixel the window end up MILES away for some reason.








--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to