/**
 * 警保联动图层的数据展示
 */
import React, { Component } from "react";
import { connect } from "dva";
import APictureData from '../APicture/APictureData';
import EventListTab from './EventListTab';
import Search from '../APicture/Search';
@connect((state) => ({
}))
export default class Police extends Component {
  constructor(props) {
    super(props);
    this.state = {
    };
  }
  componentDidMount() {
  }
  render() {
    const { searchAround } = this.props
    console.log(searchAround)
    return (
      <div>
        <EventListTab
          addPoliceMarks={(data, place) => {
            this.props.addPoliceMarks(data, place);
          }}
          _thisGIS={this.props._thisGIS}
        />
        {/* 一张图数据展示 */}
        <APictureData
          layerSatatus={this.props.layerSatatus}
          // addPictueMarks={(data, type) => {
          //   this.props.addPictueMarks(data, type);
          // }}
          // reducePictueMarks={(data, type) => {
          //   this.props.reducePictueMarks(data, type);
          // }}
        />
        {
          searchAround.show && searchAround.type == 'police' &&
          <Search
            _thisGIS={this.props._thisGIS}
            onClose={(value) => this.props.changeShowSearchView(value)}
            lnglat={searchAround.lnglat}
            // addPictueMarks={(data, type, where) => {
            //   this.props.addPictueMarks(data, type, where);
            // }}
            // reducePictueMarks={(data, type, where) => {
            //   console.log(data)
            //   this.props.reducePictueMarks(data, type, where);
            // }}
          />
        }
      </div>
    );
  }
}
