@sapui5/sap.ui.vbm 1.130.0 → 1.131.0
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/package.json +1 -1
- package/src/sap/ui/vbm/.library +1 -1
- package/src/sap/ui/vbm/Adapter.js +53 -2
- package/src/sap/ui/vbm/Adapter3D.js +1 -1
- package/src/sap/ui/vbm/VBI.js +43 -36
- package/src/sap/ui/vbm/VBIRenderer.js +7 -1
- package/src/sap/ui/vbm/Viewport.js +1 -1
- package/src/sap/ui/vbm/adapter3d/ColladaBounds.js +1 -1
- package/src/sap/ui/vbm/adapter3d/DragDropHandler.js +1 -1
- package/src/sap/ui/vbm/adapter3d/ModelHandler.js +1 -1
- package/src/sap/ui/vbm/adapter3d/ObjectFactory.js +1 -1
- package/src/sap/ui/vbm/adapter3d/PolygonHandler.js +1 -1
- package/src/sap/ui/vbm/adapter3d/RectangleTracker.js +1 -1
- package/src/sap/ui/vbm/adapter3d/SceneBuilder.js +1 -1
- package/src/sap/ui/vbm/adapter3d/VBIJSONParser.js +1 -1
- package/src/sap/ui/vbm/library.js +2 -2
- package/src/sap/ui/vbm/themes/base/img/Pin_images.json +33 -1
- package/src/sap/ui/vbm/vector/MapRenderer.js +872 -0
- package/src/sap/ui/vbm/vector/PayloadGenerator.js +130 -0
- package/src/sap/ui/vbm/vector/VBITransformer.js +897 -0
- package/src/sap/ui/vbm/vector/VectorUtils.js +146 -0
- package/src/sap/ui/vbm/vector/thirdparty/MaplibreStyles.js +723 -0
- package/src/sap/ui/vbm/vector/thirdparty/maplibre.css +682 -0
- package/src/sap/ui/vbm/vector/thirdparty/maplibregl.js +37950 -0
package/package.json
CHANGED
package/src/sap/ui/vbm/.library
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<name>sap.ui.vbm</name>
|
|
4
4
|
<vendor>SAP SE</vendor>
|
|
5
5
|
<copyright>SAP UI development toolkit for HTML5 (SAPUI5) (c) Copyright 2009-2012 SAP AG. All rights reserved</copyright>
|
|
6
|
-
<version>1.
|
|
6
|
+
<version>1.131.0</version>
|
|
7
7
|
|
|
8
8
|
<documentation>SAP UI library: sap.ui.vbm</documentation>
|
|
9
9
|
|
|
@@ -7,7 +7,9 @@ sap.ui.define([
|
|
|
7
7
|
"sap/ui/core/Element",
|
|
8
8
|
"jquery.sap.global",
|
|
9
9
|
"sap/base/Log",
|
|
10
|
-
"./library"
|
|
10
|
+
"./library",
|
|
11
|
+
"./vector/VBITransformer",
|
|
12
|
+
"./vector/MapRenderer",
|
|
11
13
|
], function(Element, jQuery, Log, library) {
|
|
12
14
|
"use strict";
|
|
13
15
|
|
|
@@ -22,7 +24,7 @@ sap.ui.define([
|
|
|
22
24
|
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
23
25
|
* @param {object} [mSettings] initial settings for the new object
|
|
24
26
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
27
|
+
* @version 1.131.0
|
|
26
28
|
* @extends sap.ui.core.Element
|
|
27
29
|
* @constructor
|
|
28
30
|
* @public
|
|
@@ -251,6 +253,47 @@ sap.ui.define([
|
|
|
251
253
|
return this;
|
|
252
254
|
};
|
|
253
255
|
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* Processes the MapProviders section of the VBI JSON
|
|
259
|
+
*
|
|
260
|
+
* @param {object} MapProviders and Scenes section of VBI JSON. <br/>
|
|
261
|
+
* @returns {bool} True if map type is vector, false otherwise
|
|
262
|
+
* @private
|
|
263
|
+
*/
|
|
264
|
+
|
|
265
|
+
Adapter.prototype._verifyMapType = function(obj) {
|
|
266
|
+
var currRefMap = "DEFAULT";
|
|
267
|
+
if (obj?.SAPVB?.Scenes?.Set) {
|
|
268
|
+
if (obj?.SAPVB?.Scenes?.Set?.SceneGeo?.refMapLayerStack) {
|
|
269
|
+
currRefMap = obj.SAPVB.Scenes.Set.SceneGeo.refMapLayerStack;
|
|
270
|
+
}
|
|
271
|
+
if (obj?.SAPVB?.MapProviders?.Set?.MapProvider) {
|
|
272
|
+
let MapProviders = obj.SAPVB.MapProviders.Set.MapProvider;
|
|
273
|
+
if (Array.isArray(MapProviders)) {
|
|
274
|
+
for (const MapProvider in MapProviders) {
|
|
275
|
+
if (MapProviders.hasOwnProperty(MapProvider)) {
|
|
276
|
+
let Provider = MapProviders[MapProvider];
|
|
277
|
+
if (Provider.name == currRefMap && Provider.type == "vector") {
|
|
278
|
+
return true;
|
|
279
|
+
} else if (Provider.name == currRefMap && (Provider.type == "raster" || Provider.type == "")) {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
} else if (MapProviders.name == currRefMap && MapProviders.type == "vector") {
|
|
285
|
+
return true;
|
|
286
|
+
} else if (MapProviders.name == currRefMap && (MapProviders.type == "raster" || MapProviders.type == "")) {
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
} else if (obj?.SAPVB?.Scenes?.Merge) {
|
|
291
|
+
// Verify map type when map layer stack is switched
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
|
|
254
297
|
/**
|
|
255
298
|
* Parses and process sections of the VBI JSON and loads them into JSON Model bound to the GeoMap
|
|
256
299
|
*
|
|
@@ -280,6 +323,13 @@ sap.ui.define([
|
|
|
280
323
|
Log.debug("invalid object supplied for load", "", thisModule);
|
|
281
324
|
return this;
|
|
282
325
|
}
|
|
326
|
+
// Verifying the map type vector or raster
|
|
327
|
+
if (this._verifyMapType(obj)) {
|
|
328
|
+
VBI.VBITransformer.parseVBI(obj); // exit for vector processing
|
|
329
|
+
}
|
|
330
|
+
if (VBI.VBITransformer.getVectorFlag() == true) {
|
|
331
|
+
VBI.VBITransformer.parseVBI(obj); // exit for vector processing for subsequent loads - No data to distinguish
|
|
332
|
+
}
|
|
283
333
|
if (obj.SAPVB.Config) {
|
|
284
334
|
this._processConfiguration(obj.SAPVB.Config);
|
|
285
335
|
}
|
|
@@ -294,6 +344,7 @@ sap.ui.define([
|
|
|
294
344
|
this._processClusters(obj.SAPVB.Clustering);
|
|
295
345
|
}
|
|
296
346
|
|
|
347
|
+
VBI.MapRenderer.setAdapter(this);
|
|
297
348
|
return (obj.SAPVB.MapProviders ? this._processMapProviders(obj.SAPVB.MapProviders)
|
|
298
349
|
: Promise.resolve()).then(function() {
|
|
299
350
|
if (obj.SAPVB.MapLayerStacks) {
|
|
@@ -47,7 +47,7 @@ sap.ui.define([
|
|
|
47
47
|
* @param {string} [sId] id for the new control, generated automatically if no id is given
|
|
48
48
|
* @param {object} [mSettings] initial settings for the new object
|
|
49
49
|
* @author SAP SE
|
|
50
|
-
* @version 1.
|
|
50
|
+
* @version 1.131.0
|
|
51
51
|
* @extends sap.ui.core.Element
|
|
52
52
|
* @constructor
|
|
53
53
|
* @public
|
package/src/sap/ui/vbm/VBI.js
CHANGED
|
@@ -40,8 +40,10 @@ sap.ui.define([
|
|
|
40
40
|
"./lib/sapconfig",
|
|
41
41
|
"./lib/saplassotrack",
|
|
42
42
|
"./lib/saprecttrack",
|
|
43
|
-
"./lib/sapheatmap"
|
|
44
|
-
|
|
43
|
+
"./lib/sapheatmap",
|
|
44
|
+
"./vector/VBITransformer",
|
|
45
|
+
"./vector/MapRenderer",
|
|
46
|
+
], function(Control, RenderManager, jQuery, Log, library, VBIRenderer,VBITransformer) {
|
|
45
47
|
"use strict";
|
|
46
48
|
|
|
47
49
|
var thisModule = "sap.ui.vbm.VBI";
|
|
@@ -1010,48 +1012,53 @@ sap.ui.define([
|
|
|
1010
1012
|
|
|
1011
1013
|
VBI1.prototype.onAfterRendering = function() {
|
|
1012
1014
|
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1015
|
+
if (VBI.VBITransformer.getVectorFlag() == false) {
|
|
1016
|
+
// when there is preserved content restore it.............................//
|
|
1017
|
+
if (this.$oldContent.length > 0) {
|
|
1018
|
+
// insert preserved control DOM content
|
|
1019
|
+
this.$().append(this.$oldContent);
|
|
1020
|
+
}
|
|
1018
1021
|
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1022
|
+
// process the load queue.................................................//
|
|
1023
|
+
if (this.m_aLoadQueue) {
|
|
1024
|
+
var nJ;
|
|
1025
|
+
for (nJ = 0; nJ < this.m_aLoadQueue.length; ++nJ) {
|
|
1026
|
+
this.load(this.m_aLoadQueue[nJ]);
|
|
1027
|
+
}
|
|
1028
|
+
this.m_aLoadQueue = null;
|
|
1024
1029
|
}
|
|
1025
|
-
this.m_aLoadQueue = null;
|
|
1026
|
-
}
|
|
1027
1030
|
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1031
|
+
if (this.resizeID == "" && this.mVBIContext.GetMainScene()) {
|
|
1032
|
+
this.resize();
|
|
1033
|
+
this.resizeID = sap.ui.core.ResizeHandler.register(this, this.resize);
|
|
1034
|
+
}
|
|
1032
1035
|
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1036
|
+
// do a new adjust of DOM placed elements.................................//
|
|
1037
|
+
// the function should do nothing if nothing needs to be done.............//
|
|
1038
|
+
var l_vbiId = this.getId();
|
|
1039
|
+
if (this.mVBIContext.m_Windows) {
|
|
1040
|
+
this.mVBIContext.m_Windows.Awake(l_vbiId);
|
|
1041
|
+
}
|
|
1039
1042
|
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1043
|
+
// move elements from hidden area to there final location
|
|
1044
|
+
var aElems = jQuery(this.getDomRef()).children(".vbi-hidden").children();
|
|
1045
|
+
for (var i = 0, oEntry; i < aElems.length; ++i) {
|
|
1046
|
+
oEntry = aElems[i];
|
|
1047
|
+
// Note: We cannot use a jQuery selector, since it fails with the artifical ID for cluster objects
|
|
1048
|
+
// jQuery("#" + oEntry.attributes.getNamedItem("data").nodeValue).append(oEntry.firstChild);
|
|
1049
|
+
var oDomref = document.getElementById(oEntry.attributes.getNamedItem("data").nodeValue);
|
|
1050
|
+
if (oDomref) {
|
|
1051
|
+
if (oEntry.firstChild) {
|
|
1052
|
+
oDomref.appendChild(oEntry.firstChild);
|
|
1053
|
+
}
|
|
1054
|
+
oEntry.parentNode.removeChild(oEntry);
|
|
1050
1055
|
}
|
|
1051
|
-
oEntry.parentNode.removeChild(oEntry);
|
|
1052
|
-
}
|
|
1053
1056
|
|
|
1057
|
+
}
|
|
1058
|
+
} else {
|
|
1059
|
+
VBI.MapRenderer.renderMap();
|
|
1054
1060
|
}
|
|
1061
|
+
|
|
1055
1062
|
};
|
|
1056
1063
|
|
|
1057
1064
|
VBI1.prototype.onBeforeRendering = function() {
|
|
@@ -13,6 +13,7 @@ sap.ui.define(function() {
|
|
|
13
13
|
apiVersion: 2 // Semantic Rendering
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
+
VBIRenderer.oControlId = "";
|
|
16
17
|
/**
|
|
17
18
|
* Renders the HTML for the given control, using the provided {@link sap.ui.core.RenderManager}.
|
|
18
19
|
*
|
|
@@ -48,7 +49,8 @@ sap.ui.define(function() {
|
|
|
48
49
|
oRm.openEnd();
|
|
49
50
|
|
|
50
51
|
var id = oControl.getId();
|
|
51
|
-
|
|
52
|
+
VBIRenderer.oControlId = id;
|
|
53
|
+
|
|
52
54
|
if (oControl.getPlugin()) {
|
|
53
55
|
|
|
54
56
|
if (oControl.$oldContent.length === 0) {
|
|
@@ -110,6 +112,10 @@ sap.ui.define(function() {
|
|
|
110
112
|
}
|
|
111
113
|
};
|
|
112
114
|
|
|
115
|
+
VBIRenderer.getId = function() {
|
|
116
|
+
return VBIRenderer.oControlId;
|
|
117
|
+
}
|
|
118
|
+
|
|
113
119
|
return VBIRenderer;
|
|
114
120
|
|
|
115
121
|
}, /* bExport= */true);
|
|
@@ -22,7 +22,7 @@ sap.ui.define([
|
|
|
22
22
|
*
|
|
23
23
|
* @private
|
|
24
24
|
* @author SAP SE
|
|
25
|
-
* @version 1.
|
|
25
|
+
* @version 1.131.0
|
|
26
26
|
* @alias sap.ui.vbm.adapter3d.ColladaBounds
|
|
27
27
|
*/
|
|
28
28
|
var ColladaBounds = BaseObject.extend("sap.ui.vbm.adapter3d.ColladaBounds", /** @lends sap.ui.vbm.adapter3d.ColladaBounds.prototype */ {
|
|
@@ -83,7 +83,7 @@ sap.ui.define([
|
|
|
83
83
|
*
|
|
84
84
|
* @private
|
|
85
85
|
* @author SAP SE
|
|
86
|
-
* @version 1.
|
|
86
|
+
* @version 1.131.0
|
|
87
87
|
* @alias sap.ui.vbm.adapter3d.DragDropHandler
|
|
88
88
|
*/
|
|
89
89
|
var DragDropHandler = BaseObject.extend("sap.ui.vbm.adapter3d.DragDropHandler", /** @lends sap.ui.vbm.adapter3d.DragDropHandler.prototype */ {
|
|
@@ -29,7 +29,7 @@ sap.ui.define([
|
|
|
29
29
|
*
|
|
30
30
|
* @private
|
|
31
31
|
* @author SAP SE
|
|
32
|
-
* @version 1.
|
|
32
|
+
* @version 1.131.0
|
|
33
33
|
* @alias sap.ui.vbm.adapter3d.ModelHandler
|
|
34
34
|
*/
|
|
35
35
|
var ModelHandler = BaseObject.extend("sap.ui.vbm.adapter3d.ModelHandler", /** @lends sap.ui.vbm.adapter3d.ModelHandler.prototype */ {
|
|
@@ -377,7 +377,7 @@ sap.ui.define([
|
|
|
377
377
|
*
|
|
378
378
|
* @private
|
|
379
379
|
* @author SAP SE
|
|
380
|
-
* @version 1.
|
|
380
|
+
* @version 1.131.0
|
|
381
381
|
* @alias sap.ui.vbm.adapter3d.ObjectFactory
|
|
382
382
|
*/
|
|
383
383
|
var ObjectFactory = BaseObject.extend("sap.ui.vbm.adapter3d.ObjectFactory", /** @lends sap.ui.vbm.adapter3d.ObjectFactory.prototype */ {});
|
|
@@ -32,7 +32,7 @@ sap.ui.define([
|
|
|
32
32
|
*
|
|
33
33
|
* @private
|
|
34
34
|
* @author SAP SE
|
|
35
|
-
* @version 1.
|
|
35
|
+
* @version 1.131.0
|
|
36
36
|
* @alias sap.ui.vbm.adapter3d.PolygonHandler
|
|
37
37
|
*/
|
|
38
38
|
var PolygonHandler = BaseObject.extend("sap.ui.vbm.adapter3d.PolygonHandler", /** @lends sap.ui.vbm.adapter3d.PolygonHandler.prototype */ {
|
|
@@ -39,7 +39,7 @@ sap.ui.define([
|
|
|
39
39
|
*
|
|
40
40
|
* @private
|
|
41
41
|
* @author SAP SE
|
|
42
|
-
* @version 1.
|
|
42
|
+
* @version 1.131.0
|
|
43
43
|
* @alias sap.ui.vbm.adapter3d.RectangleTracker
|
|
44
44
|
*/
|
|
45
45
|
var RectangleTracker = BaseObject.extend("sap.ui.vbm.adapter3d.RectangleTracker", /** @lends sap.ui.vbm.adapter3d.RectangleTracker.prototype */ {
|
|
@@ -47,7 +47,7 @@ sap.ui.define([
|
|
|
47
47
|
*
|
|
48
48
|
* @private
|
|
49
49
|
* @author SAP SE
|
|
50
|
-
* @version 1.
|
|
50
|
+
* @version 1.131.0
|
|
51
51
|
* @alias sap.ui.vbm.adapter3d.SceneBuilder
|
|
52
52
|
*/
|
|
53
53
|
var SceneBuilder = BaseObject.extend("sap.ui.vbm.adapter3d.SceneBuilder", /** @lends sap.ui.vbm.adapter3d.SceneBuilder.prototype */ {
|
|
@@ -56,7 +56,7 @@ sap.ui.define([
|
|
|
56
56
|
*
|
|
57
57
|
* @private
|
|
58
58
|
* @author SAP SE
|
|
59
|
-
* @version 1.
|
|
59
|
+
* @version 1.131.0
|
|
60
60
|
* @alias sap.ui.vbm.adapter3d.VBIJSONParser
|
|
61
61
|
*/
|
|
62
62
|
var VBIJSONParser = BaseObject.extend("sap.ui.vbm.adapter3d.VBIJSONParser", /** @lends sap.ui.vbm.adapter3d.VBIJSONParser.prototype */ {
|
|
@@ -20,7 +20,7 @@ sap.ui.define([
|
|
|
20
20
|
* @namespace
|
|
21
21
|
* @alias sap.ui.vbm
|
|
22
22
|
* @author SAP SE
|
|
23
|
-
* @version 1.
|
|
23
|
+
* @version 1.131.0
|
|
24
24
|
* @public
|
|
25
25
|
*/
|
|
26
26
|
|
|
@@ -45,7 +45,7 @@ sap.ui.define([
|
|
|
45
45
|
"sap.ui.vbm.ClusterBase", "sap.ui.vbm.ClusterTree", "sap.ui.vbm.ClusterGrid", "sap.ui.vbm.ClusterDistance", "sap.ui.vbm.Heatmap",
|
|
46
46
|
"sap.ui.vbm.HeatPoint", "sap.ui.vbm.ClusterContainer", "sap.ui.vbm.Adapter", "sap.ui.vbm.Adapter3D"
|
|
47
47
|
],
|
|
48
|
-
version: "1.
|
|
48
|
+
version: "1.131.0"
|
|
49
49
|
});
|
|
50
50
|
|
|
51
51
|
sap.ui.loader.config({
|