Sure, but why do you pass a function called fromLatLngToFoo only a lat?  As
the name (and docs) suggests it requires a LatLng.

On 17 Mar 2010 07:42, "midimid" <[email protected]> wrote:

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]<google-maps-js-api-v3%[email protected]>
.
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

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