On Jul 30, 1:30 am, BryanFE <
br...@strategoit.com> wrote:
> The docs mention the "fromDivPixelToLatLng" method, but that method is
> on the MapCanvasProjection class, and I can't for the life of me how
> to find this object.
By getProjection() method of OverlayView() class. So you have to
create a dummy OverlayView.
This is a trick from source code of KeyDragZoom library by Nianwei Liu
& Gary Little:
/**@private
* In V3 it is quite hard to gain access to Projection and Panes.
* This is a helper class
* @param {google.maps.Map} map
*/
function ProjectionHelperOverlay(map) {
google.maps.OverlayView.call(this);
this.set_map(map);
}
ProjectionHelperOverlay.prototype = new google.maps.OverlayView();
ProjectionHelperOverlay.prototype.draw = function () {
if (!this.ready) {
this.ready = true;
google.maps.event.trigger(this, 'ready');
}
};
http://google-maps-utility-library-v3.googlecode.com/svn/tags/keydragzoom/1.0/
By the way, the line
google.maps.OverlayView.call(this);
is no more needed with the current version of api.