ElemeFE / react-amap

基于 React 封装的高德地图组件。AMap Component Based On React.
https://elemefe.github.io/react-amap/articles/start
MIT License
1.04k stars 151 forks source link

markers的useCluster属性设置为MarkerClustererOptions时,其中renderCluserMarker属性不生效 #49

Closed zlv-thisF closed 7 years ago

zlv-thisF commented 7 years ago

What is Expected?

在Markers的useCluster属性中,试图利用MarkerClustererOptions的renderCluserMarker属性,实现自定义点聚合时候的样式; https://elemefe.github.io/react-amap/components/markers

What is actually happening?

MarkerClustererOptions中别的参数能生效,但是renderCluserMarker属性没有产生效果,使得目前无法实现 点聚合 时候的自定义样式;

zlv-thisF commented 7 years ago

看了下源码。 Markers中预设了: ClusterProps = ['gridSize', 'minClusterSize', 'maxZoom', 'averageCenter', 'styles', 'zoomOnClick'] 仅支持其中这些属性。 那我试试styles

zlv-thisF commented 7 years ago

另外, 点聚合的events也在useCluster属性中设置;

ioslh commented 7 years ago

@zlv-thisF 有疑问欢迎随时再提 issue~