//
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 == 495 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_2.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/3/1/31.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: 'Beran Farms',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/3/1/31.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/Colorado/sbr/date_desc/495/beran-farms.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_495';
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 == 4675 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_2.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/3/2/32.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: 'Produce Universe',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/3/2/32.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/Colorado/sbr/date_desc/4675/produce-universe.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_4675';
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 == 497 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_2.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/3/3/33.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: 'Kiowa Valley Organics Dba Gold',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/3/3/33.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/Colorado/sbr/date_desc/497/kiowa-valley-organics-dba-gold.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_497';
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 == 498 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_2.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/3/4/34.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: 'Shedd Farms',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/3/4/34.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/Colorado/sbr/date_desc/498/shedd-farms.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_498';
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 == 499 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_2.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/3/5/35.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: 'Sunny Valley Farms Inc',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/3/5/35.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/Colorado/sbr/date_desc/499/sunny-valley-farms-inc.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_499';
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 == 500 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_2.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/3/6/36.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: 'Colo Kist Farms',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/3/6/36.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/Colorado/sbr/date_desc/500/colo-kist-farms.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_500';
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 == 502 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_2.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/3/8/38.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: 'Mesa Crest Farm See Rogers Me',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/3/8/38.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/Colorado/sbr/date_desc/502/mesa-crest-farm-see-rogers-me.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_502';
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 == 503 )
{
var image_shadow = {
url: 'https://www.top10fresh.com/produce/reviews/skins/default/images/misc/gmaps_shadow_2.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/3/9/39.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: 'Red Fox Run Orchards L L C',
zIndex: 100
});
var image_hover = {
url: 'https://www.top10fresh.com/produce/reviews/google/icons/hover/3/9/39.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/Colorado/sbr/date_desc/503/red-fox-run-orchards-l-l-c.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_503';
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 = 495
var point_1 = new google.maps.LatLng( 40.449989, -104.515541 );
bounds.extend( point_1 );
// index = 2, supplier_id = 4675
var point_2 = new google.maps.LatLng( 37.09024, -95.712891 );
bounds.extend( point_2 );
// index = 3, supplier_id = 497
var point_3 = new google.maps.LatLng( 40.068924, -104.244598 );
bounds.extend( point_3 );
// index = 4, supplier_id = 498
var point_4 = new google.maps.LatLng( 39.842285, -103.048065 );
bounds.extend( point_4 );
// index = 5, supplier_id = 499
var point_5 = new google.maps.LatLng( 37.777473, -106.084976 );
bounds.extend( point_5 );
// index = 6, supplier_id = 500
var point_6 = new google.maps.LatLng( 37.283752, -106.019669 );
bounds.extend( point_6 );
// index = 7, supplier_id = 502
var point_7 = new google.maps.LatLng( 38.825401, -107.783997 );
bounds.extend( point_7 );
// index = 8, supplier_id = 503
var point_8 = new google.maps.LatLng( 39.103771, -108.363708 );
bounds.extend( point_8 );
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 = ''
+''
+''
+''
+' '
+''
+' '
+' '
+' Beran Farms'
+' | '
+'
'
+''
+' '
+' '
+' '
+' 28594 County Road 64'
+' '
+' '
+' Gill'
+', 80624'
+' |
'
+'
'
+'';
createMarker( map, point_1, tooltip_html_1, 1, 495 );
var tooltip_html_2 = ''
+''
+''
+''
+' '
+' '
+'  | '
+' | '
+' '
+''
+' '
+' '
+' Produce Universe'
+' | '
+'
'
+''
+' '
+' '
+' |
'
+'
'
+'';
createMarker( map, point_2, tooltip_html_2, 2, 4675 );
var tooltip_html_3 = ''
+''
+''
+''
+' '
+''
+' '
+' '
+' Kiowa Valley Organics Dba Gold'
+' | '
+'
'
+''
+' '
+' '
+' '
+' 4680 County Road 87'
+' '
+' '
+' Roggen'
+', 80652'
+' |
'
+'
'
+'';
createMarker( map, point_3, tooltip_html_3, 3, 497 );
var tooltip_html_4 = ''
+''
+''
+''
+' '
+''
+' '
+' '
+' Shedd Farms'
+' | '
+'
'
+''
+' '
+' '
+' '
+' 17371 County Road Mm'
+' '
+' '
+' Akron'
+', 80720'
+' |
'
+'
'
+'';
createMarker( map, point_4, tooltip_html_4, 4, 498 );
var tooltip_html_5 = ''
+''
+''
+''
+' '
+''
+' '
+' '
+' Sunny Valley Farms Inc'
+' | '
+'
'
+''
+' '
+' '
+' '
+' 50501 County Road C'
+' '
+' '
+' Center'
+', 81125'
+' |
'
+'
'
+'';
createMarker( map, point_5, tooltip_html_5, 5, 499 );
var tooltip_html_6 = ''
+''
+''
+''
+' '
+''
+' '
+' '
+' Colo Kist Farms'
+' | '
+'
'
+''
+' '
+' '
+' '
+' 20400 County Road 13'
+' '
+' '
+' La Jara'
+', 81140'
+' |
'
+'
'
+'';
createMarker( map, point_6, tooltip_html_6, 6, 500 );
var tooltip_html_7 = ''
+''
+''
+''
+' '
+''
+' '
+' '
+' Mesa Crest Farm See Rogers Me'
+' | '
+'
'
+''
+' '
+' '
+' '
+' 11685 3100 Rd'
+' '
+' '
+' Hotchkiss'
+', 81419'
+' |
'
+'
'
+'';
createMarker( map, point_7, tooltip_html_7, 7, 502 );
var tooltip_html_8 = ''
+''
+''
+''
+' '
+''
+' '
+' '
+' Red Fox Run Orchards L L C'
+' | '
+'
'
+''
+' '
+' '
+' '
+' 3715 G Rd'
+' '
+' '
+' Palisade'
+', 81526'
+' |
'
+'
'
+'';
createMarker( map, point_8, tooltip_html_8, 8, 503 );
}
initMap();
}
//