| | |
| | | const outlineGJson = await getOutLine(jsonPathPre, hierarchy) |
| | | scalingJudgment.forEach(item => item.show && (item.outline = outlineGJson)) |
| | | const [longitude, latitude] = outlineGJson.features[0].properties.centroid |
| | | setCenterPosition({longitude, latitude}) |
| | | flyTo({ longitude, latitude }, 0, scalingJudgment[(hierarchy.length - 3) * (-1)].height) |
| | | } |
| | | |
| | | const userAreaPosition = computed(() => store.state.home.userAreaPosition); |
| | | const currentAreaPosition = computed(() => store.state.home.currentAreaPosition); |
| | | |
| | | const setCenterPosition = (position) => { |
| | | store.commit('setCurrentAreaPosition', position) |
| | | if (!userAreaPosition.value.longitude){ |
| | | store.commit('setUserAreaPosition', position) |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | watch( |
| | | selectedAreaCode, |
| | | async (newValue, oldValue) => { |