Skip to content

Instantly share code, notes, and snippets.

@AlanPew
Created September 18, 2020 15:17
Show Gist options
  • Save AlanPew/1178ad82f3c6bd697a07ae9c5fe53bc3 to your computer and use it in GitHub Desktop.
Save AlanPew/1178ad82f3c6bd697a07ae9c5fe53bc3 to your computer and use it in GitHub Desktop.
apple4
<head>
<script src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js"></script>
<style>
#map {
width: 100%;
height: 600px;
}
</style>
</head>
<body>
<div id="map"></div>
<script>
mapkit.init({
authorizationCallback: function(done) {
done('eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjM4Mlk4MzZKOFcifQ.eyJpc3MiOiJLUjY0UlRZTFQ2IiwiaWF0IjoxNjAwNDI5NTk0LCJleHAiOjE2MDU3ODYzOTR9.9D785F5cr3mQhtZtmYLw0177YFnYMLWkzgqSK0jtxS3TUCw5gfKdiJNnrSse1JdsrDCvf_G3XSpzVwq-YmbFDg');
}
});
var Cupertino = new mapkit.CoordinateRegion(
new mapkit.Coordinate(37.3316850890998, -122.030067374026),
new mapkit.CoordinateSpan(0.167647972, 0.354985255)
);
var map = new mapkit.Map("map");
map.region = Cupertino;
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment