Skip to content

Instantly share code, notes, and snippets.

@techieforgood
Last active September 10, 2022 14:56
Show Gist options
  • Save techieforgood/5ab24cbd22d4210e16b59659251d1d42 to your computer and use it in GitHub Desktop.
Save techieforgood/5ab24cbd22d4210e16b59659251d1d42 to your computer and use it in GitHub Desktop.
<script>
var coords = [
["\u003cimg src='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io//images/sp.jpg' class='rounded-t-md w-full' alt='1st place in Sao Paulo' /\u003e \u003cdiv class=\"mb-5\"\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/a-place-in-sao-paulo/'\u003e \u003ch2 class='text-2xl text-primary pt-3 font-light'\u003e1st place in Sao Paulo\u003c/h2\u003e \u003c/a\u003e \u003cp class='text-black text-opacity-50 text-sm text-light'\u003eSome address 3\u003c/p\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/a-place-in-sao-paulo/' class='border text-md border-primary text-primary hover:border-secondary hover:text-secondary transition-all px-2 py-2 rounded-md'\u003e View Details \u003c/a\u003e \u003c/div\u003e", 1.23 , 2.34 ],
["\u003cimg src='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io//images/sp.jpg' class='rounded-t-md w-full' alt='Avenida Paulista' /\u003e \u003cdiv class=\"mb-5\"\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/avenida-paulista/'\u003e \u003ch2 class='text-2xl text-primary pt-3 font-light'\u003eAvenida Paulista\u003c/h2\u003e \u003c/a\u003e \u003cp class='text-black text-opacity-50 text-sm text-light'\u003eSome address 3\u003c/p\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/avenida-paulista/' class='border text-md border-primary text-primary hover:border-secondary hover:text-secondary transition-all px-2 py-2 rounded-md'\u003e View Details \u003c/a\u003e \u003c/div\u003e", -23.56558 , -46.651428 ],
["\u003cimg src='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io//images/sp.jpg' class='rounded-t-md w-full' alt='2nd place in Sao Paulo' /\u003e \u003cdiv class=\"mb-5\"\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/2nd-place-in-sao-paulo/'\u003e \u003ch2 class='text-2xl text-primary pt-3 font-light'\u003e2nd place in Sao Paulo\u003c/h2\u003e \u003c/a\u003e \u003cp class='text-black text-opacity-50 text-sm text-light'\u003eSome address 1\u003c/p\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/2nd-place-in-sao-paulo/' class='border text-md border-primary text-primary hover:border-secondary hover:text-secondary transition-all px-2 py-2 rounded-md'\u003e View Details \u003c/a\u003e \u003c/div\u003e", 1.23 , 2.34 ],
["\u003cimg src='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io//images/sp.jpg' class='rounded-t-md w-full' alt='3rd place in SaoPaulo' /\u003e \u003cdiv class=\"mb-5\"\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/3rd-place-in-sao-paulo/'\u003e \u003ch2 class='text-2xl text-primary pt-3 font-light'\u003e3rd place in SaoPaulo\u003c/h2\u003e \u003c/a\u003e \u003cp class='text-black text-opacity-50 text-sm text-light'\u003eSome address 2\u003c/p\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/3rd-place-in-sao-paulo/' class='border text-md border-primary text-primary hover:border-secondary hover:text-secondary transition-all px-2 py-2 rounded-md'\u003e View Details \u003c/a\u003e \u003c/div\u003e", 1.23 , 2.34 ],
["\u003cimg src='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io//images/sp.jpg' class='rounded-t-md w-full' alt='Mercado Municipal' /\u003e \u003cdiv class=\"mb-5\"\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/mercado-municipal/'\u003e \u003ch2 class='text-2xl text-primary pt-3 font-light'\u003eMercado Municipal\u003c/h2\u003e \u003c/a\u003e \u003cp class='text-black text-opacity-50 text-sm text-light'\u003eSome address 2\u003c/p\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/mercado-municipal/' class='border text-md border-primary text-primary hover:border-secondary hover:text-secondary transition-all px-2 py-2 rounded-md'\u003e View Details \u003c/a\u003e \u003c/div\u003e", -22.9041 , -47.06386 ],
["\u003cimg src='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io//images/sp.jpg' class='rounded-t-md w-full' alt='Parque do Ibirapuera' /\u003e \u003cdiv class=\"mb-5\"\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/parque-do-ibirapuera/'\u003e \u003ch2 class='text-2xl text-primary pt-3 font-light'\u003eParque do Ibirapuera\u003c/h2\u003e \u003c/a\u003e \u003cp class='text-black text-opacity-50 text-sm text-light'\u003eSome address 1\u003c/p\u003e \u003ca href='https://1313-judith9-hugowebsite-hznhugygsrs.ws-us64.gitpod.io/en/sao-paulo/parque-do-ibirapuera/' class='border text-md border-primary text-primary hover:border-secondary hover:text-secondary transition-all px-2 py-2 rounded-md'\u003e View Details \u003c/a\u003e \u003c/div\u003e", -23.587416 , -46.657635 ],];
var map = L.map('map', {
attributionControl: false,
})
L.tileLayer(
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
}).addTo(map);
var customOptions =
{
'className' : 'rounded-md border border-primary xl:w-72 lg:w-80 sm:w-72',
}
for (var i = 0; i < coords.length; i++) {
marker = new L.marker([coords[i][1],coords[i][2]])
.bindPopup(coords[i][0], customOptions)
.addTo(map);
}
const _bounds = coords.map(entry => [entry[1],entry[2]])
map.fitBounds(_bounds)
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment