//
if ( BrowserIsGMapsCompatible() )
{
var gmaps_marker = [];
var gmaps_marker_shadow = [];
var gmaps_marker_main = [];
var gmaps_marker_infowindow = [];
var gmaps_marker_is_hovering = [];
function gmaps_marker_mouseover(count,image_hover,html,tooltip_xoffset,tooltip_yoffset)
{
// switch icon image for hover image on marker mouseover and display the tooltip
if ( ! gmaps_marker_is_hovering[count] )
{
gmaps_marker_is_hovering[count] = 1;
gmaps_marker_main[count].setIcon( image_hover );
if (html)
{ // show tooltip
var tooltipContentString = '
'+html+'
';
gmaps_marker_infowindow[count] = new google.maps.InfoWindow({
content: tooltipContentString,
// maxWidth: 400,
pixelOffset: new google.maps.Size(tooltip_xoffset,tooltip_yoffset)
});
gmaps_marker_infowindow[count].open(map, gmaps_marker_main[count]);
}
}
return true;
}
function gmaps_marker_mouseout(count,image_main)
{
// switch hover image for main image on marker mouseout and hide the tooltip
if ( gmaps_marker_is_hovering[count] )
{
gmaps_marker_is_hovering[count] = 0;
gmaps_marker_main[count].setIcon( image_main );
if ( gmaps_marker_infowindow[count] )
{
// hide tooltip
gmaps_marker_infowindow[count].close();
}
}
return true;
}
// function to create the marker and set up the event window
function createMarker(map,lat_lng,html,count,thing_id)
{
var detail_url = '';
// extract required info associated with the particular thing_id
if ( thing_id == 2845 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_3.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)
};
gmaps_marker_shadow[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_shadow,
zIndex: 1
});
var image_main = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/main/7/7/1/771.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)
};
// 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'
};
gmaps_marker_main[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_main,
shape: shape,
title: 'Freitas Cherry Ranch',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/7/7/1/771.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)
};
gmaps_marker_is_hovering[count] = 0;
detail_url = 'https://www.top10fresh.com/reviews/farmers/California/sbr/date_desc/2845/freitas-cherry-ranch.htm';
if (detail_url)
{
// clicking on the marker will open the detail page for the thing; hovering will show the tooltip
var clickURL = detail_url;
var target = '_self';
gmaps_marker_main[count].addListener('click', function() {
window.open(clickURL, target);
});
}
// switch icon image for hover image on marker mouseover and mouseout
gmaps_marker_main[count].addListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0)
});
gmaps_marker_main[count].addListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main)
});
// add listeners to allow the tooltips to be invoked when
// mousing over the known_as links in the thing listing
var link_id = 'known_as_link_2845';
var link_elem = document.getElementById(link_id);
if (window.addEventListener) // Mozilla, Netscape, Firefox
{
link_elem.addEventListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
}, false );
link_elem.addEventListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main);
}, false );
}
else // IE
{
link_elem.attachEvent( 'onmouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
} );
link_elem.attachEvent( 'onmouseout', function() {
gmaps_marker_mouseout(count,image_main);
} );
}
}
if ( thing_id == 2847 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_3.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)
};
gmaps_marker_shadow[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_shadow,
zIndex: 1
});
var image_main = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/main/7/7/3/773.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)
};
// 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'
};
gmaps_marker_main[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_main,
shape: shape,
title: 'Gliedt Family Farm',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/7/7/3/773.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)
};
gmaps_marker_is_hovering[count] = 0;
detail_url = 'https://www.top10fresh.com/reviews/farmers/California/sbr/date_desc/2847/gliedt-family-farm.htm';
if (detail_url)
{
// clicking on the marker will open the detail page for the thing; hovering will show the tooltip
var clickURL = detail_url;
var target = '_self';
gmaps_marker_main[count].addListener('click', function() {
window.open(clickURL, target);
});
}
// switch icon image for hover image on marker mouseover and mouseout
gmaps_marker_main[count].addListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0)
});
gmaps_marker_main[count].addListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main)
});
// add listeners to allow the tooltips to be invoked when
// mousing over the known_as links in the thing listing
var link_id = 'known_as_link_2847';
var link_elem = document.getElementById(link_id);
if (window.addEventListener) // Mozilla, Netscape, Firefox
{
link_elem.addEventListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
}, false );
link_elem.addEventListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main);
}, false );
}
else // IE
{
link_elem.attachEvent( 'onmouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
} );
link_elem.attachEvent( 'onmouseout', function() {
gmaps_marker_mouseout(count,image_main);
} );
}
}
if ( thing_id == 2848 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_3.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)
};
gmaps_marker_shadow[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_shadow,
zIndex: 1
});
var image_main = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/main/7/7/4/774.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)
};
// 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'
};
gmaps_marker_main[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_main,
shape: shape,
title: 'Laird\'s Bing Cherries',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/7/7/4/774.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)
};
gmaps_marker_is_hovering[count] = 0;
detail_url = 'https://www.top10fresh.com/reviews/farmers/California/sbr/date_desc/2848/lairds-bing-cherries.htm';
if (detail_url)
{
// clicking on the marker will open the detail page for the thing; hovering will show the tooltip
var clickURL = detail_url;
var target = '_self';
gmaps_marker_main[count].addListener('click', function() {
window.open(clickURL, target);
});
}
// switch icon image for hover image on marker mouseover and mouseout
gmaps_marker_main[count].addListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0)
});
gmaps_marker_main[count].addListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main)
});
// add listeners to allow the tooltips to be invoked when
// mousing over the known_as links in the thing listing
var link_id = 'known_as_link_2848';
var link_elem = document.getElementById(link_id);
if (window.addEventListener) // Mozilla, Netscape, Firefox
{
link_elem.addEventListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
}, false );
link_elem.addEventListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main);
}, false );
}
else // IE
{
link_elem.attachEvent( 'onmouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
} );
link_elem.attachEvent( 'onmouseout', function() {
gmaps_marker_mouseout(count,image_main);
} );
}
}
if ( thing_id == 2850 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_3.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)
};
gmaps_marker_shadow[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_shadow,
zIndex: 1
});
var image_main = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/main/7/7/6/776.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)
};
// 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'
};
gmaps_marker_main[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_main,
shape: shape,
title: 'Morro Bay CFM',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/7/7/6/776.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)
};
gmaps_marker_is_hovering[count] = 0;
detail_url = 'https://www.top10fresh.com/reviews/farmers/California/sbr/date_desc/2850/morro-bay-cfm.htm';
if (detail_url)
{
// clicking on the marker will open the detail page for the thing; hovering will show the tooltip
var clickURL = detail_url;
var target = '_self';
gmaps_marker_main[count].addListener('click', function() {
window.open(clickURL, target);
});
}
// switch icon image for hover image on marker mouseover and mouseout
gmaps_marker_main[count].addListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0)
});
gmaps_marker_main[count].addListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main)
});
// add listeners to allow the tooltips to be invoked when
// mousing over the known_as links in the thing listing
var link_id = 'known_as_link_2850';
var link_elem = document.getElementById(link_id);
if (window.addEventListener) // Mozilla, Netscape, Firefox
{
link_elem.addEventListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
}, false );
link_elem.addEventListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main);
}, false );
}
else // IE
{
link_elem.attachEvent( 'onmouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
} );
link_elem.attachEvent( 'onmouseout', function() {
gmaps_marker_mouseout(count,image_main);
} );
}
}
if ( thing_id == 2851 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_3.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)
};
gmaps_marker_shadow[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_shadow,
zIndex: 1
});
var image_main = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/main/7/7/7/777.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)
};
// 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'
};
gmaps_marker_main[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_main,
shape: shape,
title: 'Morro Bay Fisherman’s Wharf CFM',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/7/7/7/777.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)
};
gmaps_marker_is_hovering[count] = 0;
detail_url = 'https://www.top10fresh.com/reviews/farmers/California/sbr/date_desc/2851/morro-bay-fishermanas-wharf-cfm.htm';
if (detail_url)
{
// clicking on the marker will open the detail page for the thing; hovering will show the tooltip
var clickURL = detail_url;
var target = '_self';
gmaps_marker_main[count].addListener('click', function() {
window.open(clickURL, target);
});
}
// switch icon image for hover image on marker mouseover and mouseout
gmaps_marker_main[count].addListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0)
});
gmaps_marker_main[count].addListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main)
});
// add listeners to allow the tooltips to be invoked when
// mousing over the known_as links in the thing listing
var link_id = 'known_as_link_2851';
var link_elem = document.getElementById(link_id);
if (window.addEventListener) // Mozilla, Netscape, Firefox
{
link_elem.addEventListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
}, false );
link_elem.addEventListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main);
}, false );
}
else // IE
{
link_elem.attachEvent( 'onmouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
} );
link_elem.attachEvent( 'onmouseout', function() {
gmaps_marker_mouseout(count,image_main);
} );
}
}
if ( thing_id == 2855 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_3.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)
};
gmaps_marker_shadow[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_shadow,
zIndex: 1
});
var image_main = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/main/7/7/8/778.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)
};
// 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'
};
gmaps_marker_main[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_main,
shape: shape,
title: 'Morro Bay Thursday CFM',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/7/7/8/778.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)
};
gmaps_marker_is_hovering[count] = 0;
detail_url = 'https://www.top10fresh.com/reviews/farmers/California/sbr/date_desc/2855/morro-bay-thursday-cfm.htm';
if (detail_url)
{
// clicking on the marker will open the detail page for the thing; hovering will show the tooltip
var clickURL = detail_url;
var target = '_self';
gmaps_marker_main[count].addListener('click', function() {
window.open(clickURL, target);
});
}
// switch icon image for hover image on marker mouseover and mouseout
gmaps_marker_main[count].addListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0)
});
gmaps_marker_main[count].addListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main)
});
// add listeners to allow the tooltips to be invoked when
// mousing over the known_as links in the thing listing
var link_id = 'known_as_link_2855';
var link_elem = document.getElementById(link_id);
if (window.addEventListener) // Mozilla, Netscape, Firefox
{
link_elem.addEventListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
}, false );
link_elem.addEventListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main);
}, false );
}
else // IE
{
link_elem.attachEvent( 'onmouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
} );
link_elem.attachEvent( 'onmouseout', function() {
gmaps_marker_mouseout(count,image_main);
} );
}
}
if ( thing_id == 2858 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_3.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)
};
gmaps_marker_shadow[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_shadow,
zIndex: 1
});
var image_main = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/main/7/8/0/780.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)
};
// 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'
};
gmaps_marker_main[count] = new google.maps.Marker({
position: lat_lng,
map: map,
icon: image_main,
shape: shape,
title: 'Comida Carneros',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/7/8/0/780.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)
};
gmaps_marker_is_hovering[count] = 0;
detail_url = 'https://www.top10fresh.com/reviews/farmers/California/sbr/date_desc/2858/comida-carneros.htm';
if (detail_url)
{
// clicking on the marker will open the detail page for the thing; hovering will show the tooltip
var clickURL = detail_url;
var target = '_self';
gmaps_marker_main[count].addListener('click', function() {
window.open(clickURL, target);
});
}
// switch icon image for hover image on marker mouseover and mouseout
gmaps_marker_main[count].addListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0)
});
gmaps_marker_main[count].addListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main)
});
// add listeners to allow the tooltips to be invoked when
// mousing over the known_as links in the thing listing
var link_id = 'known_as_link_2858';
var link_elem = document.getElementById(link_id);
if (window.addEventListener) // Mozilla, Netscape, Firefox
{
link_elem.addEventListener( 'mouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
}, false );
link_elem.addEventListener( 'mouseout', function() {
gmaps_marker_mouseout(count,image_main);
}, false );
}
else // IE
{
link_elem.attachEvent( 'onmouseover', function() {
gmaps_marker_mouseover(count,image_hover,html,15,0);
} );
link_elem.attachEvent( 'onmouseout', function() {
gmaps_marker_mouseout(count,image_main);
} );
}
}
}
let map;
async function initMap()
{
// create a map object with some controls
const { Map } = await google.maps.importLibrary("maps");
map = new google.maps.Map(document.getElementById('map'), {
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU, // HORIZONTAL_BAR | DROPDOWN_MENU,
mapTypeIds: ['roadmap','satellite','terrain','hybrid']
},
scaleControl: true,
zoomControl: true,
fullscreenControl: true,
streetViewControl: true
});
// for each point found, extent the bounds to include it
// determine the bounds of the coordinate data so that
// we can construct a window that hugs the locations
var bounds = new google.maps.LatLngBounds();
// index = 1, supplier_id = 2845
var point_1 = new google.maps.LatLng( 37.887997, -121.66967 );
bounds.extend( point_1 );
// index = 2, supplier_id = 2847
var point_2 = new google.maps.LatLng( 37.941544, -121.629623 );
bounds.extend( point_2 );
// index = 3, supplier_id = 2848
var point_3 = new google.maps.LatLng( 37.942036, -121.675186 );
bounds.extend( point_3 );
// index = 4, supplier_id = 2850
var point_4 = new google.maps.LatLng( 35.36689, -120.850029 );
bounds.extend( point_4 );
// index = 5, supplier_id = 2851
var point_5 = new google.maps.LatLng( 35.366486, -120.849625 );
bounds.extend( point_5 );
// index = 6, supplier_id = 2855
var point_6 = new google.maps.LatLng( 35.389179, -120.858551 );
bounds.extend( point_6 );
// index = 7, supplier_id = 2858
var point_7 = new google.maps.LatLng( 38.296886, -122.298927 );
bounds.extend( point_7 );
var bounds_center = bounds.getCenter();
map.setCenter( bounds_center );
// populate map with the marker locations
// and pad the boundary of the viewing area so the markers don't touch it
var padding = {
bottom: 4,
left: 4,
right: 50,
top: 40
};
map.fitBounds( bounds, padding );
// add markers with infos window. wrap the text in each window.
var tooltip_html_1 = ''
+''
+''
+''
+' '
+' '
+'  | '
+' | '
+' '
+''
+' '
+' '
+' Freitas Cherry Ranch'
+' | '
+'
'
+''
+' '
+' '
+' (925) 634-5461'
+' '
+' '
+' 555 Hoffman Lane'
+' '
+' '
+' Brentwood'
+', 94513'
+' |
'
+'
'
+'';
createMarker( map, point_1, tooltip_html_1, 1, 2845 );
var tooltip_html_2 = ''
+''
+''
+''
+' '
+''
+' '
+' '
+' Gliedt Family Farm'
+' | '
+'
'
+''
+' '
+' '
+' (925) 516-8717'
+' '
+' '
+' 3520 Orwood Road'
+' '
+' '
+' Brentwood'
+', 94513'
+' |
'
+'
'
+'';
createMarker( map, point_2, tooltip_html_2, 2, 2847 );
var tooltip_html_3 = ''
+''
+''
+''
+' '
+' '
+'  | '
+' | '
+' '
+''
+' '
+' '
+' Laird\'s Bing Cherries'
+' | '
+'
'
+''
+' '
+' '
+' (925) 998-5769'
+' '
+' '
+' 3150 Sellers Avenue'
+' '
+' '
+' Brentwood'
+', 94513'
+' |
'
+'
'
+'';
createMarker( map, point_3, tooltip_html_3, 3, 2848 );
var tooltip_html_4 = ''
+''
+''
+''
+' '
+' '
+'  | '
+' | '
+' '
+''
+' '
+' '
+' Morro Bay CFM'
+' | '
+'
'
+''
+' '
+' '
+' (805) 772-4467'
+' '
+' '
+' Main & Harbor'
+' '
+' '
+' Morro Bay'
+', 93406'
+' |
'
+'
'
+'';
createMarker( map, point_4, tooltip_html_4, 4, 2850 );
var tooltip_html_5 = ''
+''
+''
+''
+' '
+' '
+'  | '
+' | '
+' '
+''
+' '
+' '
+' Morro Bay Fisherman’s Wharf CFM'
+' | '
+'
'
+''
+' '
+' '
+' (805) 772-4467'
+' '
+' '
+' 880 Main Street'
+' '
+' '
+' Morro Bay'
+', 93442'
+' |
'
+'
'
+'';
createMarker( map, point_5, tooltip_html_5, 5, 2851 );
var tooltip_html_6 = ''
+''
+''
+''
+' '
+' '
+'  | '
+' | '
+' '
+''
+' '
+' '
+' Morro Bay Thursday CFM'
+' | '
+'
'
+''
+' '
+' '
+' (805) 544-9570'
+' '
+' '
+' Spencers Market 2650 Main Street'
+' '
+' '
+' Morro Bay'
+', 93442'
+' |
'
+'
'
+'';
createMarker( map, point_6, tooltip_html_6, 6, 2855 );
var tooltip_html_7 = ''
+''
+''
+''
+' '
+' '
+'  | '
+' | '
+' '
+''
+' '
+' '
+' Comida Carneros'
+' | '
+'
'
+''
+' '
+' '
+' (707) 266-8228'
+' '
+' '
+' 2285 2nd Street Unit B'
+' '
+' '
+' Napa'
+', 94558'
+' |
'
+'
'
+'';
createMarker( map, point_7, tooltip_html_7, 7, 2858 );
}
initMap();
}
//