Arrghy! Cut/paste problem and Ron feels so silly. Many thanks. On Sep 3, 11:20 am, "Susannah (Google Employee)" <[email protected]> wrote: > Hi Ron, > > In your code you correctly call fromContainerPixelToLatLng on the > MapCanvasProjection object: > alert('fromContainerPixelToLatLng > '+proj.fromContainerPixelToLatLng(tp)); > > But, you are trying to access fromLatLngToContainerPixel on the > overlay itself: > if (overlay.fromLatLngToContainerPixel) { > alert('fromLatLngToContainerPixel > '+overlay.fromLatLngToContainerPixel(latlng1)); > > } > > As noted in the reference (and as you've printed on your page), both > fromContainerPixelToLatLng and fromLatLngToContainerPixel are defined > on the MapCanvasProjection > object.http://code.google.com/apis/maps/documentation/javascript/reference.h... > > -Susannah > > On Sep 3, 11:09 am, Ron <[email protected]> wrote: > > > Insanity! > > > Per the V3 API reference docs, I've created an object that inherits > > from OverlayView, constructed an instance of it, set the map instance, > > waited until darw() has been called, then obtained the > > MapCanvasProjection object from it. > > > I can then successfully call the getWorldWidth(), and both of the > > from*ToLatLang() methods, but calls to either of the fromLatLangTo*() > > functions give "blah is not a function". > > > Worse, introspecting the projection object suggests that it DOES has > > both fromLatLangToDivPixel and fromLatLangToContainerPixel > > functions! > > > I've placed a demo of this problem online at: > > >http://metadata.net/gm/gmv3t1.html > > > It's test code, but clean enough to read. After the map displays, > > click on the "Show Projection structure and call functions" link under > > the map. The introspected projection object will be displayed below > > tha map, and all of the object's functions called with results > > displayed in alerts. > > > Any clues to the cause of the problem greatly appreciated!!
-- 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.
