Hi folks - my end game is calling the function
fromContainerPixelToLatLng, but in order to get there, I need an
instance of projection to play with.  But projection is undefined no
matter how hard I try.
Code:

    function getGMap() {
        var myLatlng = new google.maps.LatLng(...elided...);
        var myOptions = {
            zoom: 19,
            center: myLatlng,
            mapTypeId: google.maps.MapTypeId.SATELLITE,
            draggable: true, /* You can move by dragging around */
            scaleControl: false, /* But the control is not visible */
            disableDefaultUI: true, /* Remove all the distracting
google maps UI stuff */
            disableDoubleClickZoom: true, /* And you can't double
click to zoom */
            scrollwheel: false /* And you can't scroll to zoom */
        };
        var map = new google.maps.Map($(".map")[0], myOptions);

        // set up a prototype for google maps
        MyOverlay.prototype = new google.maps.OverlayView();
        MyOverlay.prototype.onAdd = function() { };
        MyOverlay.prototype.onRemove = function() { };
        MyOverlay.prototype.draw = function() { };
        function MyOverlay(map) { this.setMap(map); };

        // set up the GMap overlay (not the same as the HTML5 overlay
I made)
        // without setting up this overlay, google maps won't be able
to get an instance of the projection, which we need for unit
calculations
        var overlay = new MyOverlay(map);
        var projection = overlay.getProjection();
        MyApp.Projection = projection;
        return map;
    };

What's wrong?

-- 
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 google-maps-js-api...@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to