-
-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
控制多边形圆形等的内部颜色,边框颜色等,都不是响应式 #324
Comments
@indredK 我看了一下,控制颜色边框都是通过 <Polyline
options={{}}
/> |
react-amap/packages/types/src/overlay.d.ts Lines 373 to 462 in d637f3f
直接通过 props 去控制属性有点多,还没有想出好的方式处理,通过 props 处理,是使用的 地图API |
jaywcjlove
added a commit
that referenced
this issue
Aug 3, 2023
jaywcjlove
added a commit
that referenced
this issue
Aug 3, 2023
@indredK 升级到 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
<Polygon
visiable={item.enabled}
key={item.geofenceId + "Polygon"}
path={item.geometry.coordinates}
fillColor={getColor(item)}
strokeColor={getColor(item)}
extData={{ status: "ready", id: item.geofenceId }}
onClick={(e: any) => {
setID(item.geofenceId);
setcontent(item);
(winRef.current as any)?.infoWindow.open(mapRef.current.map, [
e.lnglat.getLng?.(),
e.lnglat.getLat?.(),
]);
}}
/>
必须手动去改fillColor、strokeColor才能让地图上的形状变颜色
The text was updated successfully, but these errors were encountered: