add apple maps support on iOS and mac

This commit is contained in:
David 2022-03-20 16:00:20 -04:00
parent 8e070661ab
commit 58a5ecafef
1 changed files with 13 additions and 2 deletions

View File

@ -560,11 +560,19 @@
{{city}},NY {{#postcode}} {{postcode}} {{/postcode}}
</p>
<p>
View in:
<a
href="https://maps.google.com/maps?q={{name}} {{address}},{{city}},NY"
href="https://maps.google.com/maps?q={{& name}}+{{address}},{{city}},NY"
target="_blank"
>View in Google Maps</a
>Google Maps</a
>
{{#isAppleIsh}}
<a
href="http://maps.apple.com/?q={{& name}}&address={{address}},{{city}},NY"
target="_blank"
>Apple Maps</a
>
{{/isAppleIsh}}
</p>
<ul>
{{#website}}
@ -579,6 +587,8 @@
</script>
<script>
isAppleIsh = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);
mapboxgl.accessToken =
"pk.eyJ1IjoiYWxhenlyZWFkZXIiLCJhIjoiY2lucDZhb2JxMHp6MHRxa2pvaTFoOWpuZyJ9.DILGYYxxt7A-A_lHHwp6tQ";
var map = new mapboxgl.Map({
@ -607,6 +617,7 @@
value.rowNumber = key;
value.slug = slugify(value.name);
value.cleanedWebsite = cleanWebsite(value.website);
value.isAppleIsh = isAppleIsh;
});
$("#storeCount").html(data.length);
window.data = data;