Hi Alex- I'm not sure why bindInfoWindowHtml is behaving that way, but you can get the expected behavior by using bindInfoWindow. I'll look into the issue.
Rossko - This is actually the case of script inside a Mapplet (which should work), not script inside an infowindow. - pamela On Sat, Dec 13, 2008 at 11:08 PM, alex_monthy <[email protected]> wrote: > > The code below is supposed to open a map with a marker in its center > which has an associated info window. > When testing with Mapplet Scratch Pad, the info window shows up but > does not display the string "This is the center" but the string > "[object HTMLDivElement]" > What am I missing here? > > --- Module code --- > <?xml version="1.0" encoding="UTF-8"?> > <Module> > <ModulePrefs> > <Require feature="sharedmap"/> > </ModulePrefs> > <Content type="html"><![CDATA[ > <script> > var map = new GMap2(); > var point = new GLatLng(50.8,7.2); > map.setCenter(point, 10); > > var marker = new GMarker( point ); > map.addOverlay(marker); > marker.bindInfoWindowHtml("This is the center"); > </script> > > ]]></Content> > </Module> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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-API?hl=en -~----------~----~----~----~------~----~------~--~---
