Jan wrote: ↑04 May 2023, 19:34
Hi, what exactly do you mean with inline-scripting? And what exactly security difference is between inline script and other script?
Like the error log says ... there's a problem with the csp. If I add "inline-script" as allowed (in the csp directive for script-src), then the map is shown correctly.
I guess the following script code is meant:
Code: Select all
<script>jQuery(document).ready(function() {
var mapphocaMap6453f7d50ea59 = L.map("phocaMap6453f7d50ea59", {zoomControl: false,}).setView([50.665158599494504, 12.929610965579498], 18);
new L.Control.Zoom({ zoomInTitle: 'Zoom in', zoomOutTitle: 'Zoom out' }).addTo(mapphocaMap6453f7d50ea59);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>'
}).addTo(mapphocaMap6453f7d50ea59);
var marker6453f7d50ea59m1 = L.marker([50.665158599494504, 12.929610965579498])
.addTo(mapphocaMap6453f7d50ea59);
;
marker6453f7d50ea59m1.bindPopup('<div class="pmMarkerTitle">Ladengeschäft</div><div></div>').openPopup();
var icon6453f7d50ea59m1 = new L.AwesomeMarkers.icon({
icon: "circle",
markerColor: "darkgreen",
iconColor: "#ffffff",
prefix: "fa",
spin: 0,
extraClasses: "",
})
marker6453f7d50ea59m1.setIcon(icon6453f7d50ea59m1);
mapphocaMap6453f7d50ea59.addControl(
new L.Control.Fullscreen({
position: 'topright',
title: {
'false': 'View Fullscreen',
'true': 'Exit Fullscreen'
}
})
)
L.control.locate({
position: 'topright',
strings: {
'title': 'Current Position'
},
locateOptions: {
enableHighAccuracy: true,
watch: true,
},
}).addTo(mapphocaMap6453f7d50ea59);
mapphocaMap6453f7d50ea59.addControl(new L.Control.Search({
url: 'https://nominatim.openstreetmap.org/search?format=json&q={s}',
jsonpParam: 'json_callback',
propertyName: 'display_name',
propertyLoc: ['lat','lon'],
marker: L.circleMarker([0,0],{radius:30}),
autoCollapse: true,
autoType: false,
minLength: 3,
position: 'topleft',
textErr: 'Location not found',
textCancel: 'Cancel',
textPlaceholder: 'Search',
}));
})</script>
This js code is implemented inside of the head section - but as complete script - inline (inline means inside html document). I think you could export this to an external js file.
BUT: Nevertheless the plugin code doesn't work at all. ->
https://neu.schnitzerhaeusl.de/anfahrt- ... iten0.html