From 4ee9370ce8431b5074aa4dca7ca4e6702e130d52 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Wed, 20 Mar 2019 11:29:03 -0400 Subject: [PATCH] adding default data to the county map hover description box --- views/front/map/display.html | 40 ++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/views/front/map/display.html b/views/front/map/display.html index 1c077ea..4bf345c 100644 --- a/views/front/map/display.html +++ b/views/front/map/display.html @@ -93,16 +93,7 @@ dashArray: '6', // Dashed outlines }; } - // function islandStyle(feature) { - // return { - // color: 'black', // Outline Color - // opacity: 0, // Opacity of outline - // weight: 2, // Weight of line (pixels width?) - // fillColor: '', // Fill color for county interior - // fillOpacity: 0.0, // Opacity of fill area - // dashArray: '6', // Dashed outlines - // }; - // } + // Mouse out event handler function resetSelectedCounty(e) { @@ -115,9 +106,28 @@ } var ltInfo = ''; + // add the description area to the county map var countyDescription = $('
', { id: "glm-county-description" - }).appendTo( $("#area-map")) + }).appendTo( $("#area-map")); + + var countyDescriptionTitle = $("
", { + text: "Home Of", + class: "county-description-title" + }).appendTo(countyDescription); + + var countyMapTopList = $("
    ", { + class : "glm-county-map-top-list" + }).appendTo(countyDescription); + + // reset the county map description box with default text + $("li.counties-menu").on("hover", function(e){ + countyDescription.html(""); + countyMapTopList.html(""); + $("
    default UP data here
    ").appendTo(countyMapTopList); + countyDescription.append(countyDescriptionTitle) + countyDescription.append(countyMapTopList) + }); new L.Marker([47.30, -89.85], { icon: new L.DivIcon({ className: 'my-div-icon', @@ -223,10 +233,10 @@ layer.bringToFront(); } - var countyMapTopList = $("
      ", { - class : "glm-county-map-top-list" - }); - + // var countyMapTopList = $("
        ", { + // class : "glm-county-map-top-list" + // }); + countyMapTopList.html(""); // countyDescription.setContent(glmCountyMapTopList); countyAttractions[county].list.map( function( item, index ){ $("
      • ",{ -- 2.17.1