Thank you for your response. I changed back to an older version, and not using the extra markers anymore. The reason I did that was I wanted to have control over the elabels' opacity by an event listener, so I tried to implement it as it said on Mike's website. I still don't get it how I can get that to work, as I add an invisible marker it overrules the event listener for the original and stops working, the only way I got it to work was to add the same variables which are at the top of the script, but then again it didn't work like it should. Are there more tutorials on the elabels and controlling their opacity? In the end I'll have a map with alot of markers+elabels on it, so I want to make an option only to show the label when people mouseover a marker. What's the best way to tackle that?
thanks again regards Frank On 18 aug, 03:42, "[email protected]" <[email protected]> wrote: > On Aug 17, 1:53 pm, Frank Post <[email protected]> wrote: > > > Hello, > > > I'm using a couple methods I found on Mike's website. These include > > elabels and invisible gmarkers. I'm not sure if I combined it all the > > way it should. I've got a problem getting the event listener for the > > invisible markers to work together with the directions which should > > show in the info windows. When I click on an item in the sidebar the > > info window shows correct as it should be, but unfortunately they > > don't for the markers on the map. Can somebody please help me to > > figure out what I'm doing wrong here, and if I combined everything the > > way it should be. I'm not sure about the loop part which get's the > > data from my XML, and the whole invisible markers setup. Do I need to > > duplicate the whole directions function to the evenlistener of the > > invisible markers!? > > I don't know about "invisible markers", but the reason your > infowindows appear differently when the marker is clicked on vs. the > sidebar is that different code is running. > > sidebar click runs myclick function which does this: > gmarkers[i].openInfoWindowHtml('<div class="infowin">' + htmls[i] + > '</div>'); > > marker click runs this code: > gmarkers[i] = marker; <-------------- this looks really bad, > overwrites an element of the gmarkers array (luckily probably the one > after the end of the array, but still...) > htmls[i] = html; <-------------- same here > gmarkers[i].openInfoWindowHtml('<div class="infowin">' + htmls[i] + > '</div>'); > > I would suggest making one version, defined in the marker click event > handler, then changing myclick to trigger the marker click > lilke this: > function myclick(i) { > GEvent.trigger(gmarkers[i], "click"); > } > > -- Larry > > > > > It seems I need to re-set all values, even they are already set at the > > top of the script > > > site URL:http://usccm.nl/test2.php > > > thank you in advance > > > kind regards > > Frank -- 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.
