Skip to content

Instantly share code, notes, and snippets.

@AlanPew
Created September 18, 2020 15:14
Show Gist options
  • Save AlanPew/5e6eb233ff2d613ae4390d1537bca416 to your computer and use it in GitHub Desktop.
Save AlanPew/5e6eb233ff2d613ae4390d1537bca416 to your computer and use it in GitHub Desktop.
apple3
<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.eyJpc3MiOiJBbGFuIFBldyIsImlhdCI6MTYwMDQyOTU5NCwiZXhwIjoxNjA1Nzg2Mzk0fQ.f01Xf2L5MWCoF6efq9cwyySXJiacdlxHJk5y1z9Ptwg-_KBldJVEVSov020E_bI0Pyrn8zNi_mhY79YzsoIUwg');
}
});
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