var map;
var icon;
function load_int() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map_i"));
map.enableDoubleClickZoom();
map.setCenter(new GLatLng(30.28990, -82.14305), 10);
map.addControl(new GSmallMapControl());
var html='
';
mapkey=new HtmlControl(html);
map.addControl(mapkey, new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(3, 10)));
//addEncodedPolyline("u}`xDvxpqN?nr@}E`U?tLdCzRj@vdCxSvt@hAlf@dIva@UfyBpAxkBhAvdCxMblBvK`}ArFf}AnHjcCvN~rCnKbpBxJ~aBx]j{Ar_@`iB~HzpBnNzuE~DneArJpjAbYltC`Hjo@v`BlkFrV|_Aj@ngAqP~yFvt@pqFvz@lyFvaA~pG}Evd@wmBx}D_Llc@iAnYj@`kPgNzmDkTbtCjAv]`j@ntCpQnkEfn@v|FrCdvH_XjoFtB`vCutBpmHsv@l~FcVv~Cqj@vkCc|@zqImx@``EavAbpD_{Dh_Gcc@zrGxMdqEnEhwB~c@zhAj`@hmAmjBbkLqbAlsJufBdlM}iAvuF}d@~|DirA~rIo{Ar|Bac@xeAcJfyBqDjaFze@trGeUfpKw_A|rH", "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", "#858585", 0.75);
addMarker(map, 30.3128942557431, -81.81364059448242, "Interstate 10 Resurfacing from east of Halsema Road to Lane Avenue in Duval County", "/i10/projects/details.aspx?ProjectID=137", "construction");
addMarker(map, 30.32043, -81.71905, "Interstate 10 Concrete Rehabilitiation from Lane Ave to Stockton St in Duval County", "/i10/projects/details.aspx?ProjectID=138", "construction");
addMarker(map, 30.31984, -81.68197, "Interstate 10/Interstate 95 Interchange Reconstruction in Duval County", "/i10/projects/details.aspx?ProjectID=25", "construction");
addMarker(map, 30.307096065407638, -81.86943054199219, "Branan Field-Chaffee Road (SR 23) Construction in Duval County", "/i10/projects/details.aspx?ProjectID=86", "construction");
addMarker(map, 30.31502449509719, -81.79784774780273, "Interstate 10 Interchange at Marietta/Hammond in Duval County", "/i10/projects/details.aspx?ProjectID=146", "construction");
addMarker(map, 30.271521387805628, -82.08263397216797, "Interstate 10 Resurfacing from State Road 121 to the Duval County Line", "/i10/location.aspx?id=32", "construction");
addMarker(map, 30.246018268082167, -82.23197937011719, "Interstate 10 Resurfacing from U.S. 90 to State Road 121 in Baker County", "/i10/projects/details.aspx?ProjectID=149", "construction");
addMarker(map, 30.267073646083887, -82.7545166015625, "Exit 296A/B I-75 South/North", "/i10/location.aspx?id=2", "exit");
addMarker(map, 30.24492, -82.67726, "Exit 301 - US 41", "/i10/location.aspx?id=7", "exit");
addMarker(map, 30.24156, -82.63858, "Exit 303 - US 441", "/i10/location.aspx?id=12", "exit");
addMarker(map, 30.23892, -82.30372, "Exit 324 - US 90", "/i10/location.aspx?id=13", "exit");
addMarker(map, 30.23978, -82.25996, "Exit 327 - CR 229", "/i10/location.aspx?id=14", "exit");
addMarker(map, 30.26158, -82.16237, "Exit 333 - CR 125", "/i10/location.aspx?id=15", "exit");
addMarker(map, 30.25891, -82.12297, "Exit 335 - SR 121", "/i10/location.aspx?id=16", "exit");
addMarker(map, 30.26277, -82.10426, "Exit 336 - SR 228", "/i10/location.aspx?id=17", "exit");
addMarker(map, 30.28864, -81.98281, "Exit 343 - US 301", "/i10/location.aspx?id=18", "exit");
addMarker(map, 30.30939, -81.84865, "Exit 351 - SR 115-C (Chaffee Rd.)", "/i10/location.aspx?id=19", "exit");
addMarker(map, 30.31496892422405, -81.77937269210815, "Exit 355 - Marietta", "/i10/location.aspx?id=20", "exit");
addMarker(map, 30.31502449509719, -81.76945924758911, "Exit 356 - I-295", "/i10/location.aspx?id=21", "exit");
addMarker(map, 30.25483, -82.400647, "Mile 318 - Eastbound/Westbound Rest Area", "/i10/location.aspx?id=23", "rest");
addMarker(map, 30.27378, -82.799443, "Mile 294 - Eastbound Rest Area", "/i10/location.aspx?id=8", "rest");
addMarker(map, 30.273631678100013, -82.78379827737808, "Mile 295 - Westbound Rest Area", "/i10/location.aspx?id=9", "rest");
//add construction points
//addEncodedPolyline("a`qwDl|iuN_r@byAia@rv@cJjp@y@xvFlEtvEy@dgBwNnjD", "BBBBBBBB", "#FDBD3A", 0.6); //grey
//addEncodedPolyline("srqwDnikwNlF_kFuOqwDuVqvBwT_qCiG}jCym@c{CbCwlA", "BBBBBBBB", "#FDBD3A", 0.6); //blue
//addEncodedPolyline("i|_xDnnbrNZd|@xAxaCnQv~B~K~eBhAhi@", "BBBBBB", "#FDBD3A", 0.6); //purple
//addEncodedPolyline("u}`xDhhrqNNwm@aHyAqDuG}EaGkMeEmHmE{FaKiHyH}E{Dd@qBnHzKvGhKnE`GvKvErSxFxMr@vDwAvB{DlBuG~A{IpDiI`EuWrF{^TkW", "BBBBBBBBBBBBBBBBBBBBBBBBB", "#FDBD3A", 0.6); //yellow
//addEncodedPolyline("u}`xDphrqNaGf]hDrd@T~n@FbnA`T`p@hA`h@fHr^?j_A", "BBBBBBBBB", "#FDBD3A", 0.6); //green
}
}
function load() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.enableDoubleClickZoom();
map.setCenter(new GLatLng(30.28990, -82.14305), 10);
map.addControl(new GSmallMapControl());
var html='';
mapkey=new HtmlControl(html);
map.addControl(mapkey, new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(3, 10)));
// add i-10 line
//addEncodedPolyline("u}`xDvxpqN?nr@}E`U?tLdCzRj@vdCxSvt@hAlf@dIva@UfyBpAxkBhAvdCxMblBvK`}ArFf}AnHjcCvN~rCnKbpBxJ~aBx]j{Ar_@`iB~HzpBnNzuE~DneArJpjAbYltC`Hjo@v`BlkFrV|_Aj@ngAqP~yFvt@pqFvz@lyFvaA~pG}Evd@wmBx}D_Llc@iAnYj@`kPgNzmDkTbtCjAv]`j@ntCpQnkEfn@v|FrCdvH_XjoFtB`vCutBpmHsv@l~FcVv~Cqj@vkCc|@zqImx@``EavAbpD_{Dh_Gcc@zrGxMdqEnEhwB~c@zhAj`@hmAmjBbkLqbAlsJufBdlM}iAvuF}d@~|DirA~rIo{Ar|Bac@xeAcJfyBqDjaFze@trGeUfpKw_A|rH", "BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB", "#858585", 0.75);
addMarker(map, 30.3128942557431, -81.81364059448242, "Interstate 10 Resurfacing from east of Halsema Road to Lane Avenue in Duval County", "/i10/projects/details.aspx?ProjectID=137", "construction");
addMarker(map, 30.32043, -81.71905, "Interstate 10 Concrete Rehabilitiation from Lane Ave to Stockton St in Duval County", "/i10/projects/details.aspx?ProjectID=138", "construction");
addMarker(map, 30.31984, -81.68197, "Interstate 10/Interstate 95 Interchange Reconstruction in Duval County", "/i10/projects/details.aspx?ProjectID=25", "construction");
addMarker(map, 30.307096065407638, -81.86943054199219, "Branan Field-Chaffee Road (SR 23) Construction in Duval County", "/i10/projects/details.aspx?ProjectID=86", "construction");
addMarker(map, 30.31502449509719, -81.79784774780273, "Interstate 10 Interchange at Marietta/Hammond in Duval County", "/i10/projects/details.aspx?ProjectID=146", "construction");
addMarker(map, 30.271521387805628, -82.08263397216797, "Interstate 10 Resurfacing from State Road 121 to the Duval County Line", "/i10/location.aspx?id=32", "construction");
addMarker(map, 30.246018268082167, -82.23197937011719, "Interstate 10 Resurfacing from U.S. 90 to State Road 121 in Baker County", "/i10/projects/details.aspx?ProjectID=149", "construction");
addMarker(map, 30.267073646083887, -82.7545166015625, "Exit 296A/B I-75 South/North", "/i10/location.aspx?id=2", "exit");
addMarker(map, 30.24492, -82.67726, "Exit 301 - US 41", "/i10/location.aspx?id=7", "exit");
addMarker(map, 30.24156, -82.63858, "Exit 303 - US 441", "/i10/location.aspx?id=12", "exit");
addMarker(map, 30.23892, -82.30372, "Exit 324 - US 90", "/i10/location.aspx?id=13", "exit");
addMarker(map, 30.23978, -82.25996, "Exit 327 - CR 229", "/i10/location.aspx?id=14", "exit");
addMarker(map, 30.26158, -82.16237, "Exit 333 - CR 125", "/i10/location.aspx?id=15", "exit");
addMarker(map, 30.25891, -82.12297, "Exit 335 - SR 121", "/i10/location.aspx?id=16", "exit");
addMarker(map, 30.26277, -82.10426, "Exit 336 - SR 228", "/i10/location.aspx?id=17", "exit");
addMarker(map, 30.28864, -81.98281, "Exit 343 - US 301", "/i10/location.aspx?id=18", "exit");
addMarker(map, 30.30939, -81.84865, "Exit 351 - SR 115-C (Chaffee Rd.)", "/i10/location.aspx?id=19", "exit");
addMarker(map, 30.31496892422405, -81.77937269210815, "Exit 355 - Marietta", "/i10/location.aspx?id=20", "exit");
addMarker(map, 30.31502449509719, -81.76945924758911, "Exit 356 - I-295", "/i10/location.aspx?id=21", "exit");
addMarker(map, 30.25483, -82.400647, "Mile 318 - Eastbound/Westbound Rest Area", "/i10/location.aspx?id=23", "rest");
addMarker(map, 30.27378, -82.799443, "Mile 294 - Eastbound Rest Area", "/i10/location.aspx?id=8", "rest");
addMarker(map, 30.273631678100013, -82.78379827737808, "Mile 295 - Westbound Rest Area", "/i10/location.aspx?id=9", "rest");
//add construction points
//addEncodedPolyline("a`qwDl|iuN_r@byAia@rv@cJjp@y@xvFlEtvEy@dgBwNnjD", "BBBBBBBB", "#FDBD3A", .6); //grey
//addEncodedPolyline("srqwDnikwNlF_kFuOqwDuVqvBwT_qCiG}jCym@c{CbCwlA", "BBBBBBBB", "#FDBD3A", .6); //blue
//addEncodedPolyline("i|_xDnnbrNZd|@xAxaCnQv~B~K~eBhAhi@", "BBBBBB", "#FDBD3A", .6); //purple
//addEncodedPolyline("u}`xDhhrqNNwm@aHyAqDuG}EaGkMeEmHmE{FaKiHyH}E{Dd@qBnHzKvGhKnE`GvKvErSxFxMr@vDwAvB{DlBuG~A{IpDiI`EuWrF{^TkW", "BBBBBBBBBBBBBBBBBBBBBBBBB", "#FDBD3A", .6); //yellow
//addEncodedPolyline("u}`xDphrqNaGf]hDrd@T~n@FbnA`T`p@hA`h@fHr^?j_A", "BBBBBBBBB", "#FDBD3A", .6); //green
}
}
function addMarker(m,lat,lng,tooltip,page,type) {
icon = new GIcon();
icon.iconAnchor = new GPoint(0, 30);
switch(type)
{
case 'exit':
icon.iconSize = new GSize(19,30);
icon.image = '/i10/images/mm_exit.png';
break;
case 'rest':
icon.iconSize = new GSize(19,30);
icon.image = '/i10/images/mm_rest.png';
break;
case 'construction':
icon.iconSize = new GSize(19,30);
icon.image = '/i10/images/mm_construction.png';
break;
default:
icon.iconSize = new GSize(12,20);
icon.image = '/i10/images/mm_20_red.png';
break;
}
var marker = new GxMarker(new GLatLng(lat,lng), icon, tooltip);
GEvent.addListener(marker, "click", function() {
window.location = page;
});
m.addOverlay(marker);
}
function addEncodedPolyline(encodedPoints, encodedLevels, color, opacity) {
encodedPolyline = new GPolyline.fromEncoded({color: color,weight: 7,opacity: opacity,points: encodedPoints,levels: encodedLevels,zoomFactor: 32,numLevels: 4});
map.addOverlay(encodedPolyline);
}
function createIcon(path_to_icon, path_to_icon_shadow) {
icon = new GIcon();
icon.image = path_to_icon;
icon.shadow = path_to_icon_shadow;
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);
}
var __singleLabel;
var __singleLabelRefCount = 0;
function GxLabel( content, opts ) {
if ( typeof opts != "object" ) throw "Invalid GxLabel configuration";
this.content = content;
if ( opts.offset && typeof opts.offset.width != "undefined" )
this.offset = opts.offset
else
this.offset = new GSize(0,0);
this.className = opts.className || "markerTooltip";
if ( opts.marker && typeof opts.marker.getPoint != "undefined" ) {
this.marker = opts.marker;
this.anchor = opts.marker.getPoint();
if ( opts.isStatic ) {
this.isStatic = true;
} else {
__singleLabelRefCount++;
GEvent.addListener(this.marker, "mouseover",
this.createSingletonClosure(this.show, this.anchor, this.offset, this.content));
GEvent.addListener(this.marker, "mouseout",
this.createSingletonClosure(this.hide, this.anchor, this.offset, this.content));
if ( !__singleLabel )
__singleLabel = this;
return __singleLabel;
}
}
else if ( opts.anchor && typeof opts.anchor.lat != "undefined" ) {
if ( opts.isStatic ) {
this.isStatic = true;
}
if ( opts.moveHandle ) {
this.moveHandle = true;
}
if ( opts.deleteHandle ) {
this.deleteHandle = true;
}
this.anchor = opts.anchor
}
if ( opts.pane ) this.pane = opts.pane;
if ( !this.anchor ) throw "Invalid label configuration: no anchor point";
}
GxLabel.prototype = new GOverlay();
GxLabel.prototype.initialize = function(map) {
var t = this;
if ( __singleLabel && !this.isStatic )
t = __singleLabel;
t.map = map;
t.pane = map.getPane(t.pane || G_MAP_MARKER_PANE) ||
map.getPane(G_MAP_MARKER_PANE);
if ( !t.container ) {
t.container = document.createElement("div");
t.container.className = t.className;
t.container.style.position = "absolute";
if ( t.moveHandle && !t.moveHandleNode ) {
t.moveHandlePanel = t.pane;
t.contentNode = document.createElement("div");
t.moveHandleNode = document.createElement("div");
with ( t.moveHandleNode.style ) {
background = "#ccc";
width = "8px";
height = "100%";
cssFloat = "left";
fontWeight = "bold";
textAlign = "center";
borderRight = "1px solid #555";
}
t.contentNode.style.marginLeft = "10px";
t.moveHandleNode.innerHTML = ":";
t.container.appendChild(t.moveHandleNode);
t.container.appendChild(t.contentNode);
t.insertPoint = t.contentNode;
GEvent.bindDom(t.moveHandleNode, "mousedown", this, this.mouseDown);
} else {
t.insertPoint = t.container;
}
t.setContent(t.content);
t.pane.appendChild(t.container);
var b = t.container;
GEvent.addDomListener(b, "click",
function(e) { stopEvent(e); GEvent.trigger(t, "click", e); });
GEvent.addDomListener(b, "mouseup", function(e) {
stopEvent(e); t.mouseUp(e); GEvent.trigger(t, "mouseup", e);
});
GEvent.addDomListener(b, "mousedown",
function(e) { stopEvent(e); GEvent.trigger(t, "mousedown", e); });
}
}
GxLabel.prototype.setContent = function(content) {
var t = this;
if ( __singleLabel && !this.isStatic )
t = __singleLabel;
if ( content ) {
var point = t.insertPoint || t.container;
point.innerHTML = "";
if ( typeof content == "object" ) {
point.appendChild(content);
t.content = point.innerHTML;
} else {
t.content = content;
point.innerHTML = t.content;
}
if ( t.deleteHandle ) {
var img = document.createElement("img");
img.src = "/static/images/close.png";
img.alt = "";
img.style.padding = "0px 2px";
GEvent.bindDom(img, "click", this, this.remove);
point.appendChild(img);
}
}
}
GxLabel.prototype.setAnchor = function(anchor) {
try {
if ( anchor.lat() && anchor.lng() ) {
this.anchor = anchor;
this.redraw();
}
} catch(E) {}
}
GxLabel.prototype.remove = function() {
if ( this.isStatic || --__singleLabelRefCount <= 0 ) {
this.container.parentNode.removeChild(this.container);
GEvent.trigger(this, "remove");
}
}
GxLabel.prototype.copy = function() {
}
GxLabel.prototype.redraw = function(force) {
if ( this.isStatic ) {
this.show();
} else {
/* Show dynamic tooltips only on events, not on redraws */
this.hide();
}
}
GxLabel.prototype.createSingletonClosure = function(fn, p, o, c) {
var _t = this; var obj = fn;
var _p = p; var _o = o; var _c = c;
p = null; fn = null; o = null; c = null;
return function() {
_t.setContent(_c);
obj.apply(_t, [ _p, _o ] );
};
}
GxLabel.prototype.show = function(point, offset) {
try {
var t = this;
if ( __singleLabel && !this.isStatic )
t = __singleLabel;
var p = point || t.anchor;
var o = offset || t.offset || new GSize(0,0);
if ( p && p.lat ) {
t.anchor = p; t.offset = o;
var pix = t.map.fromLatLngToDivPixel(p);
t.container.style.left = ( pix.x + o.width ) + "px";
t.container.style.top = ( (pix.y + o.height) - 50 ) + "px";
t.container.style.display = "";
}
} catch(e) { }
}
/* Pointless Params! */
GxLabel.prototype.hide = function(point, offset) {
var t = this;
if ( __singleLabel && !this.isStatic )
t = __singleLabel;
t.container.style.display = "none";
}
GxLabel.prototype.mouseUp = function(e) {
if ( this.mouseUpListener )
GEvent.removeListener(this.mouseUpListener);
if ( this.mouseMoveListener )
GEvent.removeListener(this.mouseMoveListener);
if ( this.startDrag ) {
}
GEvent.trigger(this, "moveend", this.anchor);
this.startDrag = false;
}
GxLabel.prototype.mouseMove = function(e) {
if ( !this.startDrag ) {
if ( this.mouseUpListener )
GEvent.removeListener(this.mouseUpListener);
if ( this.mouseMoveListener )
GEvent.removeListener(this.mouseMoveListener);
return false;
}
var point = new GPoint(
e.clientX - this.topLeftPoint.x, e.clientY - this.topLeftPoint.y);
var anchor = this.map.fromDivPixelToLatLng(point);
this.anchor = anchor;
this.redraw();
}
GxLabel.prototype.mouseDown = function(e) {
stopEvent(e);
this.startDrag = true;
this.topLeftPoint = new GPoint(
dojo.html.getAbsoluteX(document.getElementById("map")),
dojo.html.getAbsoluteY(document.getElementById("map")));
if ( !this.mouseUpListener ) {
this.mouseUpListener = GEvent.bindDom(document.getElementById("map"),
"mouseup", this, this.mouseUp);
}
if ( !this.mouseMoveListener ) {
this.mouseUpListener = GEvent.bindDom(document.getElementById("map"),
"mousemove", this, this.mouseMove);
}
}
function stopEvent(eventObject) {
if (eventObject && eventObject.stopPropagation) {
eventObject.stopPropagation();
}
if (window.event && window.event.cancelBubble ) {
window.event.cancelBubble = true;
}
if (eventObject && eventObject.preventDefault) {
eventObject.preventDefault();
}
if (window.event) {
window.event.returnValue = false;
}
}
function GxMarker(point, icon, tooltip, opts) {
if ( tooltip ) {
var oldInit = this.initialize;
var _t = this;
var offset = ( typeof opts == "object" ) ?
(opts.offset || new GPoint(22,0)) : new GPoint(22,0);
var isStatic = ( typeof opts == "object" ) ?
(opts.isStatic || false ) : false;
this.initialize = function(map) {
var l = new GxLabel(tooltip, {
"marker": _t,
"offset": offset,
"isStatic": isStatic
});
map.addOverlay(l);
oldInit.apply(_t, [ map ]);
}
}
GMarker.apply(this, [ point, icon ]);
}
GxMarker.prototype = new GMarker(new GLatLng(1,1));
function debug(msg) {
var d = document.getElementById("debug") ?
document.getElementById("debug") : document.body;
d.appendChild(document.createTextNode("[" + new Date() + "] "));
d.appendChild(document.createTextNode(msg));
d.appendChild(document.createElement("br"));
}