react-base-client 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -473,7 +473,7 @@ const AMapComponent = React.forwardRef<any, AMapType.Props>((props, ref) => {
|
|
|
473
473
|
const data = await res.json();
|
|
474
474
|
console.log('>>>> data: ', data);
|
|
475
475
|
if (data && data.features && data.features.length > 0) {
|
|
476
|
-
props.onWmsFeatureClick && props.onWmsFeatureClick(data.features[0]
|
|
476
|
+
props.onWmsFeatureClick && props.onWmsFeatureClick(data.features[0], data.features[0].geometry);
|
|
477
477
|
break; // 找到就退出
|
|
478
478
|
}
|
|
479
479
|
} catch (err) {
|
|
@@ -48,9 +48,9 @@ const XAMap: React.FC<XAMapProps> = (props) => {
|
|
|
48
48
|
|
|
49
49
|
const handleWmsFeatureClick = (featureProps: any, geometry: any) => {
|
|
50
50
|
console.log('>>>> aMap - handleWmsFeatureClick', geometry);
|
|
51
|
-
onChange?.(featureProps);
|
|
52
|
-
onWmsFeatureClick?.(featureProps);
|
|
53
|
-
setSelectedFeature(featureProps);
|
|
51
|
+
onChange?.(featureProps.properties);
|
|
52
|
+
onWmsFeatureClick?.(featureProps.properties);
|
|
53
|
+
setSelectedFeature(featureProps.properties);
|
|
54
54
|
setGeometry(geometry);
|
|
55
55
|
console.log('选中的WMS设备属性:', featureProps);
|
|
56
56
|
};
|