You could hack the DOM to access the floatPane where infoWindow
resides. But how can you position your custom info window in the pane
that moves when map is dragged?
By OverlayView you get access to the panes and to the projection
object that has fromLatLngToDivPixel() method.
You can create an invisible dummy OverlayView for the purpose:
function getOverlayView(map){
var ov = new google.maps.OverlayView();
ov.onAdd = function(){};
ov.draw = function(){};
ov.onRemove = function(){};
ov.setMap(map);
return ov;
}
Now you can access the info window pane by:
getOverlayView(map).getPanes().floatPane;
And get the pixel point for a location:
getOverlayView(map).getProjection().fromLatLngToDivPixel(LatLng) ;
The function calls should not be made until the DOM is fully
initialized.
--
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.