/**
 * 一张图跟警报联动的右键点击事件
 * */


export default function localMapRightClickContent(lnglat, type) {
  console.log(this)
  console.log(lnglat)
  const that = this
  var info = document.createElement("div");
  info.className = "rightClick_context_menu";

  var zoomMenu0 = document.createElement("p");
  var img = document.createElement("img");
  img.src = require('../../../../assets/images/prevention/search.png');
  var span = document.createElement("span");
  span.innerHTML = '周边搜索'
  zoomMenu0.appendChild(img)
  zoomMenu0.appendChild(span)

  info.appendChild(zoomMenu0);
  zoomMenu0.onclick = () => {
    console.log("object")
    //弹出周边搜索的按钮
    that.setState({
      searchAround: {
        show: true,
        type,
        lnglat: {
          latitude: lnglat.lat,
          longitude: lnglat.lng
        }
      }
    })
  }
  return info
}
