From: Anthony Talarico Date: Wed, 20 Mar 2019 15:29:03 +0000 (-0400) Subject: adding default data to the county map hover description box X-Git-Tag: v1.0.0^2~8 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=4ee9370ce8431b5074aa4dca7ca4e6702e130d52;p=WP-Plugins%2Fglm-member-db-county-map.git adding default data to the county map hover description box --- 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 ){ $("
      • ",{