Coder Social home page Coder Social logo

amap-wx-ts's Introduction

高德地图微信小程序 ts 版 sdk

支持功能

  1. 获取 POI 数据
  2. 获取输入提示词
  3. 获取地址描述数据
  4. 获取天气

使用

const amap = AmapWx.getInstance({ key: "key" });

amap.getWxLocation(async (loc) => {
  
  // 获取 POI 数据
  const PoiAroundRes = await amap.getPoiAround({ location: loc });

  // 获取地址描述数据
  const regeoRes = await amap.getRegeo({ location: loc });

  // 获取天气
  const weatherRes = await amap.getWeather({
    city: regeoRes.data.regeocode.addressComponent.adcode,
  });
  const cityWeather = weatherRes.data.lives[0];

});

// 获取输入提示词
const InputtipsRes = amap.getInputtips({ keywords: "keywords" });

amap-wx-ts's People

Contributors

yourenz avatar

Stargazers

Zhong LinYang avatar  avatar  avatar

Watchers

 avatar

Forkers

eiiizong nuffins

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.