I've upgraded from v2 to v3, and generally this is a big improvement.
For some reasons my icons do not respond to a click event (I've made
no statement about "clickable", I'm told the default is true.)  The
code is far too much to include it all here.  This is based on a v1
example, so I've included the "createMarker" subroutine here.


function createMarker ( somePoint, name, label, html, anIcon )
{
        gmarkers[markNo] = new google.maps.Marker
        ({
                         position: somePoint,
                         title: name,
                         map: lightsMap,
                         shadow: shadowImage,
                         shape: lightShape,
                         icon: anIcon
        });
        gmarkers[markNo].setMap (lightsMap);
      // revised 11 pm
    htmls[markNo] = html;
    var infoWindow = new google.maps.InfoWindow ({ content: html });
        google.maps.event.addListener ( gmarkers[markNo], 'click',
function()
        {
                  infoWindow.open ( lightsMap, gmarkers[markNo] )
        });

        // save the info we need to use later for the sidebar
        // add a line to the sidebar html
        sidebar_html += '<a href="javascript:myclick(' + markNo + ')">' +
label + '</a><br>';
    markNo++;
    return gmarkers[markNo];
}

The full  page can be found at 
www.lighthousesRus.org/Maps/mapSql3.php?page=GL/ErieWest.

I'd appreciate any suggestions and directions.

-- 
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