2016-10-07 22:45:02 +08:00
|
|
|
---
|
|
|
|
layout: tutorial_frame
|
|
|
|
title: Leaflet class diagram
|
2017-10-04 22:33:04 +08:00
|
|
|
css: "#map {
|
2017-10-04 06:04:01 +08:00
|
|
|
width: 100vw;
|
|
|
|
height: 100%;
|
|
|
|
}"
|
2016-10-07 22:45:02 +08:00
|
|
|
---
|
|
|
|
<script type='text/javascript'>
|
|
|
|
|
|
|
|
var bounds = [[0,0], [1570,1910]];
|
|
|
|
|
|
|
|
var map = L.map('map', {
|
|
|
|
crs: L.CRS.Simple,
|
|
|
|
maxZoom: 0,
|
|
|
|
minZoom: -4,
|
|
|
|
maxBounds: bounds
|
|
|
|
});
|
|
|
|
|
|
|
|
var image = L.imageOverlay('class-diagram.png', bounds).addTo(map);
|
|
|
|
|
|
|
|
map.fitBounds(bounds);
|
|
|
|
|
|
|
|
</script>
|