Skip to content

Commit 83312d6

Browse files
prushforprushfor
authored andcommitted
Update map styles with MapML specific rules to support
zoom and pan animations of tile and image layers.
1 parent b8b86e6 commit 83312d6

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

map-styles.html

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,24 @@
44
<style>
55
/* required styles copied from leaflet.css for use in web-map and related
66
custom elements */
7-
7+
/* this is required by tiles which are actually divs with multiple images in them */
8+
.leaflet-tile img {
9+
position: absolute;
10+
left: 0;
11+
top: 0;
12+
}
13+
14+
/* MapML treats images like map layers, so far as fade animation is concerned */
15+
.leaflet-fade-anim .leaflet-image-layer {
16+
will-change: opacity;
17+
}
18+
19+
.leaflet-image-layer {
20+
visibility: hidden;
21+
}
22+
.leaflet-image-loaded {
23+
visibility: inherit;
24+
}
825
.leaflet-pane,
926
.leaflet-tile,
1027
.leaflet-marker-icon,

0 commit comments

Comments
 (0)