We already have everything in place to simply add a map-based address field widget. So just do that.

Comments

ChristianAdamski created an issue. See original summary.

christianadamski’s picture

Version: 8.x-2.x-dev » 8.x-3.x-dev
Status: Active » Needs work
christianadamski’s picture

Status: Needs work » Needs review
StatusFileSize
new3.18 KB

WIP

socialnicheguru’s picture

Will this connect an address field to geolocation or is this a replacement for it?

chris matthews’s picture

christianadamski’s picture

No, this is really just a formatter for address. As it has to geocode for every view, this should only be used in very specific cases,

webberly’s picture

It should only do geocoder once when saving and store information

christianadamski’s picture

@webberly What you describe is happening with the sync of geolocation field and address field. This is already implemented.

This ticket is specifically not for storing address data.

webberly’s picture

@christianadamski address field only works with Google, I use geolocation/leaflet because it doesn't use Google.
I think the address/locality formatter shouldn't be dependant on data from Google only.

christianadamski’s picture

@webberly, you might want to spent a bit more time on the different elements of geolocation.

There is a process to sync an address field and a geolocation field with each other, so that Google only has to be asked once.

This issue is about a pure formatter for address.

socialnicheguru’s picture

@ChristianAdamski what is the process for syncing? I am currently using geocode, geolocation, address. Can I now only use address and geolocation?

christianadamski’s picture

@SocialNicheGuru yes. Enable the geolocation_address and then enable Address synchronisation in the field widget form settings.

Please provide feedback.

chris matthews’s picture

@ChristianAdamski, so the geofield module is not required, correct?

If so, the documentation is out-of-date.

christianadamski’s picture

Hey, I didn't write those instructions.
I guess they work too, but based on the backend focussed geocoder module workflow.

Geolocation offers a completely different frontend based workflow to sync address module field.

christianadamski’s picture

Status: Needs review » Needs work

Next steps:
- split up /modules/geolocation_address/js/geolocation-address-map-widget.js into 2 files
-- one API files
-- one file using the API for the address synchronisation
- use API in a new widget js for this issue

mowens’s picture

Saw some improvements on geocoder and it's working better.

Only remaining issue I see is that administrativeArea is not parsing the state properly. So the state dropdown will continue to be broken when using the address sync.

In this file:
/geolocation/modules/geolocation_address/src/Controller/GeocoderController.php

I had to modify the
public function reverse(Request $request) {
geocoder function to parse the administrativeArea from $address['string'] but would be better to parse a component returned from the API.

rithesh bk’s picture

Assigned: Unassigned » rithesh bk

currently working on this issue .......

rithesh bk’s picture

Assigned: rithesh bk » Unassigned
christianadamski’s picture

StatusFileSize
new3.25 KB

Non functioning WIP

christianadamski’s picture

Version: 8.x-3.x-dev » 4.x-dev
Status: Needs work » Fixed

This got added at some point to 4.x

Status: Fixed » Closed (fixed)

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