Skip to content

Commit

Permalink
fix map reload
Browse files Browse the repository at this point in the history
  • Loading branch information
moovida committed Dec 2, 2024
1 parent f6e1f5b commit 51985a0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/com/hydrologis/flutterlibs/forms/forms_widgets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2428,7 +2428,8 @@ class GeometryWidgetState extends State<GeometryWidget> {
}

if (sWidget == null) {
sWidget = SmashMapWidget(key: ValueKey(keyStr));
sWidget = SmashMapWidget(
key: UniqueKey()); // TODO check this ValueKey(keyStr));
sWidget!.setInitParameters(
canRotate: false,
initBounds: latLngBoundsExt.toEnvelope(),
Expand Down Expand Up @@ -2616,9 +2617,11 @@ class GeometryWidgetState extends State<GeometryWidget> {
GeometryEditManager().stopEditing();

// reload layer geoms
await reloadLayerSource(geojsonSource!);
// await reloadLayerSource(geojsonSource!);

setState(() {});
setState(() {
sWidget = null;
});
},
),
);
Expand Down

0 comments on commit 51985a0

Please sign in to comment.