Custom Fields
Re-Envisioned
Support Meta Box Geolocation Open Street Maps: auto populate address fields not working

  • Creator
    Topic
  • #30415
    Greg
    Participant

    According to the documentation: "To auto populate data to the field. Just set that field’s ID same as one of address component above. For example, you create a number field with ID postal_code. The postal code type will auto populate to that field if exists."

    I have created fields with IDs "city", "state", "postcode", "country", and they do not populate. I also tried adding the custom setting "binding" : "city" etc, and it still does not work.

    Latitude and longitude auto populate, but no other fields do.

    These are the generated settings:
    https://pastebin.com/yhy6qxvP

    Screenshot showing the interface after selecting a location:
    https://www.dropbox.com/s/xqn8t7ayefplpf8/Metabox%20OSM.png?dl=0

    There are no errors in the console.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #30421
    Long Nguyen
    Moderator

    Hi,

    I see the fields are populated the data as well, screen record https://www.loom.com/share/78fd8488ad0249dab6aaea0bafe9c960

    It is possible that there are some countries, states ... are not available in the OSM data.

    #30437
    Greg
    Participant

    Are you saying your plugin will not fill addresses in the United States?

    #30438
    Greg
    Participant

    I mean, all the address info is there in the object OSM provides, so MB just isn't using it.

    Object { place_id: 143376007, licence: "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright", osm_type: "way", … }
    place_id    143376007
    licence "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright"
    osm_type    "way"
    osm_id  215966189
    boundingbox [ "42.6041", "42.6042479", "-72.7367349", "-72.7364429" ]
    0   "42.6041"
    1   "42.6042479"
    2   "-72.7367349"
    3   "-72.7364429"
    lat "42.604174"
    lon "-72.73658889612594"
    display_name    "5, Mechanic Street, Shelburne Falls, Shelburne, Franklin County, Massachusetts, 01370, United States"
    class   "building"
    type    "yes"
    importance  0.731
    address Object { house_number: "5", road: "Mechanic Street", village: "Shelburne Falls", … }
    house_number    "5"
    road    "Mechanic Street"
    village "Shelburne Falls"
    town    "Shelburne"
    county  "Franklin County"
    state   "Massachusetts"
    postcode    "01370"
    country "United States"
    country_code    "us"
    #30444
    Long Nguyen
    Moderator

    Hi,

    Please take a look at my screen record https://www.loom.com/share/a9594dff8bda4678b4747da7c0612cbd

    I'm not sure why there are some addresses in the autocomplete box that cannot populate the field city or do not have the data of city and other fields. I will inform the development team to check this issue and get back to you later.

    #30453
    Greg
    Participant

    I know it doesn't work. That's why I created this post. It is a bug. The necessary data is provided by OSM, even in Massachusetts, USA, as you can see in the code I pasted.

    #30729

    Hi,
    I had a bit of trouble getting started. The documentation (perhaps not being English speaking) being a bit confusing.
    Auto populate didn't work for me either. While watching the video, I changed my card settings (French and European zoen) to English and USA and it works. If I put French and Belgium it works.

    Curiously French and European Union does not work.

    that for the return. It seems that the European Union zone is not working.

    Now if I have to (want) to make a world map? Is it possible ? (like displaying beautiful beaches worldwide) In English suddenly or French would work?

    Bruno

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.