// // This JS file sets up the Gmap and shows all of the locations in a specific region. Its // used by the maps app for the home page. // if (GBrowserIsCompatible()) { var gmarkers = []; // // Function linked to "Map It!" button to open marker windows given a location ID. // function map_it_click(location_id) { GEvent.trigger(gmarkers[location_id], "click"); window.location.hash="map"; } // // custom icon to use on the map // var icon = new GIcon(); icon.image = "http://labs.google.com/ridefinder/images/mm_20_red.png"; icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png"; icon.iconSize = new GSize(12, 20); icon.shadowSize = new GSize(22, 20); icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); // // create the map and center it on the napa valley // var map = new GMap2(document.getElementById("map")); map.addControl(new GLargeMapControl()); map.setCenter(new GLatLng(38.4,-122.45), 10); // // setup the ad unit on the map // var publisher_id = "pub-4573498472547028"; adsManagerOptions = { maxAdsOnMap : 2, style: 'adunit', channel: '6137780196' }; adsManager = new GAdsManager(map, publisher_id, adsManagerOptions); adsManager.enable(); // // Generate a "click" listener given a location ID. // var generate_listener = function(location_id){ return function(){ var marker = gmarkers[location_id]; if (marker.retrieved == true){ marker.openInfoWindowHtml('