Skip to content

Instantly share code, notes, and snippets.

@aloisdg
Created January 15, 2019 16:39
Show Gist options
  • Save aloisdg/ab7172b4eb4d7f58471cdcfe58741af5 to your computer and use it in GitHub Desktop.
Save aloisdg/ab7172b4eb4d7f58471cdcfe58741af5 to your computer and use it in GitHub Desktop.
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.geolocation-default {
display: block;
}
.geolocation-android {
display: none;
}
.geolocation-ios {
display: none;
}
@media (pointer: coarse) {
.geolocation-default {
display: none;
}
@supports (-webkit-overflow-scrolling: touch) {
.geolocation-android {
display: none;
}
.geolocation-ios {
display: block;
}
}
@supports not (-webkit-overflow-scrolling: touch) {
.geolocation-android {
display: block;
}
.geolocation-ios {
display: none;
}
}
}
</style>
</head>
<body>
<!-- lat, long -->
<a class="geolocation-ios" href="comgooglemaps://?q=37.786971,-122.399677">test</a>
<a class="geolocation-android" href="geo:37.786971,-122.399677">test</a>
<a class="geolocation-default" href="http://maps.google.com/?q=37.786971,-122.399677">test</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment