18045010223
2025-07-07 0d3a683a0c97154b1f2e6657398664537e4e3e82
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package org.yzh.protocol.commons;
 
/**
 * 区域类型
 * @author yezhihao
 * https://gitee.com/yezhihao/jt808-server
 */
public final class Shape {
 
    /** 圆形 */
    public static final int Circle = 1;
    /** 矩形 */
    public static final int Rectangle = 2;
    /** 多边形 */
    public static final int Polygon = 3;
    /** 路线 */
    public static final int Route = 4;
 
    /**
     * @param type 区域类型:1.圆形 2.矩形 3.多边形 4.路线
     */
    public static int toMessageId(int type) {
        switch (type) {
            case Shape.Circle:
                return JT808.删除圆形区域;
            case Shape.Rectangle:
                return JT808.删除矩形区域;
            case Shape.Polygon:
                return JT808.删除多边形区域;
            case Shape.Route:
                return JT808.删除路线;
            default:
                throw new IllegalArgumentException(String.valueOf(type));
        }
    }
}