Skip to content

Commit acbbb88

Browse files
committed
print update
1 parent 9474652 commit acbbb88

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

js/print.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,10 @@ L.geoJSON(india_outline, {
6767

6868
$('.leaflet-container').css('cursor', 'crosshair'); // from https://stackoverflow.com/a/28724847/4355695 Changing mouse cursor to crosshairs
6969

70-
L.control.scale({ metric: true, imperial: false }).addTo(map);
71-
var myRenderer = L.canvas({ padding: 0.5 });
72-
7370
var overlays = {
7471
"shape": shapeLayer,
7572
};
76-
var layerControl = L.control.layers(baseLayers, overlays, { collapsed: true, autoZIndex: false }).addTo(map);
73+
var layerControl = L.control.layers(baseLayers, overlays, { position: 'topleft' }).addTo(map);
7774
shapeLayer.addTo(map);
7875

7976
function tiles_loading() {
@@ -100,7 +97,7 @@ map.on('baselayerchange', function (event) {
10097

10198
// from https://github.com/gabriel-russo/Leaflet.BetterFileLayer?tab=readme-ov-file
10299
var bfl_options = {
103-
position: 'topright', // Leaflet control position
100+
position: 'topleft', // Leaflet control position
104101
fileSizeLimit: 102400, // File size limit in kb (default: 1024 kb)
105102
style: () => {
106103
// console.log('hello');
@@ -124,6 +121,8 @@ var bfl_options = {
124121
}
125122
L.Control.betterFileLayer(bfl_options).addTo(map);
126123

124+
L.control.scale({ metric: true, imperial: false, position:'topleft' }).addTo(map);
125+
127126
map.on("bfl:layerloaded", (ev) => {
128127
// console.log("Your file was read successfully!! Event: ", ev);
129128
let color = $(`#color`).val();

print.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
/* no print. from https://stackoverflow.com/questions/355313/how-do-i-hide-an-element-when-printing-a-web-page#356123 */
5656
@media print
5757
{
58-
.no-print, .no-print *, .leaflet-control-zoom-in, .leaflet-control-zoom-out, .leaflet-control-attribution, #topMenu, .collapse, .leaflet-control-layers
58+
.no-print, .no-print *, .leaflet-control-zoom-in, .leaflet-control-zoom-out, #topMenu, .collapse, .leaflet-control-layers
5959
{
6060
display: none !important;
6161
}

0 commit comments

Comments
 (0)