Bliska Paczka Widget

v1.0

Allows user to pick Bliska Paczka point of service on interactive map with several extra features.

See demo page.

Installation

In order to install Bliska Paczka Widget on your web page include following code snippets in head section of your html document:

Script:

<script type="text/javascript" src="http://widget.bliskapaczka.pl/v1.0/main.js"></script>

Stylesheet:

<link rel="stylesheet" href="http://widget.bliskapaczka.pl/v1.0/main.css" />

Bliska Paczka Widget will be available through global variable BPWidget.

BPWidget object exposes one method:

 init(element: HTMLElement, options?: BPWidgetOptionsObject): void

Widget will be displayed in given html element. Element has to have width and height defined.

Widget options are optional.

Example of usage

<div id="bpWidget" style="height: 800px; width: 1024px;"></div>
BPWidget.init(
    document.getElementById('bpWidget'),
    {
        callback: function(posCode, posOperator) {
            console.log('BPWidget callback:', posCode, posOperator)
        },
        posType: 'DELIVERY'
    }
);

Options

posType (string) [optional]:
Filter displayed points by scope.
Options: 'DELIVERY', 'POSTING'.

callback (function(string, string)) [optional]:
Callback function executed when user pick point on the widget. It is invoked with point code and point operator as arguments.

selectedOperator (string) [optional]:
Operator that will be available as the only one. Cannot be used with disabledOperators option.
Options: 'RUCH', 'INPOST', 'POCZTA'.

disabledOperators (string[]) [optional]:
Operators that will be disabled. Cannot be used with selectedOperator option.
Options: 'RUCH', 'INPOST', 'POCZTA'.

userDataQuery (string) [optional]:
User address that will be available for search with special button.