V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
工单节点使用指南
• 请用平和的语言准确描述你所遇到的问题
• 厂商的技术支持和你一样也是有喜怒哀乐的普通人类,尊重是相互的
• 如果是关于 V2EX 本身的问题反馈,请使用 反馈 节点
shyx
V2EX  ›  全球工单系统

高德 api 有没有官方群, JS API AMap.Geocoder 错误代码 INVALID_USER_SCODE

  •  
  •   shyx · 130 天前 · 587 次点击
    这是一个创建于 130 天前的主题,其中的信息可能已经有所发展或是发生改变。

    地图显示正常、Marker 功能正常

    export const AmapConfig = {
      key: '****',
      version: '2.0',
      plugins: ['AMap.Geocoder', 'AMap.ElasticMarker', 'AMap.MoveAnimation'],
    };
    
    // Geocoder
    this.geocoder$.subscribe(([geocoder, AMap]) => {
      geocoder.getAddress(
        new AMap.LngLat(116.359119, 39.972121),
        function (status: any, result: any) {
          console.log({ status, result });
    
          if (status === 'complete' && result.regeocode) {
            var address = result.regeocode.formattedAddress;
            console.log({ result, address });
          } else {
            console.error('根据经纬度查询地址失败');
          }
        },
      );
    });
    
    shyx
        1
    shyx  
    OP
       130 天前
    需要密匙配合,结帖
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1078 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 18:14 · PVG 02:14 · LAX 11:14 · JFK 14:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.