首页 / 浏览问题 / WebGIS / 问题详情
栅格值查询失败
4EXP 2025年05月18日
WebGIS开发系统,实现功能点击地图查询栅格值,数据返回正常,好像是和使用的查询服务类有问题(如GetGridCellValueService),我安装依赖@supermap、leaflet存在问题,例如:依赖文件代码“import {Util} from './Util';”存在问题:无法找到模块”./Uti]”的声明文件。〝d:/kg-xitong/vue- project01/node_modules/@supermap/iclient-common/commontypes/Util js"hAJf "any"类 型。ts(7016) module "d:/kg-xitong/vue-project01/node _modules/@supermap/iclient-common/ commontypes/Util" 请问查询功能无法实现,是否与此有关呢?还是存在其他问题?

1个回答

您的package.js中是否有util的版本号?如果没有,可以用install util 安装一个,然后再运行看会不会报错
1,276EXP 2025年05月19日
{

  "name": "vue-project01",

  "version": "0.0.0",

  "private": true,

  "type": "module",

  "scripts": {

    "dev": "vite",

    "build": "vite build",

    "preview": "vite preview"

  },

  "dependencies": {

    "@supermap/iclient-common": "10.0.0",      

    "@supermap/iclient-leaflet": "10.0.0",

    "@supermap/vue-iclient": "10.0.0",    

    "d3": "^7.9.0",

    "leaflet": "1.9.4",                        

    "mapbox-gl": "3.11.1",                      

    "vue": "^3.5.13",

    "vue-router": "^4.0.13"

  },

  "devDependencies": {

    "@types/leaflet": "^1.9.17",

    "@vitejs/plugin-vue": "^5.2.1",

    "sass": "^1.87.0",

    "vite": "^6.2.1",

    "vite-plugin-vue-devtools": "^7.7.2"

  }

}这是我的package.json文件的内容,我认为可能是我的依赖有冲突或者vue版本不兼容,我的@supermap依赖中每个文件都存在上述问题,说找不到文件存在,但是其实是有对应文件的。请问我应该如何解决呢?
...