Thank you, Pamela,

meanwhile I understood that the 1st parameter for bindInfoWindowHtml() 
must not be a text string containing some html code but a variable 
representing an html element in the DOM tree, as for example can be 
retrieved with getElementById().

- Alex

pamela (Google Employee) schrieb:
> 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 <alex_mon...@gmx.de 
> <mailto:alex_mon...@gmx.de>> 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 Google-Maps-API@googlegroups.com
To unsubscribe from this group, send email to 
google-maps-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to