Skip to content
Snippets Groups Projects
Commit 4d79383c authored by Hugo NOUTS's avatar Hugo NOUTS
Browse files

fix(structures): Impossible de rentrer des adresses sans numéro

parent 328e840f
No related branches found
No related tags found
Loading
......@@ -57,9 +57,13 @@ export class AddressAutocompleteComponent implements OnInit {
public selectedResult(hit: any): void {
const address = new Address();
address.numero = hit.properties.housenumber ? hit.properties.housenumber : null;
address.street = hit.properties.street;
address.commune = hit.properties.city;
address.coordinates = hit.geometry.coordinates;
if (hit.properties.street) {
address.street = hit.properties.street;
} else {
address.street = hit.properties.name;
}
const value = this.parseHitToAddress(hit);
// Set input value
this.searchAddress.nativeElement.value = value;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment