Skip to content

Instantly share code, notes, and snippets.

@andyhullinger
Created June 27, 2024 16:50
Show Gist options
  • Save andyhullinger/4a77f0e06eacefacade9052a0412a2bb to your computer and use it in GitHub Desktop.
Save andyhullinger/4a77f0e06eacefacade9052a0412a2bb to your computer and use it in GitHub Desktop.
leaflet 123rd wwga
<div id="map"></div>
<div id="wwgafield"></div>
var map = L.map('wwgafield').setView([17.811456, -31.816406], 3);
L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', {
maxZoom: 19,
}).addTo(map);
let playerData = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-96.1342,
19.1738
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Daniela Abonce Mex</a></h2><p>from Veracruz, Mexico</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-88.305,
41.8878
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Sarah Arnold</a></h2><p>from Geneva, IL</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-97.3308,
32.7555
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Savannah Barber</a></h2><p>from Fort Worth, TX</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-90.6295,
38.582
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Brooke Biermann</a></h2><p>from Wildwood, MO</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-83.4822,
42.3087
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Bridget Boczar</a></h2><p>from Canton, MI</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
153.0251,
-27.4698
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Justice Bosio</a></h2><p>from Queensland, Australia</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-83.6299,
42.9275
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Kate Brody</a></h2><p>from Grand Blanc, MI</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-86.118,
39.9784
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Jocelyn Bruch</a></h2><p>from Carmel, IN</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
114.1694,
22.3193
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Chloe Chan</a></h2><p>from Hong Kong, China</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-97.1436,
34.1742
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Reagan Chaney</a></h2><p>from Ardmore, OK</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
100.5253,
14.0208
]
},
"properties": {
"Popup": "<h2><a href=\"https://cyclones.com/sports/womens-golf/roster/pammy-chookaew/12804\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Pimkwan Chookaew</a></h2><p>from Pathum Thani, Thailand</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
114.1694,
22.3193
]
},
"properties": {
"Popup": "<h2><a href=\"[40.7128 + 0.0025, -74.0060 - 0.0025]; // Offset about 1/4 mile northeast\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Charlene Chung</a></h2><p>from Hong Kong, China</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-114.0719,
51.0447
]
},
"properties": {
"Popup": "<h2><a href=\"https://vanderbilthustler.com/2024/03/18/finding-a-routine-tillie-claggett-is-a-budding-star-for-the-vanderbilt-womens-golf-team/\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Tillie Claggett</a></h2><p>from Calgary, Canada</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-83.6768,
34.6848
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Caroline Craig</a></h2><p>from Sautee Nacoochee, GA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-83.6768,
34.6848
]
},
"properties": {
"Popup": "<h2><a href=\"[40.7128 + 0.0025, -74.0060 - 0.0025]; // Offset about 1/4 mile northeast\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Catie Craig</a></h2><p>from Sautee Nacoochee, GA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-86.472,
33.7754
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Molly Brown Davidson</a></h2><p>from Springville, AL</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-76.945,
38.5954
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Bailey Davis</a></h2><p>from White Plains, MD</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-104.903,
40.4775
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Leigha Devine</a></h2><p>from Windsor, CO</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-97.7431,
30.2672
]
},
"properties": {
"Popup": '<h2 style="margin:0;padding:0"><a href="https://texassports.com/sports/womens-golf/roster/bentley-cotton/12936" target="_blank">🇺🇸Bentley Cotton</a></h2><h2 style="margin:0;padding:0"><a href="https://isabelemanuels.com" target="_blank">🇺🇸Isabel Emanuels</a></h2><h2 style="margin:0;padding:0"><a href="https://gostanford.com/sports/womens-golf/roster/sadie-englemann/19301" target="_blank">🇺🇸Sadie Englemann</a></h2><h2 style="margin:0;padding:0"><a href="https://farahokeefe.com" target="_blank">🇺🇸Farah O’Keefe</a></h2><p style="margin:0;padding:0">from Austin, TX</p>'
}
},
// {
// "type": "Feature",
// "geometry": {
// "type": "Point",
// "coordinates": [
// -97.7431 - 0.003,
// 30.2672 + 0.003
// ]
// },
// "properties": {
// "Popup": "<h2><a href=\"[40.7128 + 0.0025, -74.0060 - 0.0025]; // Offset about 1/4 mile northeast\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Isabel Emanuels</a></h2><p>from Austin, TX</p>"
// }
// },
// {
// "type": "Feature",
// "geometry": {
// "type": "Point",
// "coordinates": [
// -104.943,
// 40.4815
// ]
// },
// "properties": {
// "Popup": "<h2><a href=\"[40.7128 + 0.0025, -74.0060 - 0.0025]; // Offset about 1/4 mile northeast\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Sadie Englemann</a></h2><p>from Austin, TX</p>"
// }
// },
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-74.4463,
40.6428
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Ami Gianchandani</a></h2><p>from Watchung, NJ</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-86.118,
39.9784
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Gabriella Gilrowski</a></h2><p>from Carmel, IN</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-81.9179,
41.4553
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Cara Heisterkamp</a></h2><p>from Westlake, OH</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-73.7515,
40.9279
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Alice Hodge</a></h2><p>from Larchmont, NY</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-82.6501,
34.5034
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Chloe Holder</a></h2><p>from Anderson, SC</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-82.8088,
40.0814
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Kary Hollenbaugh</a></h2><p>from New Albany, OH</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
120.227,
22.9997
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Huai-Chien Hsu</a></h2><p>from Tainan, Taiwan</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-123.1207,
49.2827
]
},
"properties": {
"Popup": "<h2><a href=\"https://www.golfcanada.ca/team_canada_member/anna-huang/\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Anna Huang</a></h2><p>from Vancouver, Canada</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
8.8017,
53.0793
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Viktoria Hund</a></h2><p>from Bremen, Germany</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-84.143,
33.8904
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Thienna Huynh</a></h2><p>from Lilburn, GA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-88.1376,
42.1544
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Mara Janess</a></h2><p>from Barrington, IL</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-87.5558,
37.9748
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Chloe Johnson</a></h2><p>from Evansville, IN</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-83.2457,
42.5834
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Shannon Kennedy</a></h2><p>from Bloomfield Hills, MI</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-80.2442,
36.0999
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Morgan Ketchum</a></h2><p>from Winston Salem, NC</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-74.951,
40.3649
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Natasha Kiel</a></h2><p>from New Hope, PA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-94.1288,
36.1867
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Grace Kilcrease</a></h2><p>from Springdale, AR</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-81.7948,
26.142
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Addison Klonowski</a></h2><p>from Naples, FL</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-87.8406,
42.2586
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Emily Krall</a></h2><p>from Lake Forest, IL</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-122.2015,
47.6101
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Grace Lee</a></h2><p>from Bellevue, WA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-117.8265,
33.6846
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Elise Lee</a></h2><p>from Irvine, CA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-74.5499,
40.7066
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Katie Li</a></h2><p>from Basking Ridge, NJ</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
120.227,
22.9997
]
},
"properties": {
"Popup": "<h2><a href=\"[40.7128 + 0.0025, -74.0060 - 0.0025]; // Offset about 1/4 mile northeast\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Hsin Chun Liao</a></h2><p>from Tainan, Taiwan</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-86.4467,
36.3881
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Lynn Lim</a></h2><p>from Gallatin, TN</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
121.5654,
25.033
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Sophia Lin</a></h2><p>from Taipei, Taiwan</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-85.9533,
36.2484
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Sophie Linder</a></h2><p>from South Carthage, TN</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-111.9261,
33.4942
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Kylee Loewe</a></h2><p>from Scottsdale, AZ</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-3.7038,
40.4168
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Carolina Lopez Chacarra</a></h2><p>from Madrid, Spain</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-2.4597,
36.8381
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Marta Lopez Echevarria</a></h2><p>from Almeria, Spain</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-74.6119,
40.334
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Katie Lu</a></h2><p>from Plainsboro, NJ</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
28.0473,
-26.2041
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Caitlyn Macnab</a></h2><p>from Johannesburg, South Africa</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
144.9631,
-37.8136
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Keeley Marx</a></h2><p>from Melbourne, Australia</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-105.0372,
39.8367
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Jessica Mason</a></h2><p>from Westminster, CO</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-79.2678,
36.0959
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Emily Mathews</a></h2><p>from Mebane, NC</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-75.5398,
39.7391
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Avery McCrery</a></h2><p>from Wilmington, DE</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-98.4936,
29.4241
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Emma McMyler</a></h2><p>from San Antonio, TX</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-84.1985,
34.0289
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Ava Merrill</a></h2><p>from Johns Creek, GA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-79.0215,
-8.1092
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Luisamariana Mesones</a></h2><p>from Trujillo, Peru</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-94.6708,
38.9822
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Julia Misemer</a></h2><p>from Overland Park, KS</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-115.1398,
36.1699
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Riana Mission</a></h2><p>from Las Vegas, NV</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-97.1875,
32.9935
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8MacKenzie Moore</a></h2><p>from Trophy Club, TX</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-81.932,
34.9495
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Anna Morgan</a></h2><p>from Spartanburg, SC</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-118.0725,
33.8031
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Madison Murrr</a></h2><p>from Los Alamitos, CA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-99.1332,
19.4326
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Alenka Navarro</a></h2><p>from Mexico City, Mexico</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-117.5917,
33.6589
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Nicole Neale</a></h2><p>from Trabuco Canyon, CA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-122.3321,
47.6062
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Lauryn Nguyen</a></h2><p>from Seattle, WA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-90.5823,
38.6067
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Drew Nienhaus</a></h2><p>from St. Albans, MO</p>"
}
},
// {
// "type": "Feature",
// "geometry": {
// "type": "Point",
// "coordinates": [
// -90.6023,
// 38.6087
// ]
// },
// "properties": {
// "Popup": "<h2><a href=\"[40.7128 + 0.0025, -74.0060 - 0.0025]; // Offset about 1/4 mile northeast\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Farah O'Keefe</a></h2><p>from Austin, TX</p>"
// }
// },
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-100.8116,
20.5279
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Lauren Dainia Olivares</a></h2><p>from Celaya, Mexico</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-86.2692,
39.9509
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Annabelle Pancake</a></h2><p>from Zionsville, IN</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
126.978,
37.5665
]
},
"properties": {
"Popup": "<h2><a href=\"https://thedailytexan.com/2023/10/05/bohyun-park-golf-growth-globetrotting/\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Bohyun Park</a></h2><p>from Seoul, Republic of Korea</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-80.2442,
36.0999
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Macy Pate</a></h2><p>from Winston Salem, NC</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
138.6007,
-34.9285
]
},
"properties": {
"Popup": "<h2><a href=\"https://pga.org.au/news/the-athena-get-to-know-caitlin-peirce/\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Caitlin Peirce</a></h2><p>from Adelaide, Australia</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-104.9903,
39.7392
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Eva Pett</a></h2><p>from Denver, CO</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-115.1398,
36.1699
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Lauren Pham</a></h2><p>from Las Vegas, NV</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-87.9192,
41.7475
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Samantha Postillion</a></h2><p>from Burr Ridge, IL</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-94.6144,
38.9664
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Megan Propeck</a></h2><p>from Leawood, KS</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-119.0376,
34.2164
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Catherine Rao</a></h2><p>from Camarillo, CA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
151.2093,
-33.8688
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Annika Rathbone</a></h2><p>from NSW, Australia</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-81.2362,
33.9816
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Isabella Rawl</a></h2><p>from Lexington, SC</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
153.0251,
-27.4698
]
},
"properties": {
"Popup": "<h2><a href=\"Queensland, Australia (using Brisbane as a reference point)\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Hannah Reeves</a></h2><p>from Queensland, Australia</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-81.8608,
35.1492
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Sydney Roberts</a></h2><p>from Chesnee, SC</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
144.2794,
-36.757
]
},
"properties": {
"Popup": "<h2><a href=\"https://www.golf.org.au/jazy-just-keeps-impressing-/\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Jazy Roberts</a></h2><p>from Bendigo, Australia</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-81.6557,
30.3322
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Chloe Schiavone</a></h2><p>from Jacksonville, FL</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-79.9311,
32.7765
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Emma Schimpf</a></h2><p>from Charleston, SC</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-81.6557,
30.3322
]
},
"properties": {
"Popup": "<h2><a href=\"Jacksonville, FL\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Kaitlyn Schroeder</a></h2><p>from Jacksonville, FL</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-75.6757,
36.0312
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Katherine Schuster</a></h2><p>from Kill Devil Hills, NC</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-111.9261,
33.4942
]
},
"properties": {
"Popup": "<h2><a href=\"[40.7128 + 0.0025, -74.0060 - 0.0025]; // Offset about 1/4 mile northeast\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Sydney Seigel</a></h2><p>from Scottsdale, AZ</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-82.0107,
33.4735
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Mia Sessa</a></h2><p>from Augusta, GA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-99.1332,
19.4326
]
},
"properties": {
"Popup": "<h2><a href=\"Mexico City, Mexico\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Vania Alicia Simont</a></h2><p>from Mexico City, Mexico</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-79.4378,
36.0956
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Kayla Smith</a></h2><p>from Burlington, NC</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-88.0964,
42.1183
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Caroline Smith</a></h2><p>from Inverness, IL</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-71.4383,
42.5792
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Molly Smith</a></h2><p>from Westford, MA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-71.4383,
42.5792
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Morgan Smith</a></h2><p>from Westford, MA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-84.2941,
34.0754
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Kate Song</a></h2><p>from Alpharetta, GA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-118.4912,
34.0195
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Anna Song</a></h2><p>from Santa Monica, CA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
151.2093,
-33.8688
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8June Song</a></h2><p>from Sydney, Australia</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-84.388,
33.749
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Reagan Southerland</a></h2><p>from Atlanta, GA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-95.3698,
29.7604
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Allyn Stephens</a></h2><p>from Houston, TX</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-83.6055,
42.6406
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Sophie Stevens</a></h2><p>from Highland, MI</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
18.4241,
-33.9249
]
},
"properties": {
"Popup": "<h2><a href=\"https://goheels.com/sports/womens-golf/roster/megan-streicher/24490\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Megan Streicher</a></h2><p>from Cape Town, South Africa</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-89.4012,
43.0731
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Izzi Stricker</a></h2><p>from Madison, WI</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-95.4613,
30.1658
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Sky Sudberry</a></h2><p>from The Woodlands, TX</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
153.4,
-28.0167
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Momo Sugiyama</a></h2><p>from Gold Coast, Australia</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-111.9261,
33.4942
]
},
"properties": {
"Popup": "<h2><a href=\"[40.7128 + 0.0025, -74.0060 - 0.0025]; // Offset about 1/4 mile northeast\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Grace Summerhays</a></h2><p>from Scottsdale, AZ</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-122.143,
37.4419
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Lauren Sung</a></h2><p>from Palo Alto, CA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-122.6476,
47.7368
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Suzie Tran</a></h2><p>from Poulsbo, WA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-74.0721,
4.711
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Luana Valero</a></h2><p>from Bogota, Colombia</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-93.2344,
45.1608
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Kathryn VanArragon</a></h2><p>from Blaine, MN</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-121.2358,
38.7907
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Anika Varma</a></h2><p>from Rocklin, CA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-77.2718,
38.793
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Melanie Walker</a></h2><p>from Burke, VA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-80.2962,
26.0073
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Casey Weidenfeld</a></h2><p>from Pembroke Pines, FL</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
116.4074,
39.9042
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Amelia Whinney</a></h2><p>from Adelaide, Australia</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
114.1694,
22.3193
]
},
"properties": {
"Popup": "<h2><a href=\"[40.7128 + 0.0025, -74.0060 - 0.0025]; // Offset about 1/4 mile northeast\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Siuue Wu</a></h2><p>from Hong Kong, China</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-117.7198,
34.0967
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Kelly Xu</a></h2><p>from Claremont, CA</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-76.9455,
39.2062
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Helen Yeung</a></h2><p>from Clarksville, MD</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
114.1694,
22.3193
]
},
"properties": {
"Popup": "<h2><a href=\"[40.7128 + 0.0025, -74.0060 - 0.0025]; // Offset about 1/4 mile northeast\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Jiayi (Angel) Yin</a></h2><p>from Hong Kong, China</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
116.4074,
39.9042
]
},
"properties": {
"Popup": "<h2><a href=\"Beijing, China\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Mingyu Zhang</a></h2><p>from Beijing, China</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-79.337,
43.8561
]
},
"properties": {
"Popup": "<h2><a href=\"[Markham, Ontario, Canada\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Victoria Zheng</a></h2><p>from Ontario, Canada</p>"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-93.2923,
37.209
]
},
"properties": {
"Popup": "<h2><a href=\"\" target=\"_blank\">\ud83c\uddfa\ud83c\uddf8Reagan Zibilski</a></h2><p>from Springfield, MO</p>"
}
}
]
}
function whenClicked(e) {
map.setView(e.latlng, 6);
L.DomEvent.stopPropagation(e);
console.log(this._leaflet_id)
}
function createPopupContent(feature, layer) {
layer.bindPopup(
feature.properties.Popup
);
layer.on(
{click: whenClicked}
);
}
let athletemap = L.geoJSON(playerData, {
// style: colorTheMap,
onEachFeature: createPopupContent
}).addTo(map);
function setZoomOnClickOutsideMarkers(map, zoomLevel, minZoomThreshold) {
map.on('click', function(e) {
var isOnMarker = false;
map.eachLayer(function(layer) {
if (layer instanceof L.Marker) {
if (layer.getLatLng().equals(e.latlng)) {
isOnMarker = true;
}
}
});
if (!isOnMarker && map.getZoom() < minZoomThreshold) {
map.flyTo(e.latlng, zoomLevel, {
duration: 0.5, // Animation duration in seconds
easeLinearity: 0.25
});
}
});
}
// Usage:
setZoomOnClickOutsideMarkers(map, 4, 10);
// -- UTIL get coords at click
// function addClickCoordinates(map) {
// // Create a container for the coordinate display
// var coordDisplay = L.control({position: 'bottomleft'});
// coordDisplay.onAdd = function (map) {
// this._div = L.DomUtil.create('div', 'coordinate-display');
// this._div.innerHTML = 'Click on the map';
// return this._div;
// };
// coordDisplay.addTo(map);
// // Add click event listener to the map
// map.on('click', function(e) {
// var lat = e.latlng.lat.toFixed(6);
// var lng = e.latlng.lng.toFixed(6);
// coordDisplay._div.innerHTML = 'Clicked at: ' + lat + ', ' + lng;
// // Optional: Create a marker at the clicked location
// L.marker(e.latlng).addTo(map)
// .bindPopup('You clicked at: ' + lat + ', ' + lng)
// .openPopup();
// });
// }
// addClickCoordinates(map);
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/OverlappingMarkerSpiderfier-Leaflet/0.2.6/oms.min.js"></script>
#wwgafield{
width: 100vw;
height: 100vh;
}
h1{
font-size: 32px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.9.4/leaflet.css" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment