# Installation ### 1. JS library import Importing the widget js library will make the global variable `Expedico` accessible. ```html
... ... ``` ### 2. Opening the widget window Widget window can be opened by calling the function: `Expedico.choosePickupPoint(callback, options)` - `callback` - this function is called after the a pickup point is chosen. The object of the chosen pickup point is handed over to this function. - `pickupPoint` - object of the chosen pickup point - `id` - ID of the pickup point. This ID has to be used in the api request with parcels data. - `lat` - latitude - `lon` - longitude - `options` - widget parameters - `countries` - List of country codes of countries with pickup points - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 - `carrier_ids` - list of carrier IDs whose pickup points will be displayed on the widget map: - ID: 145, name: CZ Balikovna Pickup Points, sys_name: cz_balikovna_pickup - ID: 137, name: CZ Wedo Pickup Points, sys_name: cz_wedo_pickup - ID: 153, name: PL Inpost Pickup Points, sys_name: pl_inpost_pickup - ID: 147, name: BG Speedy Pickup Points, sys_name: bg_speedy_pickup - ID: 149, name: SK SPS Pickup Points, sys_name: sk_sps_pickup - ID: 156, name: LT DPD Pickup Points, sys_name: lt_dpd_pickup - ID: 157, name: LV DPD Pickup Points, sys_name: lv_dpd_pickup - ID: 158, name: EE DPD Pickup Points, sys_name: ee_dpd_pickup - ID: 163, name: GR BoxNow, sys_name: gr_boxnow_pickup - ID: 164, name: HR BoxNow, sys_name: hr_boxnow_pickup - ID: 165, name: BG BoxNow, sys_name: bg_boxnow_pickup - ID: 166, name: CZ DPD Pickup Points, sys_name: cz_dpd_pickup - ID: 168, name: PL Post Pickup Points, sys_name: pl_post_pickup - ID: 170, name: HU Post Pickup Points, sys_name: hu_post_pickup - ID: 171, name: BG Econt Pickup Points, sys_name: bg_econt_pickup - `default_bounds` - default map location if a user does not allow geolocation - `bl: [lat, lon]` - coordinates of bottom left corner - `tr: [lat, lon]` - coordinates of top right corner - `iframe_id` - HTML id of `iframe` element on your page - this allows to insert the iframe wherever is needed on your page + the possibility to apply your own css styles on the iframe - the widget is still necessary to open with function `choosePickupPoint` ### Example 1 - displaying pickup points of CZ Wedo and BG Speedy carriers ```html ``` ### Example 2 - displaying pickup points of all carriers in Czechia and Slovakia ```html ``` ### Example 3 - displaying widget in iframe after page load ```html ```