lining up the labels so they aren't overlapping other cities
authorAnthony Talarico <talarico@gaslightmedia.com>
Tue, 22 Oct 2019 16:38:46 +0000 (12:38 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Tue, 22 Oct 2019 16:38:46 +0000 (12:38 -0400)
glm-map.js

index 22d2bed..45feb15 100644 (file)
@@ -35,113 +35,89 @@ jQuery(function($){
 
         var style = "color: #525252;line-height: 1;display: block; width: 130px; font-weight: bold; font-family: 'Montserrat';font-size: 15px;";
         //////////////////////
-        var boyneInfo = '<div class="marker-title">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</div>';
-
-        var boyne = new L.marker([45.2125, -85.0173]).bindPopup(boyneInfo); //opacity may be set to zero
+       
+        var boyne = new L.marker([45.2125, -85.0173]);
         boyne.addTo(leafletMap);
 
-        var boyne = '<div class="marker-title">West Traverse Township is a civil township of Emmet County in the U.S. state of Michigan. The population was 1,448 at the 2000 census." </div>';
-        new L.Marker([45.21, -85.015], {
+        new L.Marker([45.205, -85.015], {
             icon: new L.DivIcon({
                 className: 'glm-map-city',
                 html: '<span style="' + style + '" class="glm-theme-map-label">Boyne City</span>'
             })
-        }).addTo(leafletMap).bindPopup(boyne);
+        }).addTo(leafletMap);
 
         //////////////////////
 
-        var chxInfo = '<div class="marker-title">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</div>';
-
-        var chx = new L.marker([45.2984, -85.2558]).bindPopup(chxInfo); //opacity may be set to zero
+        var chx = new L.marker([45.2984, -85.2558]);
         chx.addTo(leafletMap);
 
-        var chx = '<div class="marker-title">West Traverse Township is a civil township of Emmet County in the U.S. state of Michigan. The population was 1,448 at the 2000 census." </div>';
-        new L.Marker([45.2984, -85.2558], {
+        new L.Marker([45.289, -85.2558], {
             icon: new L.DivIcon({
                 className: 'glm-map-city',
                 html: '<span style="' + style + '" class="glm-theme-map-label">Charlevoix</span>'
             })
-        }).addTo(leafletMap).bindPopup(chx);
+        }).addTo(leafletMap);
 
         //////////////////////
-        var cheboyganInfo = '<div class="marker-title">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</div>';
 
-        var cheboygan = new L.marker([45.5961, -84.4848]).bindPopup(cheboyganInfo); //opacity may be set to zero
+        var cheboygan = new L.marker([45.605, -84.4848]);//opacity may be set to zero
         cheboygan.addTo(leafletMap);
 
-        var cheboygan = '<div class="marker-title">West Traverse Township is a civil township of Emmet County in the U.S. state of Michigan. The population was 1,448 at the 2000 census." </div>';
         new L.Marker([45.5972, -84.4848], {
             icon: new L.DivIcon({
                 className: 'glm-map-city',
                 html: '<span style="' + style + '" class="glm-theme-map-label">Cheboygan</span>'
             })
-        }).addTo(leafletMap).bindPopup(cheboygan);
+        }).addTo(leafletMap);
 
         //////////////////////
-        var harborInfo = '<div class="marker-title">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</div>';
 
-        var harbor = new L.marker([45.4274, -84.9106]).bindPopup(harborInfo); //opacity may be set to zero
+        var harbor = new L.marker([45.4274, -84.9106]);
         harbor.addTo(leafletMap);
 
-        var harbor = '<div class="marker-title">West Traverse Township is a civil township of Emmet County in the U.S. state of Michigan. The population was 1,448 at the 2000 census." </div>';
         new L.Marker([45.4274, -84.9106], {
             icon: new L.DivIcon({
                 className: 'glm-map-city',
                 html: '<span style="' + style + '" class="glm-theme-map-label">Harbor Springs</span>'
             })
-        }).addTo(leafletMap).bindPopup(harbor);
+        }).addTo(leafletMap);
 
         ////////////////
 
-        var indianriverInfo = '<div class="marker-title">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</div>';
-
-        var indianriver = new L.marker([45.4083, -84.6154]).bindPopup(indianriverInfo); //opacity may be set to zero
+        var indianriver = new L.marker([45.4083, -84.6154]);
         indianriver.addTo(leafletMap);
 
-        var irLabel = '<div class="marker-title">West Traverse Township is a civil township of Emmet County in the U.S. state of Michigan. The population was 1,448 at the 2000 census." </div>';
-        new L.Marker([45.4083, -84.6154], {
+
+        new L.Marker([45.40, -84.6154], {
             icon: new L.DivIcon({
                 className: 'glm-map-city',
                 html: '<span style="' + style + '" class="glm-theme-map-label">Indian River</span>'
             })
-        }).addTo(leafletMap).bindPopup(irLabel);
+        }).addTo(leafletMap);
 
         ///////////
 
-        var petoskeyInfo = '<div class="marker-title">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</div>';
-
-        var petoskey = new L.marker([45.358, -85.0271]).bindPopup(petoskeyInfo); //opacity may be set to zero
+        var petoskey = new L.marker([45.358, -85.0271]);
         petoskey.addTo(leafletMap);
 
-        var petoskey = '<div class="marker-title">West Traverse Township is a civil township of Emmet County in the U.S. state of Michigan. The population was 1,448 at the 2000 census." </div>';
-        new L.Marker([45.358, -85.0271], {
+
+        new L.Marker([45.350, -85.0271], {
             icon: new L.DivIcon({
                 className: 'glm-map-city',
                 html: '<span style="' + style + '" class="glm-theme-map-label">Petoskey</span>'
             })
-        }).addTo(leafletMap).bindPopup(petoskey);
+        }).addTo(leafletMap);
         //////////////////////
-        var petoskeyEastInfo = '<div class="marker-title">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</div>';
 
-        var petoskeyEast = new L.marker([45.3746, -84.9276]).bindPopup(petoskeyEastInfo); //opacity may be set to zero
+        var petoskeyEast = new L.marker([45.3746, -84.9276]);
         petoskeyEast.addTo(leafletMap);
 
-        var petoskeyEast = '<div class="marker-title">West Traverse Township is a civil township of Emmet County in the U.S. state of Michigan. The population was 1,448 at the 2000 census." </div>';
-        new L.Marker([45.3746, -84.9276], {
+        new L.Marker([45.370, -84.9276], {
             icon: new L.DivIcon({
                 className: 'glm-map-city',
                 html: '<span style="' + style + '" class="glm-theme-map-label">Petoskey East</span>'
             })
-        }).addTo(leafletMap).bindPopup(petoskeyEast);
-
-        // West Traverse Township
-        // var ltInfo = '<div class="marker-title">West Traverse Township is a civil township of Emmet County in the U.S. state of Michigan. The population was 1,448 at the 2000 census." </div>';
-        // new L.Marker([45.405, -84.6135], {
-        //     icon: new L.DivIcon({
-        //         className: 'glm-map-city',
-        //         html: '<span style="color: #343539;line-height: 1;display: block; width: 100px; font-weight: bold;" class="glm-theme-map-label">Indian River</span>'
-        //     })
-        // }).addTo(leafletMap).bindPopup(ltInfo);
+        }).addTo(leafletMap);
     }
     initMap();
 });
\ No newline at end of file