Code Monkey home page Code Monkey logo

Comments (3)

ioslh avatar ioslh commented on July 20, 2024

你好,高德地图提供了接口,可以在不同的实例中都可以调起高德地图客户端;
比如:点击地图,点击标记点,位置搜索等等;请问你需求是在什么操作后调起客户端?

以地图为例,假如需求是点击地图后调起客户端的代码示例:

const map = null;
const amapEvents = {
      created(m) {
        map = m;
      },
      click(e) {
        if (map) {
         map.poiOnAMAP({
            id: 'B000A7BD6C',
            location: e.lnglat
          })
        }
      }
};

/* JSX */
<Map zoom={8} events={amapEvents}>

上述代码中用到的poiOnAMAP方法在 Map 类的高德官方文档中有说明

另外,JavaScript API在Marker、Map、PlaceSearch、Driving、Transfer、Walking这些类中提供了调起高德地图的方法,参考这些类相应的高德文档。

希望能帮到你。

from react-amap.

tongliwei123 avatar tongliwei123 commented on July 20, 2024

from react-amap.

ioslh avatar ioslh commented on July 20, 2024

有什么疑问或者建议欢迎继续回复

from react-amap.

Related Issues (20)

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.