Code Monkey home page Code Monkey logo

Comments (4)

ioslh avatar ioslh commented on July 20, 2024 1

抱歉,这是我文档写的不够周全;我写了个 jsfiddle 示例来演示如何确定点击的 marker。

https://jsfiddle.net/h4u8mdng/12/

如果还有疑问随时欢迎回复。

from react-amap.

ioslh avatar ioslh commented on July 20, 2024

相应的文档已更新 https://elemefe.github.io/react-amap/components/markers

from react-amap.

Mantak avatar Mantak commented on July 20, 2024

厉害了我的哥,今天只是来看看有没有回应,没想到昨天就有了答案。由衷的感谢~~~

我看了一下文档,建议把“在回调里我们可以获得全部的原始数据”,改为“在回调里我们可以通过.getExtData()获得全部的原始数据”。

对于markers,我目前了解的只是一个包含了很多对象的数组,而每个对象必须包含一个position的对象属性,其他的属性,可以带入任意想要包含的信息。所有的信息都可以通过marker.getExtData()来获取。坐标还可以通过marker.getPosition()来获取

我也是刚接触amap。 现在我了解了marker有两个方法getPosition getExtData。 如果能有个文档,把marker以及其他对象的方法都列出来就完美了

from react-amap.

ioslh avatar ioslh commented on July 20, 2024

getPositiongetExtData 都是高德地图 API 创建的 Marker 实例上的方法,全部的方法在高德官方文档都比较齐全,所以我这里的文档没细写这些。

对于markers,我目前了解的只是一个包含了很多对象的数组,而每个对象必须包含一个position的对象属性,其他的属性,可以带入任意想要包含的信息。所有的信息都可以通过marker.getExtData()来获取。坐标还可以通过marker.getPosition()来获取

你的理解没错,是这样的。你的描述比较容易理解,我再斟酌一下文档的语言描述,谢谢你。

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.