pj-map-core
v1.0.31
Published
品杰科技地图组件
Downloads
16
Readme
项目说明
此包为四川品杰科技公司的地图核心插件 天气插件需要将public目录下的weather.html和weather-bg.png放到地图页面同级下
打包时需要排除pj-map-lib库,该库只能通过script标签引入,否则无法安装扩展地图 排除方法,修改vue.config.js文件,在导出的根下面增加如下内容
configureWebpack: {
externals: {
"pj-map-lib": "pjMapLib"
},
},
内置支持的插件注册说明
主地图
插件名称:map
支持方法:
- changeMap(name:string) 修改地图提供程序, 其中name可以通过mapManager.getAllMaps()获取
右侧抽屉开关
插件名称:Drawer
支持方法:
- show() 显示抽屉开关
- hide() 隐藏抽屉开关
画图工具
插件名称:DrawTool
支持方法:
- show() 显示画图工具
- hide() 隐藏画图工具
导航工具
插件名称:NavigationControl
支持方法:
- show() 显示导航工具
- hide() 隐藏导航工具
返回初始位置
插件名称:TakeMeHome
支持方法:
- goHome() 返回初始位置
实时交通信息
插件名称:TrafficTool
支持方法:
- show() 显示实时交通信息
- hide() 隐藏实时交通信息
实时天气
插件名称:Weather
支持方法:
- show() 显示实时天气
- hide() 隐藏实时天气
- changeToken(token) 修改天气使用的token,详见 seniverse.com/widgetv3