Fix map styles in "Extending Leaflet" example (#5819)

* fix map height in extending example

* add html and body styles to tutorial_frame

* move js styles to css

* remove unnecessary styles from mobile/example.md
This commit is contained in:
Andrew 2017-10-04 00:04:01 +02:00 committed by Per Liedman
parent 11cbfa8095
commit 000f457fcb
3 changed files with 12 additions and 5 deletions

View File

@ -14,6 +14,9 @@
{% unless page.customMapContainer == "true" %}
<style>
html, body {
height: 100%;
}
#map {
width: 600px;
height: 400px;

View File

@ -1,6 +1,14 @@
---
layout: tutorial_frame
title: Leaflet class diagram
css: "body {
margin: 0;
}
#map {
width: 100vw;
height: 100%;
}"
---
<script type='text/javascript'>
@ -13,10 +21,6 @@ title: Leaflet class diagram
maxBounds: bounds
});
map.getContainer().style.width = '100vw';
map.getContainer().style.height= '100%';
document.body.style.margin = 0;
var image = L.imageOverlay('class-diagram.png', bounds).addTo(map);
map.fitBounds(bounds);

View File

@ -5,7 +5,7 @@ css: "body {
padding: 0;
margin: 0;
}
html, body, #map {
#map {
height: 100%;
width: 100vw;
}"