Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!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