...
 
Commits (3)
......@@ -41,7 +41,7 @@ var mapObj = {
},
init: function (pInit = null) {
mylog.log("mapObj.init", pInit);
//mylog.log("mapObj.init", pInit);
//Init variable
var copyMap = null;
if (pInit != null &&
......@@ -55,7 +55,7 @@ var mapObj = {
},
initVar: function (pInit = null) {
mylog.log("mapObj.initVar", pInit);
//mylog.log("mapObj.initVar", pInit);
//Init variable
this.parentContainer = ((pInit != null && typeof pInit.container != "undefined") ? pInit.container : "mapContainer");
//this.container = ( (pInit != null && typeof pInit.container != "undefined") ? pInit.container : this.parentContainer+"Map" );
......@@ -108,7 +108,7 @@ var mapObj = {
},
initView: function (pInit) {
mylog.log("mapObj.initView", pInit);
//mylog.log("mapObj.initView", pInit);
var str = "";
str += "<div class='mapLoading'></div>"
this.mapOpt.btnHide = ((pInit != null && typeof pInit.btnHide != "undefined") ? pInit.btnHide : false);
......@@ -215,7 +215,7 @@ var mapObj = {
},
setTile: function (tile) {
mylog.log("mapObj.setTile", this.map);
//mylog.log("mapObj.setTile", this.map);
if (typeof tile != "undefined" && tile == "mapbox" && $('script[src="https://api.mapbox.com/mapbox.js/v2.4.0/mapbox.js"]').length) {
//MAPBOX
......@@ -649,7 +649,7 @@ var mapObj = {
this.markerList[marker].on('dragend', fct);
},
centerOne: function (mObj, lat, lon) {
mylog.log("mapObj.centerOne", lat, lon);
//mylog.log("mapObj.centerOne", lat, lon);
//alert("oui");
//mObj.map.setZoom(14);
if (notNull(mObj.filtres.timeoutAddCity))
......@@ -661,14 +661,14 @@ var mapObj = {
// moveLat = "0.003" ;
// moveLon = "0.003" ;
// }
mylog.log("mapObj.centerOne after setTimeout ", moveLat, parseFloat(moveLat), moveLon, parseFloat(moveLon));
mylog.log("mapObj.centerOne before lat lon", lat, lon);
//mylog.log("mapObj.centerOne after setTimeout ", moveLat, parseFloat(moveLat), moveLon, parseFloat(moveLon));
//mylog.log("mapObj.centerOne before lat lon", lat, lon);
lat = parseFloat(lat) + parseFloat(moveLat);
lon = parseFloat(lon) + parseFloat(moveLon);
// lat = lat + moveLat ;
// lon = lon + moveLon ;
var center = [lat, lon];
mylog.log("mapObj.centerOne after parseFloat", center);
//mylog.log("mapObj.centerOne after parseFloat", center);
//mObj.map.panTo(center);
mObj.map.setView(center, 18);
......@@ -676,15 +676,15 @@ var mapObj = {
},
actions: {
bindMap: function (mObj) {
mylog.log("mapObj.actions.bindMap", mObj.parentContainer);
//mylog.log("mapObj.actions.bindMap", mObj.parentContainer);
//alert(mObj.parentContainer);
$("#"+mObj.parentContainer + "#input_name_filter" + mObj.parentContainer).keyup(function () {
mylog.log("mapObj.actions.bindMap #input_name_filter" + mObj.parentContainer);
//mylog.log("mapObj.actions.bindMap #input_name_filter" + mObj.parentContainer);
//alert("here");
if (notNull(mObj.filtres.timeoutAddCity))
clearTimeout(mObj.filtres.timeoutAddCity);
mObj.filtres.timeoutAddCity = setTimeout(function () {
mylog.log("mapObj.mObj input_name_filter" + mObj.parentContainer);
//mylog.log("mapObj.mObj input_name_filter" + mObj.parentContainer);
mObj.filtres.search = $("#input_name_filter" + mObj.parentContainer).val();
mObj.clearMap();
mObj.addElts(mObj.data);
......@@ -701,7 +701,7 @@ var mapObj = {
});
$("#"+mObj.parentContainer + "#item_panel_map_all" + mObj.parentContainer).off().click(function () {
mylog.log("mapObj.actions.bindMap #item_panel_map_all" + mObj.parentContainer);
//mylog.log("mapObj.actions.bindMap #item_panel_map_all" + mObj.parentContainer);
mObj.filtres.tagsActived = [];
$(".item_panel_map").removeClass("active");
$("#item_panel_map_all" + mObj.parentContainer).addClass("active");
......@@ -710,12 +710,12 @@ var mapObj = {
});
$("#"+mObj.parentContainer + ".btn-hide-map").off().click(function () {
mylog.log("mapObj.actions.bindMap .btn-hide-map");
//mylog.log("mapObj.actions.bindMap .btn-hide-map");
showMap(false);
});
$("#"+mObj.parentContainer + " #btn-close-menuRight").off().click(function () {
mylog.log("mapObj.actions.bindMap #btn-close-menuRight !! ", $(this).data("close"), mObj);
//mylog.log("mapObj.actions.bindMap #btn-close-menuRight !! ", $(this).data("close"), mObj);
if($(this).data("close") == false){
$("#menuRight"+ mObj.parentContainer).hide();
......@@ -815,11 +815,11 @@ var mapCustom = {
},
popup: {
default: function (data, mObj) {
mylog.log("mapObj.mapCustom.popup.default", data);
//mylog.log("mapObj.mapCustom.popup.default", data);
var id = (typeof data.id != "undefined") ? data.id : data._id.$id;
var imgProfil = mapCustom.custom.getThumbProfil(data);
mylog.log("mObj imgProfil", imgProfil);
//mylog.log("mObj imgProfil", imgProfil);
var eltName = (typeof data.title != "undefined") ? data.title : data.name;
var popup = "";
popup += "<div class='padding-5' id='popup" + id + "'>";
......