I have a little problem with the markers on an OSM board. When I activate a marker on the map, it does not appear, if I remove it, the map is displayed.
In my javascript console I have an unexpected EOF on a line:
Code: Select all
markerPlgPM1m3.bindPopup('<div style="width: 30px;height: 30px;">
Code: Select all
jQuery(document).ready(function() {
var mapphocaMapPlgPM1 = L.map("phocaMapPlgPM1", {scrollWheelZoom: false,}).setView([46.603354, 1.8883335], 6);
L.tileLayer('https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png', {
maxZoom: 20,
attribution: '© <a href="https://www.openstreetmap.fr" target="_blank">Openstreetmap France</a> & <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a>'
}).addTo(mapphocaMapPlgPM1);
var markerPlgPM1m3 = L.marker([46.9280709983179, 3.29032290855661]).addTo(mapphocaMapPlgPM1);
markerPlgPM1m3.bindPopup('<div style="width: 30px;height: 30px;">
<div style="font-size:120%;margin: 5px 0px;font-weight:bold;">58160</div>
<div>
</div>
</div>').openPopup();
var iconPlgPM1m3 = new L.AwesomeMarkers.icon({
icon: "circle",
markerColor: "blue",
iconColor: "#ffffff",
prefix: "glyphicon",
spin: 0,
extraClasses: "",
})
markerPlgPM1m3.setIcon(iconPlgPM1m3);
mapphocaMapPlgPM1.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(mapphocaMapPlgPM1);
mapphocaMapPlgPM1.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',
}));
mapphocaMapPlgPM1.addControl(
new L.easyPrint({
hideControlContainer: true,
sizeModes: ['Current', 'A4Portrait', 'A4Landscape'],
position: 'topleft',
exportOnly: true
})
);
})
JCEMediaBox.init({popup:{width:"",height:"",legacy:0,lightbox:0,shadowbox:0,resize:1,icons:0,overlay:1,overlayopacity:0.8,overlaycolor:"#000000",fadespeed:500,scalespeed:500,hideobjects:0,scrolling:"fixed",close:2,labels:{'close':'Fermer','next':'Suivant','previous':'Précédent','cancel':'Annuler','numbers':'{$current} sur {$total}'},cookie_expiry:"",google_viewer:0},tooltip:{className:"tooltip",opacity:0.8,speed:150,position:"br",offsets:{x: 16, y: 16}},base:"/",imgpath:"plugins/system/jcemediabox/img",theme:"standard",themecustom:"",themepath:"plugins/system/jcemediabox/themes",mediafallback:0,mediaselector:"audio,video"});
jQuery(function($){ initTooltips(); $("body").on("subform-row-add", initTooltips); function initTooltips (event, container) { container = container || document;$(container).find(".hasTooltip").tooltip({"html": true,"container": "body"});} });
jQuery(function($){ initPopovers(); $("body").on("subform-row-add", initPopovers); function initPopovers (event, container) { $(container || document).find(".hasPopover").popover({"html": true,"trigger": "hover focus","container": "body"});} });