1. Fabrik 3.8.1 has been released. It is mostly bug fixes and feature enhancements, but does include two new plugins (push notifications, and the sequence element). As usual we strongly recommend testing the new release on a sandbox if your application is mission critical, and always do an Akeeba backup before updating.
    Dismiss Notice

Google Map element and Geocoding Eircodes

Discussion in 'Professional Support' started by ontarget, Sep 11, 2018.

  1. ontarget

    ontarget Member

    Level: Professional
    Ireland have introduced a zip / post code system called Eircode.
    If you enter a valid eircode e.g "V93 E5F7" or "V92 Yp93" into google maps it will pick out the location. However in Fabrik the Google map element this functionality no longer works.
    I think its due to the json request as i have fixed it on a custom eircode lookup previously:
    See the following from the Google dev team who responded to my request and my post on stack overflow:
    https://stackoverflow.com/questions/48923952/eircode-not-working-in-google-distance-matrix-api

    Can you please let me know if anything can be done?
     
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    I read the pages, but what's the actual solution?

    Your Stack Exhange question is about the Places API, but we use the Geocode API in the map element.

    -- hugh
     
  3. ontarget

    ontarget Member

    Level: Professional
    Hi Hugh thanks I'm not sure where the problem lies.
    I had used the above example to illustrate how i had fixed a distance matrix lookup using google maps and eircode.
    E.g take a look at my registration page you an see a Google map with "enter Eircode" field and Geocode button:
    https://alfaonlineclaims.ie/index.php?option=com_fabrik&view=form&formid=2&Itemid=137
    Enter a valid UK postcode e.g. : LL652EZ - the lookup works
    Enter a valid Eircode e.g : V92H3F8 - there is a console message: mootools-ext.js:157 V92H3F8 not found!
    In google maps the url for the eircode lookup looks like this and is geocoded correctly:
    https://www.google.com/maps/place/K...09d0a52f13c1cf!8m2!3d52.2327073!4d-10.1176783
    I must stress that this eircode lookup used to work perfectly with the Fabrik Google Map Element.
    My stackexchange post illustrates how google seems to have changed their methods of looking up country zip codes.
    Thanks
     
  4. troester

    troester Administrator Staff Member

    Level: Community
    hmm,
    if I clear cookies and then search for
    V93 E5F7 or V93E5F7
    in maps.google.ch
    it doesn't find it.
    If I search for V93 E5F7+ire it's finding the place, saying something like "partly match"
    upload_2018-9-12_10-23-33.png

    It's the same with searching for "V93 E5F7 something", so not related to "ire"
    So it seems to be a Google issue.

    Canadien or British codes (V5X 1A9, eh10 4qa) are found directly.
     
  5. ontarget

    ontarget Member

    Level: Professional
    Ok thanks for the reply - I had to geocode using elements - eircode then works in with the google map element.
     
  6. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    OK, looking at your site, you seem to have added a "+ire" hidden element ('ireland') which adds to the address we send Google. Presumably that gives them enough context to get it right.

    -- hugh
     
  7. ontarget

    ontarget Member

    Level: Professional
    Correct - i also geocoded using the address elements as a lookup.
     
  8. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    OK. I think that's the only solution. I don't see anything we can do, this is a Google thing.

    -- hugh
     

Share This Page