finish mappoints
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
title: franciade
|
||||
image_align: left
|
||||
id: mp_fr
|
||||
long: '2.3558205'
|
||||
lat: '48.9342346'
|
||||
long: '2.3552895'
|
||||
lat: '48.932862'
|
||||
---
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
title: maisonjaune
|
||||
image_align: left
|
||||
id: mp_maisonjaune
|
||||
long: '2.287592'
|
||||
lat: '48.862725'
|
||||
long: '2.3552895'
|
||||
lat: '48.932862'
|
||||
---
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
function gestionarray() {
|
||||
// dyn_data.split();
|
||||
console.log(dyn_data.mappoints[1].id);
|
||||
$("#page").addClass(dyn_data.mappoints[1].id);
|
||||
}
|
||||
|
||||
function map() {
|
||||
var mymap = L.map('mapid').setView([48.866667, 2.333333], 14);
|
||||
|
||||
@@ -17,22 +23,14 @@ function map() {
|
||||
});
|
||||
|
||||
var greenIcon = new LeafIcon({iconUrl: 'user/themes/r2c/images/handler.svg'})
|
||||
L.marker([48.866667, 2.333333], {icon: greenIcon}).bindPopup("Coucou").addTo(mymap);
|
||||
|
||||
|
||||
// $(document).ready(function() {
|
||||
//
|
||||
// var array = []
|
||||
// console.log(array);
|
||||
//
|
||||
// var $mappoint = $('#streetmap > div:nth-child(n+2)');
|
||||
// array.push('{{module.header.id}}');
|
||||
// console.log(array);
|
||||
//
|
||||
// });
|
||||
for (var i = 0; i < dyn_data.mappoints.length; i++) {
|
||||
L.marker([dyn_data.mappoints[i].lat, dyn_data.mappoints[i].long], {icon: greenIcon}).bindPopup(dyn_data.mappoints[i].title).addTo(mymap);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
function scrollbar(){
|
||||
$(window).on("load",function(){
|
||||
$("#start > div > div").mCustomScrollbar({
|
||||
@@ -323,10 +321,10 @@ function dragcanvas() {
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
// gestionarray();
|
||||
clickhand();
|
||||
drag();
|
||||
dragcanvas();
|
||||
map();
|
||||
|
||||
// scrollbar();
|
||||
});
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
reseauxsociaux : {{ reseauxsociaux|json_encode() }}
|
||||
};
|
||||
console.log("dyn_data", dyn_data);
|
||||
|
||||
</script>
|
||||
|
||||
<!-- js assets -->
|
||||
|
||||
Reference in New Issue
Block a user