UNPKG

tg-map-vue3

Version:

封装 百度地图, Google地图, Here地图(未完成), Maptalks 的Vue3组件库

106 lines (76 loc) 2.29 kB
# tg-map-vue3 封装 百度地图, Google地图, Here地图(未完成), Maptalks 的Vue3组件库 ## 使用 安装: ```sh pnpm install tg-map-vue3 ``` 使用: ```vue <template> <TgMap> </TgMap> </template> <script lang="ts" setup> import { TgMap } from 'tg-map-vue3' // 需要手动导入样式文件 import 'tg-map-vue3/dist/tg-map.css' </script> ``` ## 发布 在npm上, 登录[transcode-group](https://www.npmjs.com/~transcode-group)帐号后, 可以发布该项目的所有库 ```sh pnpm -r publish ``` ## 开发 ### 初始化仓库 ```sh # 拉取本仓库 git clone https://github.com/TranscodeGroup/tg-map.git # 进入本地仓库目录 cd tg-map # 安装依赖 pnpm install ``` 其他项目若需要引用本地开发中的tg-map, 可以根据需要链接tg-map-vue3/tg-map-core: ```sh # 使用相对路径链接tg-map-vue3包 pnpm link ../tg-map # 使用相对路径链接tg-map-core包 pnpm link ../tg-map/packages/tg-map-core ``` ### 构建 ```sh # 修改代码后要重新构建 pnpm run build ``` ## 其他 ```sh pnpm install ``` ### Compile and Hot-Reload for Development ```sh pnpm run dev ``` ### Type-Check, Compile and Minify for Production ```sh pnpm run build ``` ### Lint with [ESLint](https://eslint.org/) ```sh pnpm run lint ``` ### Customize configuration See [Vite Configuration Reference](https://vitejs.dev/config/). ## 参考文档 - [百度Javascript API v3.0][]: 老版, [类参考][baidu_ref3] - [百度Javascript API GL][]: 新的基于WebGL的实现, [类参考][baidu_ref] - [Google Maps Javascript API][]: Google地图, [类参考][google_ref] - [maptalks][]: 自绘地图, [类参考][maptalks_ref] [Google Maps Javascript API]: https://developers.google.com/maps/documentation/javascript [google_ref]: https://developers.google.com/maps/documentation/javascript/reference [百度Javascript API v3.0]: https://lbsyun.baidu.com/index.php?title=jspopular3.0 [baidu_ref3]: https://mapopen-pub-jsapi.bj.bcebos.com/jsapi/reference/jsapi_reference_3_0.html [百度Javascript API GL]: https://lbsyun.baidu.com/index.php?title=jspopularGL [baidu_ref]: https://mapopen-pub-jsapi.bj.bcebos.com/jsapi/reference/jsapi_webgl_1_0.html [maptalks]: https://maptalks.org/ [maptalks_ref]: https://maptalks.org/maptalks.js/api/1.x/Map.html