For addresses from Switzerland and Austria, the same convention applies as for addresses from Germany: 'street - number'
However, if the address is passed via 'push to adress field' or automatically, the American format 'number - street' is used.
Responsible for this is 'geolocation-widget-googlegeocoder. js'.
The attached patch ensures that Swiss and Austrian addresses are correctly formatted, too.

Comments

piridium created an issue. See original summary.

piridium’s picture

StatusFileSize
new475 bytes
piridium’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: geolocation-addressline-2937035-1-D8.patch, failed testing. View results

piridium’s picture

StatusFileSize
new471 bytes

New patch with corrected filename in first line.

piridium’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 5: geolocation-addressline-2937035-5-D8.patch, failed testing. View results

piridium’s picture

Sorry, it seems that I am unable to create a patch which passes automated testing. Any help is appreciated.

christianadamski’s picture

@piridium, patch has to relative to project root. The usual method is to checkout the git repository and simply do a "git diff > patchfile.patch".

I plan to rework this whole addressing part in 2.x in a different way. I might commit this to v1 though. Just have to find the time.

MaskOta’s picture

I don't know if this helps you but try looking at the address module and their libraries to deal with addressing. No reason to solve these complex problems more than once

https://www.drupal.org/project/address
https://github.com/commerceguys/addressing

primsi’s picture

Component: Geolocation field » Geolocation Field / Backend
Status: Needs work » Needs review
StatusFileSize
new534 bytes

Having a more general solution would be sure nicer, but just re-rolling for now.

christianadamski’s picture

Version: 8.x-1.11 » 8.x-2.x-dev
Status: Needs review » Postponed
Parent issue: » #2958056: geolocation_address is broken

Will be fixed in 2.x

  • Primsi authored 1117ab2 on 8.x-1.x
    Issue #2937035 by piridium, Primsi: Incorrect address-line-format for CH...
christianadamski’s picture

Status: Postponed » Fixed

Committed to 1.x and fixed in 2.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.