热力图农用地过滤

dianlixunjian
徐景良 2024-11-26 08:55:30 +08:00
parent 26ee0ea60b
commit 1f92a8832f
2 changed files with 10 additions and 11 deletions

View File

@ -861,9 +861,6 @@
})
//
defineExpose({
handlerChangeCounty, //

View File

@ -113,9 +113,10 @@ const polygonVisibility = ref<String>("none");
function handlerLoadPolygon(code="",filter="",type=""){
let sql_filter;
if(code){
sql_filter = "&filter=\"countyid\"=\'"+code+"\'";
sql_filter = "&filter=\"countyid\"=\'"+code+"\' and \"typename\"=\'农用地\'";
}else{
sql_filter=""
// sql_filter=""
sql_filter="\"typename\"=\'农用地\'"
}
let map_filter;
@ -250,9 +251,9 @@ const currentCode = ref("")
async function handlerDealPoint(code=""){
let sql_filter;
if(code){
sql_filter = "\"countyid\"=\'"+code+"\'";
sql_filter = "\"countyid\"=\'"+code+"\' and \"typename\"=\'农用地\'";
}else{
sql_filter=""
sql_filter="\"typename\"=\'农用地\'"
}
let points = await getPolygonCenter({tablename:"view_drone_wfyd_map",filter:sql_filter,createtime:dayjs().subtract(30, 'day').format('YYYY-MM-DD')})
@ -349,7 +350,7 @@ function handlerLoadHeatLayer(heatdata){
'id': 'heatLayer',
'type': 'heatmap',
'source': 'heatSource',
'maxzoom': 13,
'maxzoom': 15,
'minzoom':7,
'layout':{
"visibility":"visible"
@ -434,10 +435,11 @@ function handlerLoadHeatLayer(heatdata){
// ,
'heatmap-radius': [
'interpolate',['linear'],['zoom'],
9,5.5,
10,13,
9,7,
10,18,
11,20,
12,24,
14,32,
14,28,
],
'heatmap-opacity': 0.9
}