MCPcopy Index your code
hub / github.com/Tencent/tlbs-map-react

github.com/Tencent/tlbs-map-react @1.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.1.1 ↗ · + Follow
59 symbols 180 edges 36 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

tlbs-map-react

基于 腾讯位置服务 JavaScript API 封装的 React 版地图组件库。

🎉 特性

  • 封装腾讯地图 API 为响应式组件,无需关心复杂的地图 API,只需要修改数据就能改变地图效果
  • 扩展性高,提供了地图和图层实例支持调用地图 api

安装

$ npm install tlbs-map-react

使用

组件库使用文档参考:https://mapapi.qq.com/web/tlbs-map-react/index.html

// 1. 引入组件
import { TMap } from 'tlbs-map-react';

export default () => {
  // 获取地图实例 mapRef.current
  const mapRef = useRef(null);

  return(
    <>

      <TMap
        ref={mapRef}
        apiKey="OB4BZ-D4W3U-B7VVO-4PJWW-6TKDJ-WPB77"
      >
      </TMap>
    </>
  );
};

参与贡献

欢迎任何愿意参与贡献的参与者。如果需要本地运行代码或参与贡献,请先阅读参与贡献

开源协议

tlbs-map-react 遵循 MIT 协议

Extension points exported contracts — how you extend this code

Window (Interface)
(no doc)
src/global.d.ts
ControlConfig (Interface)
(no doc)
src/interfaces.ts
MultiCircleProps (Interface)
(no doc)
src/MultiCircle/index.tsx
MultiLabelProps (Interface)
(no doc)
src/MultiLabel/index.tsx
InfoWindowProps (Interface)
(no doc)
src/InfoWindow/index.tsx
GridProps (Interface)
(no doc)
src/Grid/index.tsx
AreaProps (Interface)
(no doc)
src/Area/index.tsx
MultiPolygonProps (Interface)
(no doc)
src/MultiPolygon/index.tsx

Core symbols most depended-on inside this repo

getStyle
called by 10
src/utils.ts
useEventListener
called by 9
src/utils.ts
getPaths
called by 3
src/utils.ts
setStyles
called by 3
src/Area/demo.tsx
generateFile
called by 3
scripts/new-component/index.mjs
getGeometries
called by 2
src/MultiCircle/index.tsx
getGeometries
called by 2
src/MultiLabel/index.tsx
getGeometries
called by 2
src/MultiPolygon/index.tsx

Shape

Function 34
Interface 20
Enum 5

Languages

TypeScript100%

Modules by API surface

src/interfaces.ts8 symbols
src/constants.ts5 symbols
src/utils.ts4 symbols
src/TMap/index.tsx4 symbols
scripts/new-component/index.mjs4 symbols
src/MultiPolyline/index.tsx3 symbols
src/MultiPolygon/index.tsx3 symbols
src/MultiMarker/index.tsx3 symbols
src/MultiLabel/index.tsx3 symbols
src/MultiCircle/index.tsx3 symbols
scripts/new-component/templates/index.mjs3 symbols
src/InfoWindow/index.tsx2 symbols

For agents

$ claude mcp add tlbs-map-react \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact