Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Geowidget v5 is a locator and point selector designed by InPost.

Its key functions are:

  • Displaying a map with points of different types (e.g. parcel lockers, parcel points)

  • Providing information about these points and enabling integration with external systems of the clients

This is a widget type software. This means that all the code and processing takes place on InPost servers. External clients only attach a link to this code and specify the configuration that will be used in their systems.


Na tej stronie

Table of Contents

Production Environment


Production environment address: https://geowidget.inpost.pl

Generating access

  1. Go to the Parcel Manager website https://manager.paczkomaty.pl

  2. In the login window, enter your login and click: Login

  3. After logging in go to My Account tab

  4. In the Data tab check if all the company data is correctly filled in

Info

Remember, in order to generate access to API, both company address and invoice data have to be filled in.

5. After verification go to the new tab API

6. To generate a new access to Geowidget expand the Geowidget tab and click Generate


Test Environment

Test environment address: https://sandbox-easy-geowidget-sdk.easypack24.net

Generating access

  1. Go to the Parcel Manager website https://sandbox-manager.paczkomaty.pl

  2. In the login window, enter your login and click: Login

  3. After logging in go to My Account tab

  4. In the Data tab check if all the company data is correctly filled in

Info

Remember, in order to generate access to API, both company address and invoice data have to be filled in.

5. After verification go to the new tab API

6. To generate a new access to Geowidget expand the Geowidget tab and click Generate

Info

For a sandbox environment when using localhost, do not indicate the domain when generating the token.


Integration

Basic integration

To use the new version of the geowidget, add the following lines to the page headers.

Code Block
languagejs
<link rel="stylesheet" href="https://geowidget.inpost.pl/inpost-geowidget.css"/>
<script src='https://geowidget.inpost.pl/inpost-geowidget.js' defer></script>
<script> 
  function afterPointSelected(point) { alert('Selected point: ' + point.name); } 
</script>

And then embed the custom element in the selected place.

Code Block
languagejs
<inpost-geowidget token='token-for-geo' language='pl' config='parcelcollect'></inpost-geowidget>

The parameters are described here

Complete integration

To use the new version of the geowidget, add the following lines to the page headers.

Code Block
<link rel="stylesheet" href="https://geowidget.inpost.pl/inpost-geowidget.css"/>
<script src='https://geowidget.inpost.pl/inpost-geowidget.js' defer></script>
<script>
  document.addEventListener('onpointselect', (event) => alert(event.details.name));
</script>

And then embed the custom element in the selected place

Code Block
<inpost-geowidget onpoint="onpointselect" token='token-for-geo' language='pl' config='parcelcollect'></inpost-geowidget>

The parameters are described here

Example how to call api method

Code Block
languagejs
<inpost-geowidget id="geowidget" onpoint="handlePointSelection" token='myTokenHere' language='pl' config='parcelCollect'></inpost-geowidget>

<script>
  const geowidget = document.getElementById('geowidget');
  // Listener to Geowidget init event
  geowidget.addEventListener('inpost.geowidget.init', (event) => {
    // Reference to api object
    const api = event.detail.api;

    // Call api method. Check ApiInterface for more details.
    api.changePosition({ longitude: 20.318968, latitude: 49.731131 }, 16);
  });
</script>

Info

In website https://www.npmjs.com/package/inpost-geowidget-angular package includes simple Angular Component for Inpost Geowidget v5.

All API method is described on https://geowidget.inpost.pl/docs/interfaces/ApiInterface.html


Description of each parameter:

Parameter

Description

onpoint

The parameter takes the function / name to be performed after selecting a point on the map.

token

Parameter to pass the PUBLIC token generated in the package manager application:

language

A parameter that allows to define the default language of the widget - optional.
Available options:

language='pl'

language='en'

language='uk'

If the user has already used the new version of the geo widget - the interface will be displayed in the language he used previously. (pl, en and uk).

config

A parameter that defines which functions / types are to have the points displayed on the map (values are described in the table below).


Configuration options:

Description

Option

functions

payment_available

location_247

Type of points presented

Display collection points for prepaid orders

config='parcelCollect'

parcel_collect

(error)

(error)

Parcel Locker, ParcelPoint,

Display collection points for cash on delivery orders

config='parcelCollectPayment'

parcel_collect

(tick)

(error)

Parcel Locker, ParcelPoint

Display collection points for Weekend shipments

config='parcelCollect247'

parcel_collect

(error)

(tick)

Parcel lockers and ParcePoints available 24/7

Showing sending points

config='parcelSend'

parcel_send

(error)

(error)

Parcel Locker, ParcelPoint