mobility-toolbox-js 2.0.0-beta.37 → 2.0.0-beta.40

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.
@@ -1 +1 @@
1
- {"version":3,"file":"MapboxLayer.d.ts","sourceRoot":"","sources":["../../../src/ol/layers/MapboxLayer.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AACH;IA2BE;;;OAGG;IACH,kBA0CC;IA/BC,cAAc;IACd;;;;;;;kBAOC;IAOC,cAAc;IACd,8BAA0D;IAiB9D,6CAEC;IAGD,yBAEC;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACL,WAAW,CAItB;CACF"}
1
+ {"version":3,"file":"MapboxLayer.d.ts","sourceRoot":"","sources":["../../../src/ol/layers/MapboxLayer.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;GAaG;AACH;IA2BE;;;OAGG;IACH,kBA+CC;IApCC,cAAc;IACd;;;;;;;kBAOC;IAYC,cAAc;IACd,8BAA0D;IAiB9D,6CAEC;IAGD,yBAEC;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACL,WAAW,CAItB;CACF"}
@@ -64,6 +64,10 @@ export default class MapboxLayer extends mixin(Layer) {
64
64
  size: [0, 0],
65
65
  };
66
66
  super.loadMbMap();
67
+ if (!this.mbMap) {
68
+ // mbMap could ne bull if the map is not in the dom yet.
69
+ return;
70
+ }
67
71
  this.mbMap.once('load', () => {
68
72
  var _a;
69
73
  this.mbMap.resize();
@@ -1 +1 @@
1
- {"version":3,"file":"RealtimeLayer.d.ts","sourceRoot":"","sources":["../../../src/ol/layers/RealtimeLayer.js"],"names":[],"mappings":";AAYA;;;;;;;;;;;;;;;;;GAiBG;AACH,qDAHgB,8BAA8B,EAC9B,sBAAsB;IAGpC;;;;;OAKG;IACH,sBA2FC;IApFC,cAAc;IACd,aAsEI;IApDQ,0BAA8C;IAI9C,mCAAuD;IAmDnE,iBAAmD;IAInD,cAAc;IACd;;;;MAIC;IAGH,4BAqBC;IANO,iBAAuB;IAgB/B;;;;OAIG;IACH,qDAYC;IAED;;;;OAIG;IACH,kCAHW,OAAO,QAiBjB;IAED;;;;OAIG;IACH,4CAuBC;IAPG,uBAAyC;IAS7C;;OAEG;IACH,0BAEC;IAED,+DAMC;IAED;;;;;OAKG;IACH,2BAaC;IAED;;;;;;OAMG;IAEH,2BAEC;IAED;;;;;OAKG;IACH,gCAKC;IAED;;;;;OAKG;IACH,gCAQC;IAED;;;;OAIG;IACH,wBAMC;IAED;;;;OAIG;IACH,gBAQC;IAED;;;OAGG;IACH,4BAiBC;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACL,aAAa,CAIxB;CACF"}
1
+ {"version":3,"file":"RealtimeLayer.d.ts","sourceRoot":"","sources":["../../../src/ol/layers/RealtimeLayer.js"],"names":[],"mappings":";AAYA;;;;;;;;;;;;;;;;;GAiBG;AACH,qDAHgB,8BAA8B,EAC9B,sBAAsB;IAGpC;;;;;OAKG;IACH,sBA2FC;IApFC,cAAc;IACd,aAsEI;IApDQ,0BAA8C;IAI9C,mCAAuD;IAmDnE,iBAAmD;IAInD,cAAc;IACd;;;;MAIC;IAGH,4BAqBC;IANO,iBAAuB;IAgB/B;;;;OAIG;IACH,qDAYC;IAED;;;;OAIG;IACH,kCAHW,OAAO,QAqBjB;IAED;;;;OAIG;IACH,4CAuBC;IAPG,uBAAyC;IAS7C;;OAEG;IACH,0BAEC;IAED,+DAMC;IAED;;;;;OAKG;IACH,2BAaC;IAED;;;;;;OAMG;IAEH,2BAEC;IAED;;;;;OAKG;IACH,gCAKC;IAED;;;;;OAKG;IACH,gCAQC;IAED;;;;OAIG;IACH,wBAMC;IAED;;;;OAIG;IACH,gBAQC;IAED;;;OAGG;IACH,4BAiBC;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACL,aAAa,CAIxB;CACF"}
@@ -141,6 +141,9 @@ class RealtimeLayer extends mixin(Layer) {
141
141
  * @overrides
142
142
  */
143
143
  renderTrajectories(noInterpolate) {
144
+ if (!this.map) {
145
+ return;
146
+ }
144
147
  const view = this.map.getView();
145
148
  super.renderTrajectories({
146
149
  size: this.map.getSize(),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "mobility-toolbox-js",
3
3
  "license": "MIT",
4
4
  "description": "Toolbox for JavaScript applications in the domains of mobility and logistics.",
5
- "version": "2.0.0-beta.37",
5
+ "version": "2.0.0-beta.40",
6
6
  "main": "index.js",
7
7
  "exports": {
8
8
  ".": "./index.js",
@@ -68,7 +68,7 @@
68
68
  "jest-websocket-mock": "2.3.0",
69
69
  "lint-staged": "12.3.3",
70
70
  "mapbox-gl": "1.13.2",
71
- "maplibre-gl": "2.1.9",
71
+ "maplibre-gl": "2.4.0",
72
72
  "mock-socket": "9.1.2",
73
73
  "next": "12.1.6",
74
74
  "next-transpile-modules": "9.0.0",
@@ -123,19 +123,13 @@
123
123
  "tsc": "tsc",
124
124
  "types:backend": "openapi-typescript https://developer.geops.io/swagger/routing.json --output types/routing.d.ts && openapi-typescript https://developer.geops.io/swagger/stops.json --output types/stops.d.ts"
125
125
  },
126
- "browserslist": {
127
- "production": [
128
- ">0.2%",
129
- "not dead",
130
- "not op_mini all"
131
- ],
132
- "development": [
133
- "last 1 chrome version",
134
- "last 1 firefox version",
135
- "last 1 safari version",
136
- "last 1 ie version"
137
- ]
138
- },
126
+ "browserslist": [
127
+ ">0.2%",
128
+ "not dead",
129
+ "not op_mini all",
130
+ "not ie <= 11",
131
+ "not android < 5"
132
+ ],
139
133
  "keywords": [
140
134
  "mobility",
141
135
  "toolbox"