| | |
| | | |
| | | // 分割区域id集合并根据id查询区域然后画框 |
| | | for _,result := range results { |
| | | polygonIds := strings.Split(result.AlarmPolygon,"") |
| | | polygonIds := strings.Split(result.AlarmPolygon,",") |
| | | logger.Info("-----------------------看看报警区域id:",polygonIds) |
| | | for i := 0; i < len(polygonIds)-1; i++ { |
| | | polygon := getPolygonById(polygonIds[i],cameraId) |
| | | if polygon.Polygon != "" { |
| | | if polygon.Polygon != "[]" { |
| | | DrawAPolygon(&rook,polygon.Polygon,red) |
| | | } |
| | | } |
| | |
| | | var cameraPolygons []protomsg.CameraPolygon |
| | | cameraPolygons = cache.GetPolygonsByCameraId(cameraId) |
| | | for _, polygon := range cameraPolygons { |
| | | logger.Info("看看缓存中查出的区域和传进来的",polygon.Id,polygonId) |
| | | if polygon.Id == polygonId { |
| | | return polygon |
| | | } |