1var mtAddressBox = { 2 // Données en mémoire 3 buffer: { 4 loadedMaps: [], 5 maps: [], 6 }, 7 8 // Initialisation du process JS 9 init: function (config) { 10 // Clique sur le bouton de détails 11 //jQuery('.mtaddressbox-item.box-'+config.uid+' .show-map').click(function(e) { 12 13 //e.preventDefault(); 14 15 // Si pas encore chargée, charge la carte 16 if (mtAddressBox.buffer.loadedMaps[config.uid] == null || mtAddressBox.buffer.loadedMaps[config.uid] == false) { 17 mtAddressBox.createMaps(config); 18 mtAddressBox.buffer.loadedMaps[config.uid] = true; 19 20 console.log("Map created"); 21 } 22 23 // Action différente en fonction site mobile ou pas 24 /*if (mtaddressbox_mobile == 0) { 25 26 // Affichage de la lightbox 27 jQuery.fancybox({ 28 type: 'inline', 29 href: '#mthidden-'+config.uid 30 }); 31 32 } else {*/ 33 34 if (jQuery(this).hasClass("shown")) { 35 jQuery("#mthidden-" + config.uid).hide(); 36 jQuery(this).removeClass("shown"); 37 jQuery(this).html("Voir la carte"); 38 } else { 39 jQuery("#mthidden-" + config.uid).show(); 40 jQuery(this).addClass("shown"); 41 jQuery(this).html("Cacher la carte"); 42 } 43 44 //} 45 46 return false; 47 48 //}); 49 }, 50 51 createMaps: function (config) { 52 jQuery("#mthidden-" + config.uid).append( 53 jQuery("<div></div>") 54 .attr("id", "map-" + config.uid) 55 .attr("style", "width: " + config.mapWidth + "px; height: " + config.mapHeight + "px;") 56 ); 57 58 var params = { 59 div: "map-" + config.uid, 60 zoom: config.zoom, 61 center: [config.lat, config.long], 62 backgroundLayers: ["plan_ville_2d"], 63 }; 64 65 var marker = { 66 position: config.marker.position, 67 size: config.marker.size, 68 //icon: config.marker.icon 69 icon: "/fileadmin/templates/commune-de-montreux.ch/img/marker_carto.png", 70 }; 71 72 mtAddressBox.buffer.maps[config.uid] = new cartoriviera.Map(params); 73 mtAddressBox.buffer.maps[config.uid].addMarker(marker); 74 }, 75};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.