From b65410e94af4fc78e07d2d9e8706c541d2a7a370 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Tue, 22 Oct 2019 12:38:46 -0400 Subject: [PATCH] lining up the labels so they aren't overlapping other cities --- glm-map.js | 68 ++++++++++++++++++------------------------------------ 1 file changed, 22 insertions(+), 46 deletions(-) diff --git a/glm-map.js b/glm-map.js index 22d2bed..45feb15 100644 --- a/glm-map.js +++ b/glm-map.js @@ -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 = '
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 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 = '
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."
'; - new L.Marker([45.21, -85.015], { + new L.Marker([45.205, -85.015], { icon: new L.DivIcon({ className: 'glm-map-city', html: 'Boyne City' }) - }).addTo(leafletMap).bindPopup(boyne); + }).addTo(leafletMap); ////////////////////// - var chxInfo = '
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 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 = '
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."
'; - new L.Marker([45.2984, -85.2558], { + new L.Marker([45.289, -85.2558], { icon: new L.DivIcon({ className: 'glm-map-city', html: 'Charlevoix' }) - }).addTo(leafletMap).bindPopup(chx); + }).addTo(leafletMap); ////////////////////// - var cheboyganInfo = '
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 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 = '
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."
'; new L.Marker([45.5972, -84.4848], { icon: new L.DivIcon({ className: 'glm-map-city', html: 'Cheboygan' }) - }).addTo(leafletMap).bindPopup(cheboygan); + }).addTo(leafletMap); ////////////////////// - var harborInfo = '
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 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 = '
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."
'; new L.Marker([45.4274, -84.9106], { icon: new L.DivIcon({ className: 'glm-map-city', html: 'Harbor Springs' }) - }).addTo(leafletMap).bindPopup(harbor); + }).addTo(leafletMap); //////////////// - var indianriverInfo = '
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 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 = '
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."
'; - new L.Marker([45.4083, -84.6154], { + + new L.Marker([45.40, -84.6154], { icon: new L.DivIcon({ className: 'glm-map-city', html: 'Indian River' }) - }).addTo(leafletMap).bindPopup(irLabel); + }).addTo(leafletMap); /////////// - var petoskeyInfo = '
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 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 = '
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."
'; - new L.Marker([45.358, -85.0271], { + + new L.Marker([45.350, -85.0271], { icon: new L.DivIcon({ className: 'glm-map-city', html: 'Petoskey' }) - }).addTo(leafletMap).bindPopup(petoskey); + }).addTo(leafletMap); ////////////////////// - var petoskeyEastInfo = '
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 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 = '
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."
'; - new L.Marker([45.3746, -84.9276], { + new L.Marker([45.370, -84.9276], { icon: new L.DivIcon({ className: 'glm-map-city', html: 'Petoskey East' }) - }).addTo(leafletMap).bindPopup(petoskeyEast); - - // West Traverse Township - // var ltInfo = '
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."
'; - // new L.Marker([45.405, -84.6135], { - // icon: new L.DivIcon({ - // className: 'glm-map-city', - // html: 'Indian River' - // }) - // }).addTo(leafletMap).bindPopup(ltInfo); + }).addTo(leafletMap); } initMap(); }); \ No newline at end of file -- 2.17.1