adding default data to the county map hover description box
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 20 Mar 2019 15:29:03 +0000 (11:29 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 20 Mar 2019 15:29:03 +0000 (11:29 -0400)
views/front/map/display.html

index 1c077ea..4bf345c 100644 (file)
                     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) {
                
             }
             var ltInfo = '';
 
+            // add the description area to the county map
             var countyDescription = $('<div />', {
                 id: "glm-county-description"
-            }).appendTo( $("#area-map"))
+            }).appendTo( $("#area-map"));
+
+            var countyDescriptionTitle = $("<div />", {
+                text: "Home Of",
+                class: "county-description-title"
+            }).appendTo(countyDescription);
+
+            var countyMapTopList = $("<ul />", {
+                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("");
+                $("<div> default UP data here </div>").appendTo(countyMapTopList);
+                countyDescription.append(countyDescriptionTitle)
+                countyDescription.append(countyMapTopList)
+            });
             new L.Marker([47.30, -89.85], {
                 icon: new L.DivIcon({
                     className: 'my-div-icon',
                                 layer.bringToFront();
                             }
                            
-                            var countyMapTopList = $("<ul />", {
-                                class : "glm-county-map-top-list"
-                            });
-                            
+                            // var countyMapTopList = $("<ul />", {
+                            //     class : "glm-county-map-top-list"
+                            // });
+                            countyMapTopList.html("");
                             // countyDescription.setContent(glmCountyMapTopList);
                             countyAttractions[county].list.map( function( item, index ){
                                 $("<li />",{