Bliska Paczka Widget

v1.4

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

Stylesheet:

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

Options: 'RUCH', 'INPOST', 'POCZTA'.

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.


modules

(map<string, boolean>) [optional]

Modules that will be enabled/disabled in widget.
All enabled by default.

Options: 'search', 'list', 'filters'.

Example: {"search": true, "list": false, "filters": true}


externalSearch

(HTMLInputElement) [optional]

External input element that will be used as map search.


readyCallback

(function(): void) [optional]

Callback function executed when map loading is finished.


mapOptions

(google.maps.MapOptions) [optional]

Google map options.
See google reference for details.

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" />

Breakpoints

Bliska Paczka Widget changes its look depending of given width.
Breakpoints: 992px, 768px, 576px.

See our demo for details.

Releases