}
var ltInfo = '';
-
+ var countyDescription = $('<div />', {
+ id: "glm-county-description"
+ }).appendTo( $("#area-map"))
new L.Marker([47.30, -89.85], {
icon: new L.DivIcon({
className: 'my-div-icon',
})
}).addTo(countyMap);
- new L.Marker([47.47, -87.3], {
- icon: new L.DivIcon({
- className: 'my-div-icon',
- html: '<div id="glm-county-description" style="color: #343539;line-height: 1;" class="glm-map-county-description"></div>'
- })
- }).addTo(countyMap);
+ // var countyDescription = new L.Marker([47.47, -87.3], {
+ // icon: new L.DivIcon({
+ // className: 'my-div-icon',
+ // html: '<div id="glm-county-description" style="color: #343539;line-height: 1;" class="glm-map-county-description"></div>'
+ // })
+ // }).addTo(countyMap);
new L.Marker([46.8, -87.3], {
icon: new L.DivIcon({
}).addTo(countyMap);
countyMap.on('zoomend', function() {
- if(countyMap.getZoom() < 8){
- $(".glm-theme-map-label").hide()
- }else{
- $(".glm-theme-map-label").show()
- }
- });
- // $("#island-map").hover(
- // function(){
- // countyMap._layers[144].setStyle({
- // weight: 3,
- // color: "#003366",
- // dashArray: '',
- // fillOpacity: 0.1
- // })
- // }, function(){
- // countyMap._layers[144].setStyle({
- // weight: 2,
- // color: "#000000",
- // dashArray: '6',
- // fillOpacity: 0
- // })
- // })
- // For each UP county
- var countyLayer;
- // $.each(keweenaw, function(county, countyData) {
- // var page = "#";
- // var location = areas.filter( function(area){
- // return area.area_name == county;
- // });
-
- // location = location[0];
- // if(parseInt(location.page_id)){
- // page = pages[location.page_id]['url'];
- // }
- // // Get the GeoJson file for this county
- // $.get(countiesDirectory + county + '.GeoJson', function(countyFile) {
-
- // // Convert the county file to a JSON
- // var countyJSON = jQuery.parseJSON(countyFile);
-
- // // Add the county overlay to the map using "countyStyle" above
- // countyLayer = L.geoJson(countyJSON, {
- // style: islandStyle
- // }).addTo(islandMap);
-
- // countyLayer.on({
- // mouseover: function(e){
- // var layer = e.target;
-
- // layer.setStyle({
- // weight: 3,
- // color: location.hover_color,
- // dashArray: '',
- // fillOpacity: 0.1
- // });
-
- // if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) {
- // layer.bringToFront();
- // }
- // },
- // mouseout: function(e){
- // var layer = e.target;
- // layer.resetStyle(e.layer);
- // },
- // click: function(){
- // window.location = page;
- // }
- // });
- // // Get center of the county and add offsets
- // var center = countyLayer.getBounds().getCenter();
- // var center = new L.LatLng(center.lat + countyData.latOffset, center.lng + countyData.lonOffset);
-
- // // Create Div type icom for county names
- // var countyNameIcon = L.divIcon({
- // className: 'county-name',
- // html: '<a class="area-label ' + county +'" href="' + page + '">' + county + '</a>'
- // });
-
- // // use county name icon as marker using center location calculated above.
- // L.marker(center, {
- // icon: countyNameIcon,
- // county: county,
- // url: countyData.url
- // }).addTo(islandMap);
-
- // });
- // });
+ if(countyMap.getZoom() < 8){
+ $(".glm-theme-map-label").hide()
+ }else{
+ $(".glm-theme-map-label").show()
+ }
+ });
+
$.each(upperMI, function(county, countyData) {
var page = "#";
var location = areas.filter( function(area){
mouseover: function(e){
var layer = e.target;
- console.log(layer);
if(layer._leaflet_id == 144){
{literal} $("#island-map").css({
"border-style":"solid",
if (!L.Browser.ie && !L.Browser.opera && !L.Browser.edge) {
layer.bringToFront();
}
+
+ var countyMapTopList = $("<ul />", {
+ class : "glm-county-map-top-list"
+ });
+
+ // countyDescription.setContent(glmCountyMapTopList);
+ countyAttractions[county].list.map( function( item, index ){
+ $("<li />",{
+ text: item
+ }).appendTo(countyMapTopList)
+ });
+ countyDescription.html('');
+ countyDescription.append($("<div class='county-description-title'>"+countyAttractions[county].title + "</div>"));
+ countyDescription.append(countyMapTopList);
},
mouseout: function(e){
var layer = e.target;
$('.county-name').css('font-size', fontSize);
}
});
+ var countyAttractions = {
+ Mackinac : {
+ title : "Home Of",
+ list : [
+ "1. Mackinac Island",
+ "2. Mackinac Bridge",
+ "3. Les Cheneaux Islands",
+ "4. St Ignace Huron Boardwalk",
+ "5. Cut River Bridge"
+ ]
+ },
+ Chippewa : {
+ title : "Home Of",
+ list : [
+ "1. Soo Locks",
+ "2. Soo Locks Boat Tours",
+ "3. Kewadin Casinos",
+ "4. Great Lakes Shipwreck Museum",
+ "5. Drummond Island"
+ ]
+ },
+ Luce : {
+ title : "Home Of",
+ list : [
+ "1. Tahquamenon Falls State Park",
+ "2. Crisp Point Lighthouse",
+ "3. Tahquamenon Logging Museum",
+ "4. Oswald's Bear Ranch",
+ "5. Tahquamenon Falls Riverboat Tour & Toonerville Trolley"
+ ]
+ },
+ Alger : {
+ title : "Home Of",
+ list : [
+ "1. Pictured Rocks National Lakeshore",
+ "2. Grand Island",
+ "3. Many Waterfalls",
+ "4. Pictured Rocks Boat Cruises",
+ "5. Glass Bottom Shipwreck Tours"
+ ]
+ },
+ Marquette : {
+ title : "Home Of",
+ list : [
+ "1. Marquette Harbor Light",
+ "2. Presque Isle Park",
+ "3. Michigan Iron Industry Museum",
+ "4. US Ski & Snowboard Hall of Fame...",
+ "5. Waterfront Park & Downtown Nightlife"
+ ]
+ },
+ Baraga : {
+ title : "Home Of",
+ list : [
+ "1. Canyon Falls",
+ "2. Sturgeon River Gorge",
+ "3. Historic Alberta Village",
+ "4. Bishop Baraga Shrine",
+ "5. Mount Arvon"
+ ]
+ },
+ Houghton : {
+ title : "Home Of",
+ list : [
+ "1. Michigan Technological University",
+ "2. Keweenaw National Historical Park",
+ "3. Portage Canal",
+ "4. Laurium Manor Inn",
+ "5. AE Seaman Mineral Museum"
+ ]
+ },
+ Keweenaw : {
+ title : "Home Of",
+ list : [
+ "1. Brockway Mountain Drive",
+ "2. Isle Royale National Park",
+ "3. Fort Wilkins State Park",
+ "4. Estivant Pines",
+ "5. Eagle Harbor Lighthouse"
+ ]
+ },
+ Gogebic : {
+ title : "Home Of",
+ list : [
+ "1. Lake Gogebic",
+ "2. Copper Peak",
+ "3. Copper Peak",
+ "4. 3 Ski Resorts",
+ "5. Sylvania Wilderness Area"
+ ]
+ },
+ Ontonagon : {
+ title : "Home Of",
+ list : [
+ "1. Porcupine Mountains Wilderness State Park",
+ "2. More than 100 waterfalls",
+ "3. Old Victoria Restoration",
+ "4. Adventure Mine",
+ "5. Lake Gogebic"
+ ]
+ },
+ Schoolcraft : {
+ title : "Home Of",
+ list : [
+ "1. Kitch-iti-Kipi",
+ "2. Manistique East Breakwater Light",
+ "3. Seul Choix Point Lighthouse",
+ "4. Siphon Bridge",
+ "5. Seney National Wildlife Refuge"
+ ]
+ },
+ Iron : {
+ title : "Home Of",
+ list : [
+ "1. Young's Golf Recreation & Restaurant",
+ "2. Chicagon Lake",
+ "3. UP Championship Rodeo",
+ "4. Iron County Historical Museum",
+ "5. Michigamme Reservoir"
+ ]
+ },
+ Dickinson : {
+ title : "Home Of",
+ list : [
+ "1. Pine Mountain Ski Jump",
+ "2. Piers Gorge",
+ "3. Timberstone Golf Course",
+ "4. World War II Glider/Cornish Pump Mining Museum",
+ "5. Iron Mountain Iron Mine"
+ ]
+ },
+ Menominee : {
+ title : "Home Of",
+ list : [
+ "1. Menominee Historic Waterfront Downtown",
+ "2. Island Resort & Casino",
+ "3. Menominee North Pier Light",
+ "4. IXL Historical Museum",
+ "5. Pemene Falls"
+ ]
+ },
+ Delta : {
+ title : "Home Of",
+ list : [
+ "1. Walleye Capital of the World",
+ "2. Sand Point Lighthouse",
+ "3. UP State Fair",
+ "4. Fayette Historic State Park",
+ "5. Great Golfing"
+ ]
+ }
+ }
});
</script>
<style>