proximiio-js-library 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- package/lib/components/map/main.d.ts +15 -0
- package/lib/components/map/main.js +17 -0
- package/lib/proximiio.js +1 -1
- package/package.json +61 -61
package/README.md
CHANGED
|
@@ -233,6 +233,18 @@ map.getMapReadyListener().subscribe(ready => {
|
|
|
233
233
|
});
|
|
234
234
|
```
|
|
235
235
|
|
|
236
|
+
#### Set different bounding box padding
|
|
237
|
+
This method will set padding for zooming into bounding box of found route
|
|
238
|
+
```
|
|
239
|
+
const map = new Proximiio.Map({
|
|
240
|
+
fitBoundsPadding: 200
|
|
241
|
+
});
|
|
242
|
+
map.getMapReadyListener().subscribe(ready => {
|
|
243
|
+
console.log('map ready', ready);
|
|
244
|
+
map.setBoundsPadding(50);
|
|
245
|
+
});
|
|
246
|
+
```
|
|
247
|
+
|
|
236
248
|
##### Find Route
|
|
237
249
|
|
|
238
250
|
###### by features id
|
|
@@ -504,6 +504,21 @@ export declare class Map {
|
|
|
504
504
|
* });
|
|
505
505
|
*/
|
|
506
506
|
setKiosk(lat: number, lng: number, level: number): void;
|
|
507
|
+
/**
|
|
508
|
+
* This method will set padding for zooming into bounding box of found route
|
|
509
|
+
* @memberof Map
|
|
510
|
+
* @name setBoundsPadding
|
|
511
|
+
* @param padding {number | PaddingOptions} the amount of padding in pixels to add to the given bounds for found route, https://docs.mapbox.com/mapbox-gl-js/api/properties/#paddingoptions
|
|
512
|
+
* @example
|
|
513
|
+
* const map = new Proximiio.Map({
|
|
514
|
+
* fitBoundsPadding: 200
|
|
515
|
+
* });
|
|
516
|
+
* map.getMapReadyListener().subscribe(ready => {
|
|
517
|
+
* console.log('map ready', ready);
|
|
518
|
+
* map.setBoundsPadding(50);
|
|
519
|
+
* });
|
|
520
|
+
*/
|
|
521
|
+
setBoundsPadding(padding: number | PaddingOptions): void;
|
|
507
522
|
/**
|
|
508
523
|
* You'll be able to show features only for defined amenity id on map with this method, also with defining the category (NOTE: you have to create them before with setAmenitiesCategory() method), filtering will be set only for defined array of amenities in the category. With category set, only one amenity filter can be active at the time, while without the category they stack so multiple amenities can be active.
|
|
509
524
|
* @memberof Map
|
|
@@ -1749,6 +1749,23 @@ var Map = /** @class */ (function () {
|
|
|
1749
1749
|
throw new Error("Map is not initiated as kiosk");
|
|
1750
1750
|
}
|
|
1751
1751
|
};
|
|
1752
|
+
/**
|
|
1753
|
+
* This method will set padding for zooming into bounding box of found route
|
|
1754
|
+
* @memberof Map
|
|
1755
|
+
* @name setBoundsPadding
|
|
1756
|
+
* @param padding {number | PaddingOptions} the amount of padding in pixels to add to the given bounds for found route, https://docs.mapbox.com/mapbox-gl-js/api/properties/#paddingoptions
|
|
1757
|
+
* @example
|
|
1758
|
+
* const map = new Proximiio.Map({
|
|
1759
|
+
* fitBoundsPadding: 200
|
|
1760
|
+
* });
|
|
1761
|
+
* map.getMapReadyListener().subscribe(ready => {
|
|
1762
|
+
* console.log('map ready', ready);
|
|
1763
|
+
* map.setBoundsPadding(50);
|
|
1764
|
+
* });
|
|
1765
|
+
*/
|
|
1766
|
+
Map.prototype.setBoundsPadding = function (padding) {
|
|
1767
|
+
this.defaultOptions.fitBoundsPadding = padding;
|
|
1768
|
+
};
|
|
1752
1769
|
/**
|
|
1753
1770
|
* You'll be able to show features only for defined amenity id on map with this method, also with defining the category (NOTE: you have to create them before with setAmenitiesCategory() method), filtering will be set only for defined array of amenities in the category. With category set, only one amenity filter can be active at the time, while without the category they stack so multiple amenities can be active.
|
|
1754
1771
|
* @memberof Map
|