Continuing my experience with overlay and projection.

I have a custom overlay class and have made sure that the projection
is retrieved only after onAdd. The projection is placed in a var
available. None of my script runs until onAdd has been called.

Much much later in my scripting I have the following code that is
throwing the error:
Error: a.lng is not a function
Source File: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/0/33/main.js
Line: 33

function setMarkers() {
        for (var markerIndex in markers) {
                var marker = markers[markerIndex];
                var position = marker.getPosition();
                var lat = position.lat();
                var p1 = proj.fromLatLngToDivPixel(lat);
        }
}


Note that I'm not even calling for longitude. If I comment out the var
p1 line, everything works fine. I've also confirmed that proj, lat,
position, and marker are not undefined.

-- 
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.

Reply via email to