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