JavaScript中定义枚举

if(typeof MapEventFlag == “undefined”){ var MapEventFlag = { DRAWPOINT: 1, DRAWLINE: 2, DWAWPOLYGON: 3 } }