On Dec 16, 7:18 am, Gady <[email protected]> wrote:
> In the link I have in my original post, clicking on the Zoom button
> automatically zooms to the polyline and then opens the infowindow for
> that polyline without clicking on it. With your help, this is now done
> automatically except the infowindow doesn't open automatically. I
> would like to carry over this functionality (automatic opening of
> infowindow) after zooming to the polyline when the page loads.


It looks like you need to wait for the overlays to finish rendering.
This seems to work for me:
                GEvent.addListener(geoXml, "load", function()
{ setTimeout(buttonClick, 1); });

  -- Larry

>
> Thanks again for the help!
>
> Gady
>
> On Dec 15, 10:42 am, "[email protected]" <[email protected]>
> wrote:
>
>
>
> > On Dec 15, 9:21 am, Gady <[email protected]> wrote:
>
> > > Except the infowindow won't open when the click event is triggered.
> > > Any ideas?
>
> > Perhaps post a link to a map that exhibits the problem?
>
> > When I click on the polyline in both the link I posted and the link
> > you posted, I see an infoWindow.  Or are you talking about something
> > else?
>
> >   -- Larry
>
> > > On Dec 14, 3:44 pm, "[email protected]" <[email protected]>
> > > wrote:
>
> > > > On Dec 14, 1:48 pm, Gady <[email protected]> wrote:
>
> > > > > I am one piece away from finishing this and need some help from the
> > > > > experts, so here is my problem:
>
> > > > > I have a map that loads a KML file using GGeoXml and adds the
> > > > > geometries to the map using addoverlay. I also have a button that,
> > > > > when clicked, grabs the text value from a URL parameter (called "id")
> > > > > and searches the names of all of the overlays from the KML file, and
> > > > > if it finds the text value within the name, zooms to that individual
> > > > > overlay. I'm using an addoverlay event listener on the map and adding
> > > > > each individual overlay from the KML to a global array. All of this
> > > > > works with no problems, and can be viewed here with the source
> > > > > available:
>
> > > > >http://www.public.asu.edu/~gpitaru/TrafficAlerts.html?id=202
>
> > > > > The problem is that I need to do all of this when the page/loads,
> > > > > instead of at the click of the button. So first the page loads, then
> > > > > the map loads, then the overlay is added, and then I want the map to
> > > > > automatically zoom to the individual overlay using the URL parameter.
> > > > > I tried calling the same function the button calls after my initialize
> > > > > function in body onoad, but it didn't work. I've also tried the event
> > > > > when the GeoXml loads and after it has been added to the map as an
> > > > > overlay, but it appears that the event I need to capture doesn't
> > > > > exist: when adding each individual overlay to the array is complete.
> > > > > If it did exist, then I could zoom to the individual overlay based on
> > > > > the URL parameter after it was triggered. But instead I'm at a loss.
>
> > > > > Any help here would be much appreciated. Thanks.
>
> > > > You mean like 
> > > > this?http://www.geocodezip.com/public_asu_edu_TrafficAlertsA.html?id=202ht...
>
> > > >   -- Larry- Hide quoted text -
>
> > > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

--

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.


Reply via email to