map.on('pointermove', function (evt) {
var pixel5 = map.getEventPixel(evt.originalEvent);
// //console.info(pixel5)
is_pixel=pixel5;
var f= map.forEachFeatureAtPixel(pixel5,function(feature){
if(feature.get('type')){
return feature
}
});
if(isselect_feature){
var c=isselect_feature.get('color');
c.getStroke().setColor("#333")
c.getStroke().setWidth(0.5)
isselect_feature.setStyle(c)
}
if(f){
// color.getStroke().setColor("rgba(8,104,266,1)")
// //console.info(color.getStroke())
// f.style.stroke.color="rgba(7,104,266,1)"
// //console.info(f.get('RiverName'))
// var a=f.getStyle().getStroke();
// a.setColor("rgba(7,104,266,1)")
// a.setWidth(2)
// f.getStyle().getStroke().setColor("rgba(7,104,266,1)")
// f.getStyle().getStroke().setWidth(2)
// if(IsDawingPlan==1){
// return;
// }
var c=f.get('color');
c.getStroke().setColor("rgba(7,104,266,1)")//蓝色,移入地块
c.getStroke().setWidth(2)
f.setStyle(c)
for(var i=0;i<is_GetWatershedInfo.length;i++){
if(is_GetWatershedInfo[i].WatershedName==f.get('RiverName')){
if (!$("#EarlyWarningMake").hasClass('tool_item_av')) {
$("#tsplan").css({
'top':pixel5[1],
'left':pixel5[0],
'display':'block'
})
}
$(".prompt_top").html(f.get('RiverName'));
$("#tsname").html(f.get('RiverName'));
$("#yl1h").html(is_GetWatershedInfo[i].Rain_1h+'mm');
$("#yl3h").html(is_GetWatershedInfo[i].Rain_3h+'mm');
$("#yl6h").html(is_GetWatershedInfo[i].Rain_6h+'mm');
if(is_GetWatershedInfo[i].AlertContent ){
$(".prompt_item_data").eq(4).html(is_GetWatershedInfo[i].AlertContent);
}
$(".table_item").removeClass("table_item_av");
$(".table_item").eq(i).addClass("table_item_av");
}
}
if(static_moudle_index==3){
for(var i=0;i<static_GetTownRainInfo.length;i++){
if(static_GetTownRainInfo[i].Town==f.get('RiverName')){
if (!$("#EarlyWarningMake").hasClass('tool_item_av')) {
$("#tsplan").css({
'top':pixel5[1],
'left':pixel5[0],
'display':'block'
})
}
$(".prompt_top").html(f.get('RiverName'));
$("#tsname").html(f.get('RiverName'));
$("#yl1h").html(static_GetTownRainInfo[i].Rain_1h+'mm');
$("#yl3h").html(static_GetTownRainInfo[i].Rain_3h+'mm');
$("#yl6h").html(static_GetTownRainInfo[i].Rain_6h+'mm');
}
}
}
}else{
$("#tsplan").css({
'display':'none'
})
$(".table_item").removeClass("table_item_av");
$(".table_item").eq(static_GetWatershedInfo_index).addClass("table_item_av");
}
isselect_feature=f;
})