首页 / 浏览问题 / WebGIS / 问题详情
vue2中使用SuperMap iClient for Leaflet组件
1EXP 2022年10月16日

使用 import VueiClient from '@supermap/iclient-leaflet'

使用import * as VueiClient from '@supermap/iclient-leaflet'

识别不了地图组件

1个回答

您好,

文档:

https://iclient.supermap.io/web/introduction/leafletDevelop.html

全模块引用或部分模块引用都可以,

如果使用部分引用的方法,在花括弧{}里写需要引用的模块

import L from 'leaflet';
import {TiledMapLayer} from '@supermap/iclient-leaflet';

全部引用

import L from 'leaflet';
import '@supermap/iclient-leaflet';

vue leaflet的引用您可以参考这两篇博客,

https://www.codenong.com/cs106554411/

https://blog.csdn.net/tccxy01/article/details/123503149

希望可以帮助到您。

9,623EXP 2022年10月17日
...