|
|
@ -2267,11 +2267,11 @@ MainMap_QM.prototype = { |
|
|
* Map_QM.showFloor(1); |
|
|
* Map_QM.showFloor(1); |
|
|
* |
|
|
* |
|
|
*/ |
|
|
*/ |
|
|
showFloor: function (fIndex = -1) { |
|
|
|
|
|
|
|
|
showFloor: function (fIndex = -1, callBack = undefined) { |
|
|
Map_QM.resetFloorState() |
|
|
Map_QM.resetFloorState() |
|
|
Map_QM.clearFloor(fIndex) |
|
|
Map_QM.clearFloor(fIndex) |
|
|
if (fIndex != -1) { |
|
|
if (fIndex != -1) { |
|
|
Map_QM.changeFloorInner(-1, fIndex) |
|
|
|
|
|
|
|
|
Map_QM.changeFloorInner(-1, fIndex, callBack) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
|
@ -2296,7 +2296,7 @@ MainMap_QM.prototype = { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
changeFloorInner: function (build = -1, fIndex = -1, endIndex = -1, midIndex = -1) { |
|
|
|
|
|
|
|
|
changeFloorInner: function (build = -1, fIndex = -1, callBack = undefined, endIndex = -1, midIndex = -1) { |
|
|
let addFloor = fIndex - Map_QM.util.deviceObj.floor > 0 ? 1 : -1 |
|
|
let addFloor = fIndex - Map_QM.util.deviceObj.floor > 0 ? 1 : -1 |
|
|
fIndex = fIndex != -1 ? fIndex : Map_QM.util.deviceObj.floor |
|
|
fIndex = fIndex != -1 ? fIndex : Map_QM.util.deviceObj.floor |
|
|
build = build != -1 ? build : Map_QM.util.deviceObj.build |
|
|
build = build != -1 ? build : Map_QM.util.deviceObj.build |
|
|
@ -2351,6 +2351,7 @@ MainMap_QM.prototype = { |
|
|
//一层
|
|
|
//一层
|
|
|
if (build == Map_QM.util.selectBuild && fIndex == Map_QM.util.selectFloor) { |
|
|
if (build == Map_QM.util.selectBuild && fIndex == Map_QM.util.selectFloor) { |
|
|
Map_QM.timeOutInit() |
|
|
Map_QM.timeOutInit() |
|
|
|
|
|
if (callBack) callBack() |
|
|
} else { |
|
|
} else { |
|
|
Map_QM.util.selectBuild = build |
|
|
Map_QM.util.selectBuild = build |
|
|
Map_QM.util.selectFloor = fIndex |
|
|
Map_QM.util.selectFloor = fIndex |
|
|
@ -2363,6 +2364,7 @@ MainMap_QM.prototype = { |
|
|
ease: Cubic.easeIn, |
|
|
ease: Cubic.easeIn, |
|
|
onComplete: function () { |
|
|
onComplete: function () { |
|
|
Map_QM.timeOutInit() |
|
|
Map_QM.timeOutInit() |
|
|
|
|
|
if (callBack) callBack() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
) |
|
|
) |
|
|
@ -2379,6 +2381,7 @@ MainMap_QM.prototype = { |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
if (build == Map_QM.util.selectBuild && fIndex == Map_QM.util.selectFloor) { |
|
|
if (build == Map_QM.util.selectBuild && fIndex == Map_QM.util.selectFloor) { |
|
|
|
|
|
if (callBack) callBack() |
|
|
Map_QM.timeOutInit() |
|
|
Map_QM.timeOutInit() |
|
|
} else { |
|
|
} else { |
|
|
Map_QM.util.selectBuild = build |
|
|
Map_QM.util.selectBuild = build |
|
|
@ -2392,6 +2395,7 @@ MainMap_QM.prototype = { |
|
|
ease: Cubic.easeIn, |
|
|
ease: Cubic.easeIn, |
|
|
onComplete: function () { |
|
|
onComplete: function () { |
|
|
Map_QM.timeOutInit() |
|
|
Map_QM.timeOutInit() |
|
|
|
|
|
if (callBack) callBack() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
) |
|
|
) |
|
|
@ -3330,14 +3334,20 @@ MainMap_QM.prototype = { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
//改变选中店铺box
|
|
|
|
|
|
setSelectShopMat: function (selObject) { |
|
|
|
|
|
TweenMax.killAll(true) |
|
|
|
|
|
if (Map_QM.selectShop) { |
|
|
|
|
|
Map_QM.selectShop.scale.z = 1 |
|
|
|
|
|
} |
|
|
|
|
|
Map_QM.parseSelectShop(selObject) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @api {方法} setSelectShopMatByName(shopNum) 设置box 选中 |
|
|
|
|
|
* @apiGroup 地图交互 |
|
|
|
|
|
* @apiDescription 地图box 选中 |
|
|
|
|
|
* @apiVersion 2.0.0 |
|
|
|
|
|
* @apiParam {String} shopNum POI编号 |
|
|
|
|
|
* |
|
|
|
|
|
* @apiSampleRequest off |
|
|
|
|
|
* |
|
|
|
|
|
* @apiParamExample {String} 请求示例 |
|
|
|
|
|
* |
|
|
|
|
|
* Map_QM.setSelectShopMatByName("L101"); |
|
|
|
|
|
* |
|
|
|
|
|
*/ |
|
|
setSelectShopMatByName: function (ipName) { |
|
|
setSelectShopMatByName: function (ipName) { |
|
|
for (let i = 0; i < Map_QM.mapArr[Map_QM.util.selectBuild].length; i++) { |
|
|
for (let i = 0; i < Map_QM.mapArr[Map_QM.util.selectBuild].length; i++) { |
|
|
let shopArr = Map_QM.mapArr[Map_QM.util.selectBuild][i].shopObj.children |
|
|
let shopArr = Map_QM.mapArr[Map_QM.util.selectBuild][i].shopObj.children |
|
|
@ -3349,6 +3359,14 @@ MainMap_QM.prototype = { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
//改变选中店铺box
|
|
|
|
|
|
setSelectShopMat: function (selObject) { |
|
|
|
|
|
TweenMax.killAll(true) |
|
|
|
|
|
if (Map_QM.selectShop) { |
|
|
|
|
|
Map_QM.selectShop.scale.z = 1 |
|
|
|
|
|
} |
|
|
|
|
|
Map_QM.parseSelectShop(selObject) |
|
|
|
|
|
}, |
|
|
/** |
|
|
/** |
|
|
* 初始化后调用 |
|
|
* 初始化后调用 |
|
|
*/ |
|
|
*/ |
|
|
@ -4385,9 +4403,9 @@ MainMap_QM.prototype = { |
|
|
|
|
|
|
|
|
if (Map_QM.util.options.overlap) { |
|
|
if (Map_QM.util.options.overlap) { |
|
|
if (Map_QM.forShopArr.length == 2) { |
|
|
if (Map_QM.forShopArr.length == 2) { |
|
|
Map_QM.changeFloorInner(-1, Map_QM.forShopArr[0].floor, Map_QM.forShopArr[1].floor) |
|
|
|
|
|
|
|
|
Map_QM.changeFloorInner(-1, Map_QM.forShopArr[0].floor, () => {}, Map_QM.forShopArr[1].floor) |
|
|
} else if (Map_QM.forShopArr.length == 3) { |
|
|
} else if (Map_QM.forShopArr.length == 3) { |
|
|
Map_QM.changeFloorInner(-1, Map_QM.forShopArr[0].floor, Map_QM.forShopArr[1].floor, Map_QM.forShopArr[2].floor) |
|
|
|
|
|
|
|
|
Map_QM.changeFloorInner(-1, Map_QM.forShopArr[0].floor, () => {}, Map_QM.forShopArr[1].floor, Map_QM.forShopArr[2].floor) |
|
|
} else { |
|
|
} else { |
|
|
Map_QM.changeFloorInner(-1, Map_QM.forShopArr[Map_QM.util._indexPathFloor].floor) |
|
|
Map_QM.changeFloorInner(-1, Map_QM.forShopArr[Map_QM.util._indexPathFloor].floor) |
|
|
} |
|
|
} |
|
|
@ -5063,7 +5081,7 @@ FloorMap_QM.prototype = { |
|
|
if (Map_QM.util.logos) { |
|
|
if (Map_QM.util.logos) { |
|
|
Map_QM.util.logos.map(item => { |
|
|
Map_QM.util.logos.map(item => { |
|
|
if (item.build == sopce.buildOrder && item.floor == sopce.floorOrder) { |
|
|
if (item.build == sopce.buildOrder && item.floor == sopce.floorOrder) { |
|
|
sopce.logoUtil.renderIcon(item, sopce, item.site) |
|
|
|
|
|
|
|
|
sopce.logoUtil.renderIcon(item, sopce, item.site || 0) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
@ -5336,7 +5354,7 @@ FloorMap_QM.prototype = { |
|
|
|
|
|
|
|
|
if (mapData.shopArea[i].logoUrl && mapData.shopArea[i].isLabel == 0) { |
|
|
if (mapData.shopArea[i].logoUrl && mapData.shopArea[i].isLabel == 0) { |
|
|
//添加logo
|
|
|
//添加logo
|
|
|
this.logoUtil.renderIcon(mapData.shopArea[i], mahc, parseInt(mapData.shopArea[i].toHeight) + parseInt(mapData.shopArea[i].site) + 1) |
|
|
|
|
|
|
|
|
this.logoUtil.renderIcon(mapData.shopArea[i], mahc, parseInt(mapData.shopArea[i].toHeight) + parseInt(mapData.shopArea[i].site || 0) + 1) |
|
|
} else { |
|
|
} else { |
|
|
//添加文字
|
|
|
//添加文字
|
|
|
let some = Map_QM.util.options.boxShop.some(item => { |
|
|
let some = Map_QM.util.options.boxShop.some(item => { |
|
|
@ -5354,7 +5372,7 @@ FloorMap_QM.prototype = { |
|
|
shopLabel.position.set( |
|
|
shopLabel.position.set( |
|
|
mapData.shopArea[i].xaxis >> 0, |
|
|
mapData.shopArea[i].xaxis >> 0, |
|
|
(-1 * mapData.shopArea[i].yaxis) >> 0, |
|
|
(-1 * mapData.shopArea[i].yaxis) >> 0, |
|
|
parseInt(mapData.shopArea[i].toHeight) + parseInt(mapData.shopArea[i].site) |
|
|
|
|
|
|
|
|
parseInt(mapData.shopArea[i].toHeight) + parseInt(mapData.shopArea[i].site || 0) |
|
|
) |
|
|
) |
|
|
shopLabel.name = mapData.shopArea[i].name |
|
|
shopLabel.name = mapData.shopArea[i].name |
|
|
this.labelObj.add(shopLabel) |
|
|
this.labelObj.add(shopLabel) |
|
|
@ -5399,7 +5417,7 @@ FloorMap_QM.prototype = { |
|
|
if (facArr[i].downState) { |
|
|
if (facArr[i].downState) { |
|
|
//上扶梯
|
|
|
//上扶梯
|
|
|
let ex = Map_QM.util.pathStateObj.elevator.clone() |
|
|
let ex = Map_QM.util.pathStateObj.elevator.clone() |
|
|
ex.position.set(facArr[i].x, -1 * facArr[i].y, facArr[i].site) |
|
|
|
|
|
|
|
|
ex.position.set(facArr[i].x, -1 * facArr[i].y, facArr[i].site || 0) |
|
|
ex.rotation.y = ((facArr[i].angle || 0) * Math.PI) / -180 |
|
|
ex.rotation.y = ((facArr[i].angle || 0) * Math.PI) / -180 |
|
|
ex.userData.type = 'icon' |
|
|
ex.userData.type = 'icon' |
|
|
ex.userData.use = '3d' |
|
|
ex.userData.use = '3d' |
|
|
@ -5416,7 +5434,7 @@ FloorMap_QM.prototype = { |
|
|
} else if (facArr[i].upState) { |
|
|
} else if (facArr[i].upState) { |
|
|
//下扶梯
|
|
|
//下扶梯
|
|
|
let ex = Map_QM.util.pathStateObj.elevatorDown.clone() |
|
|
let ex = Map_QM.util.pathStateObj.elevatorDown.clone() |
|
|
ex.position.set(facArr[i].x, -1 * facArr[i].y, facArr[i].site) |
|
|
|
|
|
|
|
|
ex.position.set(facArr[i].x, -1 * facArr[i].y, facArr[i].site || 0) |
|
|
ex.rotation.y = ((facArr[i].angle || 0) * Math.PI) / -180 |
|
|
ex.rotation.y = ((facArr[i].angle || 0) * Math.PI) / -180 |
|
|
ex.userData.type = 'icon' |
|
|
ex.userData.type = 'icon' |
|
|
ex.userData.use = '3d' |
|
|
ex.userData.use = '3d' |
|
|
@ -5439,7 +5457,7 @@ FloorMap_QM.prototype = { |
|
|
} else if (facArr[i].facCode == 'upft') { |
|
|
} else if (facArr[i].facCode == 'upft') { |
|
|
if (Map_QM.util.pathStateObj.elevator) { |
|
|
if (Map_QM.util.pathStateObj.elevator) { |
|
|
let ex = Map_QM.util.pathStateObj.elevator.clone() |
|
|
let ex = Map_QM.util.pathStateObj.elevator.clone() |
|
|
ex.position.set(facArr[i].x, -1 * facArr[i].y, facArr[i].site) |
|
|
|
|
|
|
|
|
ex.position.set(facArr[i].x, -1 * facArr[i].y, facArr[i].site || 0) |
|
|
ex.rotation.y = ((facArr[i].angle || 0) * Math.PI) / -180 |
|
|
ex.rotation.y = ((facArr[i].angle || 0) * Math.PI) / -180 |
|
|
ex.userData.type = 'icon' |
|
|
ex.userData.type = 'icon' |
|
|
ex.userData.use = '3d' |
|
|
ex.userData.use = '3d' |
|
|
@ -5460,7 +5478,7 @@ FloorMap_QM.prototype = { |
|
|
} else if (facArr[i].facCode == 'downft') { |
|
|
} else if (facArr[i].facCode == 'downft') { |
|
|
if (Map_QM.util.pathStateObj.elevatorDown) { |
|
|
if (Map_QM.util.pathStateObj.elevatorDown) { |
|
|
let ex = Map_QM.util.pathStateObj.elevatorDown.clone() |
|
|
let ex = Map_QM.util.pathStateObj.elevatorDown.clone() |
|
|
ex.position.set(facArr[i].x, -1 * facArr[i].y, facArr[i].site) |
|
|
|
|
|
|
|
|
ex.position.set(facArr[i].x, -1 * facArr[i].y, facArr[i].site || 0) |
|
|
ex.rotation.y = ((facArr[i].angle || 0) * Math.PI) / -180 |
|
|
ex.rotation.y = ((facArr[i].angle || 0) * Math.PI) / -180 |
|
|
ex.userData.type = 'icon' |
|
|
ex.userData.type = 'icon' |
|
|
ex.userData.use = '3d' |
|
|
ex.userData.use = '3d' |
|
|
@ -5481,7 +5499,7 @@ FloorMap_QM.prototype = { |
|
|
} else if (facArr[i].facCode == 'dt') { |
|
|
} else if (facArr[i].facCode == 'dt') { |
|
|
if (Map_QM.util.pathStateObj.straight) { |
|
|
if (Map_QM.util.pathStateObj.straight) { |
|
|
let stra = Map_QM.util.pathStateObj.straight.clone() |
|
|
let stra = Map_QM.util.pathStateObj.straight.clone() |
|
|
stra.position.set(facArr[i].x, -1 * facArr[i].y, facArr[i].site) |
|
|
|
|
|
|
|
|
stra.position.set(facArr[i].x, -1 * facArr[i].y, facArr[i].site || 0) |
|
|
stra.rotation.y = ((facArr[i].angle || 0) * Math.PI) / -180 |
|
|
stra.rotation.y = ((facArr[i].angle || 0) * Math.PI) / -180 |
|
|
stra.userData.type = 'icon' |
|
|
stra.userData.type = 'icon' |
|
|
stra.userData.use = '3d' |
|
|
stra.userData.use = '3d' |
|
|
@ -5542,7 +5560,7 @@ FloorMap_QM.prototype = { |
|
|
this.allObj.add(gp) |
|
|
this.allObj.add(gp) |
|
|
gp.position.x = mapData.groupArea[k].xaxis |
|
|
gp.position.x = mapData.groupArea[k].xaxis |
|
|
gp.position.y = -1 * mapData.groupArea[k].yaxis |
|
|
gp.position.y = -1 * mapData.groupArea[k].yaxis |
|
|
gp.position.z = mapData.groupArea[k].site |
|
|
|
|
|
|
|
|
gp.position.z = mapData.groupArea[k].site || 0 |
|
|
gp.scale.set(mapData.groupArea[k].scale, mapData.groupArea[k].scale, mapData.groupArea[k].scale) |
|
|
gp.scale.set(mapData.groupArea[k].scale, mapData.groupArea[k].scale, mapData.groupArea[k].scale) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -6003,7 +6021,7 @@ MyModel_QM.prototype.MyModelText = function (svgArea) { |
|
|
|
|
|
|
|
|
group.position.x = parseInt(svgArea.xaxis) |
|
|
group.position.x = parseInt(svgArea.xaxis) |
|
|
group.position.y = -1 * parseInt(svgArea.yaxis) |
|
|
group.position.y = -1 * parseInt(svgArea.yaxis) |
|
|
group.position.z = parseInt(svgArea.site) |
|
|
|
|
|
|
|
|
group.position.z = parseInt(svgArea.site || 0) |
|
|
group.rotateX((parseInt(svgArea.angleZ) * Math.PI) / 180) |
|
|
group.rotateX((parseInt(svgArea.angleZ) * Math.PI) / 180) |
|
|
group.rotateY((parseInt(svgArea.angleY) * Math.PI) / 180) |
|
|
group.rotateY((parseInt(svgArea.angleY) * Math.PI) / 180) |
|
|
group.rotateZ((parseInt(svgArea.angle) * Math.PI) / 180) |
|
|
group.rotateZ((parseInt(svgArea.angle) * Math.PI) / 180) |
|
|
|