-
作者大大,您好! 我利用VcDatasourceGeojson和kml组件加载了一些Geoserver的矢量。我在服务端加了个鉴权,对请求返回401错误码,想在前端通过errorEvent事件捕捉这个错误码进行处理,但是貌似errorEvent并未触发,直接内部报了个Get请求401未授权的错误。请问是不是我使用方式有误? <template>
<VcDatasourceGeojson :data="item" v-for="(item, index) in geojson" :key="index" @errorEvent="loadError"></VcDatasourceGeojson>
</template>
<script setup>
let geojson = reactive(["http://xxxxx/ows?xxx"])
const loadError = () => {
console.log("ERROR") // 这个ERROR并未打印出来
}
</script> 浏览器显示的错误图片如下,似乎在Cesium中抛出了错误,但并没有进行捕捉: 谢谢作者大大! |
Beta Was this translation helpful? Give feedback.
Answered by
zouyaoji
Aug 22, 2022
Replies: 1 comment 7 replies
-
这个只有你写个复现例子我测测看看了。或者你自己用 GeoJsonDataSource 试试会不会触发这儿。 |
Beta Was this translation helpful? Give feedback.
7 replies
Answer selected by
houluy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
这个只有你写个复现例子我测测看看了。或者你自己用 GeoJsonDataSource 试试会不会触发这儿。
https://github.com/CesiumGS/cesium/blob/1.96/Source/DataSources/GeoJsonDataSource.js#L967