On Dec 11, 5:06 am, trice22 <[EMAIL PROTECTED]> wrote:
> Thanks for the reply—
>
> unfortunately I don't have the code anywhere online yet. I'll see if I
> can put it up for this purpose, but that might take some time.
> Until then I'm open for educated guesses as well—the code you see here
> is pretty much all I have anyways. It's not a very complex
> application.
>

Try this:
http://econym.org.uk/gmap/steps.htm


> On Dec 11, 2:58 pm, Tubby Grey <[EMAIL PROTECTED]> wrote:
>
> > Might be easier to provide a link to your page in order for someone to
> > help.
>
> > On Dec 11, 5:48 am, trice22 <[EMAIL PROTECTED]> wrote:
>
> > > Hello,
>
> > > I'm trying to open a simple InfoWindow on click on a marker. The marker
> > > (s) have been set by the GDirections() method and I'm reading the
> > > markers like this:
>
> > > var directions = new GDirections(map);
> > > var markers[0] = directions.getMarker(0);
>
> > > The problem is, that the map shows me on click the small zoomed map
> > > instead of the infowindow. I've figured out, that I'm setting the
> > > eventhandler "too early" but I can't see how to do it differently.
> > > Here's a bit of code.
>
> > > function initialize()
> > > {
> > >         map = new GMap2(document.getElementById("map_canvas"));
> > >         map.addControl(new GSmallMapControl());
> > >         directionsPanel = document.getElementById("route");
> > >         directions = new GDirections(map);
> > >         directions.load("from: Address 1 to: Address 2");
> > >         GEvent.addListener(directions.getMarker(0), "click", function() {
> > >                 directions.getMarker(0).openInfoWindowHtml('<p>Text here 
> > > and here</
> > > p>');
> > >         });
>
> > > }
>
> > > $(window).ready(function()
> > > {
> > >         initialize();
>
> > > });
>
> > > If I'm placing the event in it's own method and call it e.g. from a
> > > console, everything works fine.
>
> > > Any ideas how I could fix this?
>
> > > Cheers,
> > > —trice
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to