Skip to content

Commit 51985a0

Browse files
committed
fix map reload
1 parent f6e1f5b commit 51985a0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/com/hydrologis/flutterlibs/forms/forms_widgets.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2428,7 +2428,8 @@ class GeometryWidgetState extends State<GeometryWidget> {
24282428
}
24292429

24302430
if (sWidget == null) {
2431-
sWidget = SmashMapWidget(key: ValueKey(keyStr));
2431+
sWidget = SmashMapWidget(
2432+
key: UniqueKey()); // TODO check this ValueKey(keyStr));
24322433
sWidget!.setInitParameters(
24332434
canRotate: false,
24342435
initBounds: latLngBoundsExt.toEnvelope(),
@@ -2616,9 +2617,11 @@ class GeometryWidgetState extends State<GeometryWidget> {
26162617
GeometryEditManager().stopEditing();
26172618

26182619
// reload layer geoms
2619-
await reloadLayerSource(geojsonSource!);
2620+
// await reloadLayerSource(geojsonSource!);
26202621

2621-
setState(() {});
2622+
setState(() {
2623+
sWidget = null;
2624+
});
26222625
},
26232626
),
26242627
);

0 commit comments

Comments
 (0)