add apple maps support on iOS and mac
This commit is contained in:
parent
8e070661ab
commit
58a5ecafef
15
index.html
15
index.html
@ -560,11 +560,19 @@
|
|||||||
{{city}},NY {{#postcode}} {{postcode}} {{/postcode}}
|
{{city}},NY {{#postcode}} {{postcode}} {{/postcode}}
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
|
View in:
|
||||||
<a
|
<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"
|
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>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
{{#website}}
|
{{#website}}
|
||||||
@ -579,6 +587,8 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
isAppleIsh = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);
|
||||||
|
|
||||||
mapboxgl.accessToken =
|
mapboxgl.accessToken =
|
||||||
"pk.eyJ1IjoiYWxhenlyZWFkZXIiLCJhIjoiY2lucDZhb2JxMHp6MHRxa2pvaTFoOWpuZyJ9.DILGYYxxt7A-A_lHHwp6tQ";
|
"pk.eyJ1IjoiYWxhenlyZWFkZXIiLCJhIjoiY2lucDZhb2JxMHp6MHRxa2pvaTFoOWpuZyJ9.DILGYYxxt7A-A_lHHwp6tQ";
|
||||||
var map = new mapboxgl.Map({
|
var map = new mapboxgl.Map({
|
||||||
@ -607,6 +617,7 @@
|
|||||||
value.rowNumber = key;
|
value.rowNumber = key;
|
||||||
value.slug = slugify(value.name);
|
value.slug = slugify(value.name);
|
||||||
value.cleanedWebsite = cleanWebsite(value.website);
|
value.cleanedWebsite = cleanWebsite(value.website);
|
||||||
|
value.isAppleIsh = isAppleIsh;
|
||||||
});
|
});
|
||||||
$("#storeCount").html(data.length);
|
$("#storeCount").html(data.length);
|
||||||
window.data = data;
|
window.data = data;
|
||||||
|
Loading…
Reference in New Issue
Block a user