Created
January 26, 2021 09:47
-
-
Save hhkaos/38ba755514f5ffedb4a8ae79a5272925 to your computer and use it in GitHub Desktop.
Simple svg map
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<style> | |
#map { | |
height: 400px; | |
} | |
</style> | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> | |
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script> | |
// create the map | |
var map = L.map('map', { | |
center: [40.75, -74.2], | |
zoom: 13 | |
}); | |
var imageUrl = 'https://www.amcharts.com/lib/3/maps/svg/australiaHigh.svg', | |
imageBounds = [ | |
[40.712216, -74.22655], | |
[40.773941, -74.12544] | |
]; | |
L.imageOverlay(imageUrl, imageBounds).addTo(map); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment