From 71362253e029caaca4a11b5d4257ca460c314941 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Mon, 29 Oct 2018 14:30:37 -0400 Subject: [PATCH] adding harborsprings borders for the leaflet map --- parts/map.php | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/parts/map.php b/parts/map.php index adf2c3e..98d557d 100644 --- a/parts/map.php +++ b/parts/map.php @@ -85,14 +85,24 @@ [45.464194, -84.975117] ]; + var harborSprings = []; + var geoCoords = [[-85.010767,45.431269],[-85.010582,45.431046],[-85.010328,45.430811],[-85.010128,45.430483],[-85.010413,45.430264],[-85.010503,45.430197],[-85.010365,45.430118],[-85.009822,45.429739],[-85.009434,45.429406],[-85.008783,45.429121],[-85.008502,45.428998],[-85.007045,45.428027],[-85.006712,45.427929],[-85.006047,45.42787],[-85.005885,45.427813],[-85.00548,45.4276],[-85.005018,45.427233],[-85.004776,45.426963],[-85.004444,45.426699],[-85.004233,45.426676],[-85.003794,45.426823],[-85.003648,45.426812],[-85.003437,45.426754],[-85.003226,45.426742],[-85.002967,45.426678],[-85.002634,45.426649],[-85.00239,45.426671],[-85.001805,45.426841],[-85.001481,45.426869],[-85.000636,45.42689],[-85.000425,45.426872],[-85.00028,45.42682],[-85.000003,45.426814],[-84.999726,45.426584],[-84.999265,45.426342],[-84.999014,45.426159],[-84.998562,45.425751],[-84.997261,45.424958],[-84.997034,45.42478],[-84.995077,45.423803],[-84.994729,45.423591],[-84.994681,45.423561],[-84.993623,45.422723],[-84.993219,45.422465],[-84.992305,45.424294],[-84.992112,45.424354],[-84.991874,45.424428],[-84.991534,45.42456],[-84.990835,45.425099],[-84.991053,45.425439],[-84.991206,45.42572],[-84.991188,45.426],[-84.990971,45.427155],[-84.990652,45.427738],[-84.990326,45.427949],[-84.989903,45.428119],[-84.989562,45.428164],[-84.989165,45.428123],[-84.988735,45.428225],[-84.988463,45.428258],[-84.987209,45.428415],[-84.987096,45.428232],[-84.986893,45.428271],[-84.986949,45.428512],[-84.9867468,45.4287413],[-84.986688,45.428808],[-84.986085,45.429207],[-84.985939,45.429276],[-84.985524,45.4294],[-84.985119,45.429399],[-84.985054,45.429319],[-84.985031,45.429107],[-84.984942,45.429021],[-84.984821,45.429026],[-84.98448,45.429123],[-84.984179,45.429173],[-84.983903,45.429201],[-84.983432,45.429291],[-84.983205,45.429308],[-84.983035,45.429279],[-84.982889,45.429193],[-84.98276,45.429164],[-84.982459,45.429277],[-84.982346,45.429226],[-84.982273,45.42922],[-84.982143,45.429305],[-84.982027,45.429625],[-84.981654,45.429676],[-84.981598,45.429584],[-84.981362,45.429623],[-84.981169,45.429297],[-84.980958,45.429302],[-84.980847,45.42897],[-84.980449,45.428928],[-84.980416,45.429014],[-84.980506,45.42902],[-84.980421,45.429678],[-84.979172,45.429611],[-84.979173,45.42944],[-84.978955,45.429342],[-84.978999,45.428684],[-84.978317,45.428745],[-84.97768,45.428851],[-84.977417,45.42884],[-84.977225,45.428842],[-84.976903,45.428831],[-84.976442,45.428835],[-84.975335,45.428319],[-84.973708,45.427628],[-84.973247,45.427529],[-84.97272,45.42747],[-84.972079,45.427366],[-84.971593,45.42733],[-84.971068,45.427389],[-84.971068,45.427644],[-84.971026,45.4297],[-84.969919,45.429647],[-84.969736,45.429638],[-84.969584,45.429624],[-84.969136,45.429592],[-84.969127,45.42974],[-84.969089,45.431045],[-84.966095,45.430859],[-84.966092,45.431693],[-84.966207,45.431702],[-84.967344,45.431611],[-84.970627,45.431757],[-84.971006,45.432393],[-84.970963,45.43401],[-84.970975,45.435304],[-84.971188,45.435312],[-84.971638,45.435329],[-84.972298,45.43533],[-84.97242,45.435311],[-84.972538,45.43526],[-84.972689,45.43515],[-84.972921,45.43524],[-84.973106,45.435287],[-84.973302,45.435321],[-84.973528,45.435344],[-84.975068,45.435379],[-84.97505,45.439102],[-84.978502,45.439084],[-84.9786,45.439083],[-84.980841,45.439087],[-84.982663,45.439051],[-84.982597,45.440426],[-84.982586,45.440848],[-84.982574,45.441284],[-84.982574,45.441306],[-84.982534,45.442804],[-84.98538,45.442779],[-84.985506,45.439068],[-84.990569,45.439072],[-84.991756,45.439475],[-84.993215,45.438793],[-84.994523,45.438857],[-84.995798,45.43877],[-84.995785,45.437946],[-84.995816,45.437027],[-84.995787,45.436138],[-84.995785,45.435262],[-84.998336,45.43524],[-84.9983636,45.4352398],[-85.00001,45.435226],[-85.000902,45.435215],[-85.003459,45.435212],[-85.004631,45.435205],[-85.005489,45.4352],[-85.005837,45.435212],[-85.006123,45.435221],[-85.006083,45.43157],[-85.006449,45.431561],[-85.006829,45.431516],[-85.006932,45.431501],[-85.007588,45.431438],[-85.007747,45.431439],[-85.007969,45.431449],[-85.008594,45.431504],[-85.009207,45.431227],[-85.009456,45.431147],[-85.010722,45.431396],[-85.010767,45.431269]].forEach( function(val, index){ + harborSprings.push(val.reverse()); + }) + + + var harborSpringsCity = L.polygon(harborSprings,{color: '#91311D'}).addTo(leafletMap); + harborSpringsCity.setStyle({fillColor: '#91311D', fillOpacity: .1}); + + console.log(harborSprings) // var polyline = L.polyline(downtown, {color: '#91311D', weight: 2}).addTo(leafletMap); // var polyline = L.polyline(LittleTraverse, {color: '#91311D', weight: 2}).addTo(leafletMap); var ltPolygon = L.polygon(LittleTraverse, {color: '#91311D'}).addTo(leafletMap); ltPolygon.setStyle({fillColor: '#91311D', fillOpacity: .1}); - // markers for each of the Condos - let ltbInfo = `
Little Traverse Bay is a small bay, 170 feet (55 m) deep, off Lake Michigan in the northern area of the Lower Peninsula of Michigan. The cities of Harbor Springs and Petoskey are located on this bay.
`; + + var ltbInfo = `
Little Traverse Bay is a small bay, 170 feet (55 m) deep, off Lake Michigan in the northern area of the Lower Peninsula of Michigan. The cities of Harbor Springs and Petoskey are located on this bay.
`; "Little Traverse Bay is a small bay, 170 feet (55 m) deep, off Lake Michigan in the northern area of the Lower Peninsula of Michigan. The cities of Harbor Springs and Petoskey are located on this bay." new L.Marker([45.406518, -84.948100], { icon: new L.DivIcon({ @@ -100,23 +110,27 @@ html: 'Little Traverse Bay' }) }).addTo(leafletMap).bindPopup(ltbInfo); - new L.Marker([45.406518, -84.948100], { + + // Lake Michigan + var lmInfo = `
Lake Michigan is one of the five Great Lakes of North America and the only one located entirely within the United States. The other four Great Lakes are shared by the U.S. and Canada. It is the second-largest of the Great Lakes by volume and the third-largest by surface area."
`; + new L.Marker([45.402413, -85.014117], { icon: new L.DivIcon({ className: 'my-div-icon', - html: 'Little Traverse Bay' + html: 'Lake Michigan' }) - }).addTo(leafletMap).bindPopup(ltbInfo); - - let lmInfo = `
Lake Michigan is one of the five Great Lakes of North America and the only one located entirely within the United States. The other four Great Lakes are shared by the U.S. and Canada. It is the second-largest of the Great Lakes by volume and the third-largest by surface area."
`; + }).addTo(leafletMap).bindPopup(lmInfo); + + var ltInfo = `
Little Traverse Township is a civil township of Emmet County in the U.S. state of Michigan. The population was 2,426 at the 2000 census."
`; + // Little Traverse Township new L.Marker([45.439232, -84.907780], { icon: new L.DivIcon({ className: 'my-div-icon', html: 'Little Traverse Township' }) - }).addTo(leafletMap).bindPopup(lmInfo); + }).addTo(leafletMap).bindPopup(ltInfo); - - let info = `
Harbor Springs
`; + // Harbor Springs + var info = `
Harbor Springs is a city and resort community in Emmet County in the U.S. state of Michigan. The population was 1,194 at the 2010 census. Harbor Springs is in a sheltered bay on the north shore of the Little Traverse Bay on Lake Michigan
`; var marker = new L.marker([45.431962, -84.990662]).bindPopup(info); //opacity may be set to zero marker.addTo(leafletMap); -- 2.17.1