Skip to content

Commit 94c7757

Browse files
committed
fix: geospatial map reverse search does not have same APi than search, and could cause some issues
1 parent e49fffc commit 94c7757

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libs/safe/src/lib/components/geospatial-map/geospatial-map.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ export class GeospatialMapComponent
6464
@Input() data?: Feature | FeatureCollection;
6565
@Input() geometry = 'Point';
6666
@Input() fields: (keyof GeoProperties)[] = [];
67-
public geoResult: GeoProperties = DEFAULT_GEOCODING;
6867

6968
public geoForm!: ReturnType<typeof this.buildGeoForm>;
7069

@@ -216,6 +215,7 @@ export class GeospatialMapComponent
216215
'drawMarker',
217216
false
218217
);
218+
this.geoForm.setValue(DEFAULT_GEOCODING);
219219
this.mapChange.emit();
220220
}
221221
});
@@ -408,12 +408,12 @@ export class GeospatialMapComponent
408408
},
409409
city: get(res, 'address.City', DEFAULT_GEOCODING.city),
410410
countryName: get(res, 'address.CntryName', DEFAULT_GEOCODING.city),
411-
countryCode: get(res, 'address.Country', DEFAULT_GEOCODING.city),
411+
countryCode: get(res, 'address.CountryCode', DEFAULT_GEOCODING.city),
412412
district: get(res, 'address.District', DEFAULT_GEOCODING.city),
413413
region: get(res, 'address.Region', DEFAULT_GEOCODING.city),
414414
street: get(res, 'address.StName', DEFAULT_GEOCODING.city),
415415
subRegion: get(res, 'address.Subregion', DEFAULT_GEOCODING.city),
416-
address: get(res, 'address.StAddr', DEFAULT_GEOCODING.city),
416+
address: get(res, 'address.Address', DEFAULT_GEOCODING.city),
417417
};
418418
this.geoForm.setValue(value, { emitEvent: false });
419419
});

0 commit comments

Comments
 (0)