fix easyPrint icon, printing still broken

print broken due to browser security violation (see https://github.com/rowanwins/leaflet-easyPrint/issues/82)
This commit is contained in:
Kasper D. Fischer 2020-07-16 11:20:52 +02:00
parent 26adc34322
commit 9bc8c1dc21
5 changed files with 18 additions and 16 deletions

View File

@ -1,20 +1,16 @@
.leaflet-control-easyPrint a {
background:#fff url(print.png) no-repeat 5px;
.leaflet-control-easyPrint-button a {
background:#fff url(external/easyPrint/print.png) no-repeat 5px;
background-size:16px 16px;
display: block;
}
@media print {
//@media print {
html {padding: 0px!important;}
.leaflet-control-easyPrint-button{display: none!important;}
}
#map {
//#map {
width: 1200;
height: 800;
}

View File

@ -13,7 +13,6 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/css/jquery.tablesorter.pager.min.css" integrity="sha512-TWYBryfpFn3IugX13ZCIYHNK3/2sZk3dyXMKp3chZL+0wRuwFr1hDqZR9Qd5SONzn+Lja10hercP2Xjuzz5O3g==" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet-dvf/0.3.1/css/dvf.min.css" integrity="sha512-Ts/IYE5D8PaMBUDHcf6O57lOiV923cai3sEXo0WjhakpTxlwodQQJx1YA2t1mDUKO6fIXEngkKFLQNMXK/kBZg==" crossorigin="anonymous" />
<link type="text/css" rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.css"/>
<link rel="stylesheet" href="external/easyPrint/easyPrint.css"/>
<!-- jQuery & jQueryUI -->

View File

@ -13,7 +13,6 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.tablesorter/2.31.3/css/jquery.tablesorter.pager.min.css" integrity="sha512-TWYBryfpFn3IugX13ZCIYHNK3/2sZk3dyXMKp3chZL+0wRuwFr1hDqZR9Qd5SONzn+Lja10hercP2Xjuzz5O3g==" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.6.0/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin="anonymous" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet-dvf/0.3.1/css/dvf.min.css" integrity="sha512-Ts/IYE5D8PaMBUDHcf6O57lOiV923cai3sEXo0WjhakpTxlwodQQJx1YA2t1mDUKO6fIXEngkKFLQNMXK/kBZg==" crossorigin="anonymous" />
<link type="text/css" rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.css"/>
<link rel="stylesheet" href="external/easyPrint/easyPrint.css"/>
<!-- jQuery & jQueryUI -->

View File

@ -206,5 +206,9 @@ $(document).ready(function() {
});
// print icon
L.easyPrint().addTo(map);
L.easyPrint({
title: 'print map',
position: 'topright',
sizeModes: ['Current', 'A4Portrait', 'A4Landscape'],
}).addTo(map);
});

View File

@ -206,5 +206,9 @@ $(document).ready(function() {
});
// print icon
L.easyPrint().addTo(map);
L.easyPrint({
title: 'print map',
position: 'topright',
sizeModes: ['Current', 'A4Portrait', 'A4Landscape'],
}).addTo(map);
});