Commit b44215d6 authored by igoshin's avatar igoshin Committed by Matija Obreza

#13466 fixed click on dot

parent d2d3d4ff
......@@ -152,21 +152,36 @@
$("#selectArea").hide();
var filterJson =${jsonFilter};
var filterJsonObj = {};
if (typeof filterJson !== 'undefined') {
filterJsonObj = JSON.parse(JSON.stringify(filterJson));
var layer;
}
var layers={};
$("body").on("click", ".saved-filter", function () {
var title = $(this).text();
var filter = $(this).attr("fil");
globalTitle = title;
var savedFilterObj=JSON.parse(filter);
$.each(savedFilterObj.crop,function(idx,cropName){
if (typeof filterJsonObj.crop == 'undefined') {
filterJsonObj.crop=[];
}
filterJsonObj.crop.push(cropName);
});
if ($(this).find("input:checkbox").is(":checked")) {
layer = L.tileLayer("{s}/explore/tile/{z}/{x}/{y}?filter=" + filter + "&title=" + title, {
layers[title] = L.tileLayer("{s}/explore/tile/{z}/{x}/{y}?filter=" + filter + "&title=" + title, {
attribution: "<a href='${props.baseUrl}'>Genesys</a>",
styleId: 22677,
subdomains: [${props.tileserverCdn}]
}).addTo(map);
} else {
map.removeLayer(layer);
map.removeLayer(layers[title]);
}
});
......@@ -221,7 +236,9 @@
point.x+=10; point.y-=10;
var ne=this.layerPointToLatLng(point);
loadDetailsTimeout=setTimeout(function() {
var filterBounds=JSON.parse(JSON.stringify(filterJson));
var filterBounds=filterJsonObj;
console.log(filterBounds)
filterBounds.latitude=[{range:[sw.lat, ne.lat]}];
filterBounds.longitude=[{range:[sw.lng, ne.lng]}];
//console.log(JSON.stringify(filterBounds));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment