Skip to content

Commit

Permalink
Various minor fixes: (#820)
Browse files Browse the repository at this point in the history
- remove mapbox.css from concatenated mapml.css
- add geolocation control to index.html
- update clean-css dep of grunt cssmin plugin to version that supports
container queries
- add container query for scalebar to make it miss the upper left controls

Close #816
  • Loading branch information
prushforth committed Apr 11, 2023
1 parent 2b0342b commit 8370cac
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module.exports = function(grunt) {
},
combine: {
files: {
'dist/mapml.css': ['node_modules/leaflet/dist/leaflet.css', 'node_modules/leaflet.locatecontrol/dist/L.Control.Locate.css', 'node_modules/leaflet.locatecontrol/dist/L.Control.Locate.mapbox.css', 'src/mapml.css']
'dist/mapml.css': ['node_modules/leaflet/dist/leaflet.css', 'node_modules/leaflet.locatecontrol/dist/L.Control.Locate.css', 'src/mapml.css']
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</noscript>
</head>
<body>
<mapml-viewer projection="CBMTILE" zoom="2" lat="45" lon="-90" controls>
<mapml-viewer projection="CBMTILE" zoom="2" lat="45" lon="-90" controls controlslist="geolocation">
<map-caption>A pleasing map of Canada</map-caption>
<layer- label="CBMT" src="https://geogratis.gc.ca/mapml/en/cbmtile/cbmt/" checked></layer->
</mapml-viewer>
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions src/mapml.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,18 @@
/*
* Controls.
*/

/* Scale bar */
.leaflet-container {
container: leafletmap / size;
}
/* Scale bar */
.mapml-control-scale {
bottom: 8px; /* Make room for map-a links */
left: 45px;
left: 0px;
}
@container leafletmap (max-height: 250px) {
.mapml-control-scale {
left: 45px;
}
}

/* Generic class for seamless buttons */
Expand Down

0 comments on commit 8370cac

Please sign in to comment.