Support

Account

Home Forums General Issues Google Maps

Solved

Google Maps

  • Hi,

    I have thousands of pages, mixed between classic content, hotels data, etc…

    I’m actually working on a script that :

    1. export pages with a search query to get all hotels -> ok
    2. import these content in my custom post type hotels -> 99% ok

    My editors actually use Elementor Google maps widget, with filling location with name of the hotel.

    I need to import this to ACF.
    And I need to be able to extract country of the hotels during the import.

    So I first tried to use ACF google maps field, with filling it with the name of the hotel, as on Elementor Widget. But it doesn’t work, because Google maps ACF field is waiting for JSON data.

    So I tried to query google maps API to get JSON, and it partialy works. For some hotels, it’s ok. But for some hotels, it doesn’t find it. While on Elementor GM widget, it find it.

    If I use GM ACF field, and manually create a new post, when I add the name of this hotel, it didn’t find it at all.

    Do you have any idea to help me get rid of this issue ?

  • I think I have a start of solution.

    I was using google maps Geocoding API, instead of place API.
    with Place API I find all my hotels.

    Need now to see If I can fill my ACF maps field with returned JSON..?

  • IT WORKS, THANKS FOR LISTENING 😀

    PS : I had 1st to query PLACE API
    and then query geocode API with place_id to get some value as street_name, country, etc…

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.