How to import Markers using Rest API

New home Forums Pro Add-on How to import Markers using Rest API

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #77371
    Enrico
    Participant

    Hello dear WP Go Maps Team,

    I’m working on a website, where I have to implement an overview map with markers for each review the client wrote. The reviews are split into 3 categories: Hotels, Restaurants and other Locations. The marker should be created once the article has been created, like with the ACF Integration. Problem is, that each category should have different icons, that’s why we bought the Pro Version in the First Place and that’s simply put not possible with the ACF Intergration, as they all have the Default Icon.
    So I thought to myself, why not do it with a REST API, shouldn’t be that hard, right? Well, no, there is just no documentation I can find on this Topic. The documentation at https://wpgmaps.com/docs/php/class-WPGMZA.RestAPI.html is just for the Basic Plugin without Custom Icons, so I searched the internet again and found something interesting here: “https://www.wpgmaps.com/forums/topic/information-documentation-on-the-rest-api/”. There it was stated that the documentation is in the /docs Folder of my Pro Installation. The question remaining is, why don’t I have a /docs Folder in my Installation?

    I simply just want to import Markers with an Custom Category (linked to custom Icon) or if not possible with an Custom Icon.

    Greets

    Enrico

    #77384
    Matthew
    Moderator

    Hi Enrico,

    Thank you for getting in touch with us, we do appreciate your time.

    The REST API was built for the purpose of our core code being able to create, edit and delete maps, markers and other features in the plugin, however was not intended to be used publically or externally. Thus importing markers via the REST API is not supported, however, we may look into it in the future.

    We do however have the Imports feature (Maps -> Advanced/Tools -> Import) which allows you to import markers into the map. We do allow you to import many different types of files, however, JSON and CSV files are the most popular.

    Should you like more information on the Imports feauture, please see our documentation here: https://docs.wpgmaps.com/tIFm-importing-files

    We are also more than happy to assist you with imports if needed.

    Kindest Regards,
    Matthew

    #77389
    Enrico
    Participant

    First of all, thank you for your answer.

    As much as I respect your answer on your Pro Add-on Page it was stated that you can “Import from URI(REST API)[…]”. How can I access this feature and if not possible, why do you advertise it publicly?

    Greets

    Enrico

    #77422
    Matthew
    Moderator

    Hi Enrico,

    Thank you for your response and time on this, it is much appreciated.

    We do apologize for the confusion this has caused, the wording should actually say: “URI, KML, CSV, JSON, GPX”. By URI, I believe it is meant to say that we allow users to import using a URL which would be a Google Sheet URL or if the URL points to a file on your server.

    So to clarify, unfortunately importing via our REST API is currently not supported as mentioned in our previous response, however, if you would like to access the REST API endpoints of our plugin, you may find them by navigating to (use your domain in the appropriate place): https://yoursite.com/wp-json/wpgmza/v1/

    I hope this answers your question?

    Kindest Regards,
    Matthew

    • This reply was modified 10 months, 3 weeks ago by Matthew.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.