/*
* 运营监管
 */
import {
    fullExtent, clearMap, calculation, changeMap, setCamera, layerQuery, addGraphic
} from '@/utils/map/ArcgisUtil'
import {setCenter} from "@/utils/map/Common";

export function locationUnit(data,isShow){
    if(isShow){
        let param = {
            title: data.name,
            type: 'point',
            data:[data.mapx,data.mapy,20],
            edit: false,
            temp: false,
            clear: false,
            goto: true,
            attributes: null,
            symbol:{
                "type": "picture-marker",
                "url": "images/ssky/bgImgPort.png",
                "width":"300px",
                "height":"10px"
            }
        }
        addGraphic(param)
        layerQuery({
            title: "ghjgCxall",
            layerId: "40",
            where: "CERT_NUMBER='" + data.certNumber +"'",
            symbol: null,
            is_draw: true,
            is_clear: false,
            callback: null
        })
    }else{
        clearMap({is_draw: false, is_search:true, layers: []})
        // setCenter();
    }
}