123456789101112131415161718192021222324252627282930313233343536 |
- #include "area.h"
- #include "card_base.h"
- #include "tool_time.h"
- #include "area_business_post_area.h"
- /*
- 确定推送人员信息时的区域,每一个明确需要推送的区域,都要推送
- */
- //将推送区域信息加入人员数据
- void area_business_post_area::on_load_his(const std::shared_ptr<area_hover>&a,const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr)
- {
- on_enter(a,c,ptr);
- }
- void area_business_post_area::on_enter(const std::shared_ptr<area_hover>&a,
- const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data>&ptr)
- {
- log_info("post_area: type:0, cardid:%d, area_id:%d, scale:%.2f", c->m_id, a->id(), a->scale());
- c->set_area_info(a->mapid(),a->scale(),a->id(),a->m_enter_time,0);
- }
- void area_business_post_area::on_hover(const std::shared_ptr<area_hover>&a,
- const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr)
- {
- log_info("post_area: type:1, cardid:%d, area_id:%d, scale:%.2f", c->m_id, a->id(), a->scale());
- c->set_area_info(a->mapid(),a->scale(),a->id(),a->m_enter_time,1);
- }
- //从人员数据中清除区域信息
- void area_business_post_area::on_leave(const std::shared_ptr<area_hover>&a,
- const std::shared_ptr<card_location_base>&c,std::shared_ptr<business_data> ptr)
- {
- log_info("post_area: type:2, cardid:%d, area_id:%d, scale:%.2f", c->m_id, a->id(), a->scale());
- c->set_area_info(0,0,a->id(),0,2);
- }
|