Git Product home page Git Product logo

Comments (8)

Junior2Ran avatar Junior2Ran commented on May 24, 2024

iconlayer的使用文档 https://mapv.baidu.com/gl/docs/IconLayer.html

from react-bmapgl.

lilicoder avatar lilicoder commented on May 24, 2024

@Junior2Ran 您这边有selectedIcon的情况吗?我看只有选中颜色,没有选中图标。您这边怎么处理的呢

from react-bmapgl.

Junior2Ran avatar Junior2Ran commented on May 24, 2024

上面使用文档里有选中的使用方法,react-bmapgl里只是把mapvgl包了一层,可以写成

<MapvglLayer 
  type="IconLayer"
  options={{
    icon: 'your url',
    enablePicked: true,
    autoSelect: true,
    onClick: e => {console.log(e)}
  }}
/>

from react-bmapgl.

lilicoder avatar lilicoder commented on May 24, 2024

嗯,IconLayer文档提供了selectedColor参数。如果要展示选中图标的话只能定义pick事件吗

from react-bmapgl.

Junior2Ran avatar Junior2Ran commented on May 24, 2024

不太明白您说的选中图标和selectColor的区别

from react-bmapgl.

lilicoder avatar lilicoder commented on May 24, 2024

icon1在click或mouseover时更换为icon2这种

from react-bmapgl.

Junior2Ran avatar Junior2Ran commented on May 24, 2024

监听mousemove事件,dataIndex不为-1时找到选中的数据,修改数据中icon的参数,layer重新setData

from react-bmapgl.

lilicoder avatar lilicoder commented on May 24, 2024

好的 谢谢

from react-bmapgl.

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.