Pargo Logo

Pargo Points Map Implementation

Implementation Guidelines
  • Your page can implement the Pargo Points page via an iFrame or by opening a new window.
  • The Pargo Points page URL is the following: https://map.pargo.co.za/?token=uvwNZGSiUypW1GHiTGFZiqWWu2W4s78SwUIEWp10GKogqJKt
  • An additional GET or POST argument called 'address' can be passed through, containing an address string.
    Example: https://map.pargo.co.za/?token=uvwNZGSiUypW1GHiTGFZiqWWu2W4s78SwUIEWp10GKogqJKt&address=2 Rembrand Street, Sandton, Johannesburg
    If an address request parameter is received, the Pargo page's map will open up centered on this address (if the address string can be reverse geolocated). If no address request parameter is received, the map will attempt to retrieve the user's current location and center the map there.
  • Your page must contain a javascript listener, which waits for a response returned from the Pargo page.
  • Your page must also contain a javascript method called 'selectPargoPoint(item)' which is called by the Pargo Points page when a user selects a particular point.
  • An example:

    function selectPargoPoint(item) {
        alert("Selected Pargo Point: " + item.data["pargoPointCode"]);
    }

  • Note that there are limits to the usage of the token in use in these examples and you should request a client-specific map token from Pargo Integration for your map usage.
Optional: Enable Event When Map is Ready
  • We have introduced an optional query parameter that triggers an extra event when the map is fully loaded:
    emit_extra_events=true
  • Appending this parameter to the map URL will trigger a map.ready event:
    https://map.pargo.co.za/?
    token=uvwNZGSiUypW1GHiTGFZiqWWu2W4s78SwUIEWp10GKogqJKt &emit_extra_events=true
  • Example of how to listen for this event:

    window.addEventListener("message", function(event) {
        if (event.data.type === "map.ready") {
            console.log("Pargo map is ready!");
        }
    }, false);