Add an event listener to the "click" event of KmlLayer and use the
KmlMouseEvent and KmlFeature data passed to the event listener to
reconstruct your infowindow, with the appropriate click handler.

You will want to set suppressInfoWindows to true on your KmlLayer to stop
the default ones opening as well.

Regards,
James

On Wed, Jan 19, 2011 at 9:16 AM, ra2awee <[email protected]> wrote:

> Hi all,
>
> I have a google map setup which loads the markers from KML files
> dynamically, each marker's InfoWindow has a link, what I need to do is get
> the link to open in a shadowbox (it's like a thickbox). All I need to do is
> add: *Shadowbox.open(this);return false;* to the link, but google maps is
> stripping it out when displaying it
>
> This is what it looks like in the KML file:
> <Placemark>
>   <name>Company title</name>
>   <description>
>      <a onclick="Shadowbox.open(this);return false;"
> rel="shadowbox;height=500;width=820" class="links"
> href="/supplier/details.html?id=xxx">More...</a>
>   </description>
>   <styleUrl>#regional</styleUrl>
>   <Point>
>      <coordinates>176.2323845, -38.1341707, 0</coordinates>
>   </Point>
> </Placemark>
>
> and this is how google maps renders the link:
> <a target="_blank" rel="shadowbox;height=500;width=820"
> href="/supplier/details.html?id=xxx">More...</a>
>
> So what other ways can I do this? I am unsure as to how to add an event
> listener to listen to the InfoWindow being opened, but it might work?
>
> Thanks in advance
>
> --
> 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