// if ( BrowserIsGMapsCompatible() ) { // function to create the marker and set up the event window function createMarker(map,html) { // Marker sizes are expressed as a Size of X,Y where the origin of the image // (0,0) is located in the top left of the image. // Origins, anchor positions and coordinates of the marker increase in the X // direction to the right and in the Y direction down. var map_center_obj = map.getCenter(); var image_shadow = { url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_1.png', // This shadow marker is normally 71 pixels wide by 40 pixels high. size: new google.maps.Size(71, 40), // The origin for this image is (0, 0). origin: new google.maps.Point(0, 0), // The anchor for this image is the base normally at (43, 40). anchor: new google.maps.Point(43, 40) }; var image_main = { url: 'https://www.top10fresh.com/produce/reviews/google/icons/main/0/0.png', // This marker is normally 50 pixels wide by 40 pixels high. size: new google.maps.Size(50, 50), // The origin for this image is (0, 0). origin: new google.maps.Point(0, 0), // The anchor for this image is the base at (43, 40). anchor: new google.maps.Point(43, 40) }; var image_hover = { url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/0/0.png', // This marker is normally 50 pixels wide by 40 pixels high. size: new google.maps.Size(50, 50), // The origin for this image is (0, 0). origin: new google.maps.Point(0, 0), // The anchor for this image is the base normally at (43, 40). anchor: new google.maps.Point(43, 40) }; var marker_shadow = new google.maps.Marker({ position: map_center_obj, map: map, icon: image_shadow, zIndex: 1 }); // Shapes define the clickable region of the icon. The type defines an HTML // rect: coords is [x1,y1,x2,y2] where x1,y1 are the coordinates of the upper-left corner // of the rectangle and x2,y2 are the coordinates of the lower-right coordinates of the rectangle. var shape = { coords: [ 25, 0, 50, 50 ], type: 'rect' }; var marker_main = new google.maps.Marker({ position: map_center_obj, map: map, icon: image_main, shape: shape, title: 'Accardi Vineyards', zIndex: 100 }); // store the HTML so that the tooltip function can use it if (html) { var tooltipContentString = '
' +' ' +' Accardi Vineyards' +' | ' +'|
'
+' '
+' (707) 451-9516'
+' '
+' ' +' 7924 Timm Rd.' +' ' +' ' +' Vacaville' +', 95688' +' |