Bliska Paczka Widget

v1.1

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.1/main.js"></script>

Stylesheet:

<link rel="stylesheet" href="http://widget.bliskapaczka.pl/v1.1/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.

prices (map<string, number>) [optional]:
Prices that will be shown to user for given Operator string.
Example: {"RUCH": 10.55, "INPOST": 5.55, "POCZTA":4.44}

googleMapApiKey (string) [optional]:
Google Maps API key that wil be used for displaying the map widget.

Versioning

In order to automatically follow minor releases use chosen major version in resource url, e.g.

<script type="text/javascript" src="http://widget.bliskapaczka.pl/v1/main.js"></script>
<link rel="stylesheet" href="http://widget.bliskapaczka.pl/v1/main.css" />

Releases