Skip to content

Instantly share code, notes, and snippets.

@fitomad
Last active September 3, 2018 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitomad/05e34de67fab08a759e04c8add4b5138 to your computer and use it in GitHub Desktop.
Save fitomad/05e34de67fab08a759e04c8add4b5138 to your computer and use it in GitHub Desktop.
<!doctype html>
<html>
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
</head>
<body>
<!-- 1 -->
<div id="map" style="width: 100%; height: 100%;">
</body>
<!-- 2 -->
<script src="https://cdn.apple-mapkit.com/mk/5.0.x/mapkit.js"></script>
<!-- 3 -->
<script>
mapkit.init({ authorizationCallback: function(done) {
// Pasamos como parámetro el token JWT que hemos generado previamente
done("AQUÍ.TU.TOKEN");
}
});
let attributes = {
center : new mapkit.Coordinate(40.416745, -3.703541)
};
let map = new mapkit.Map("map", attributes)
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment