Skip to content

canmou/react-tmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



腾讯地图 React 组件 logo

腾讯地图 React 组件

Downloads Open in unpkg npm version

特性

  • 📚 自动加载腾讯地图SDK
  • ♻️ Typescript编写,集成腾讯地图的声明文件
  • ⚛️ 不依赖任何第三方组件
  • 📦 拆分多个包,按需使用

安装

集成所有的依赖包

npm install @canmou/react-tmap --save

npm install @canmou/react-tmap-map @canmou/react-tmap-api-loader --save

容器组件

Package Bundle size(gzip) Version/unpkg
@canmou/react-tmap 集成所有包 bundle size bundle size(gzip) npm version Open in unpkg
@canmou/react-tmap-api-loader 加载 SDK (必须) bundle size bundle size(gzip) npm version Open in unpkg
@canmou/react-tmap-map 加载地图(容器) bundle size bundle size(gzip) npm version Open in unpkg

开发

npm install
cd webisite
npm install 
npm run start

website里用于做文档实例,引入ant design,方面测试开发组件

先绑定相关的包到website目录

cd website
npm link @canmou/react-tmap-api-loader @canmou/react-tmap-map @canmou/react-tmap

地图使用的基本引入组件

<!-- api-loader package npm link -->
npm link @canmou/react-tmap-require-script @canmou/react-tmap-types

地图类型文件引入

<!-- map package npm link -->
npm link @canmou/react-tmap-types

相关链接参考

License

Licensed under the MIT License.