uiwjs / react-amap

基于 React 封装的高德地图组件,帮助你轻松的接入地图到 React 项目中。
https://uiwjs.github.io/react-amap
MIT License
418 stars 69 forks source link

能不能支持海外呢?目前高德添加了lbs这个服务 #308

Closed Alex-code-max closed 1 year ago

jaywcjlove commented 1 year ago

@Alex-code-max 没有研究过,不知道如何支持

Alex-code-max commented 1 year ago

@jaywcjlove https://a.amap.com/lbs/static/pdf/%E6%B5%B7%E5%A4%96%E5%9C%B0%E5%9B%BEJS%20API%20V1.0.0.pdf 可以看下这个

jaywcjlove commented 1 year ago

@Alex-code-max 我看了仍然不知道我要做什么

var map = new AMap.Map('container', {vectorMapForeign:'style_en'});

上面 API 可以下面方式传递

const Demo = () => (
  <div style={{ width: '100%', height: '300px' }}>
    <Map
      vectorMapForeign="style_en"
    />
  </div>
);

https://github.com/uiwjs/react-amap/blob/faf15e5b86f7d5acc48c9e1cda259040f8495019/packages/map/src/useMap.tsx#L38

Alex-code-max commented 1 year ago

谢谢回复,目前导航需要针对性对接高德