bruce-models 7.1.76 → 7.1.78
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/dist/bruce-models.es5.js +78 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +73 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/geography/hexbin.js +90 -0
- package/dist/lib/geography/hexbin.js.map +1 -0
- package/dist/lib/style/style.js.map +1 -1
- package/dist/types/bruce-models.d.ts +2 -1
- package/dist/types/geography/hexbin.d.ts +79 -0
- package/dist/types/style/style.d.ts +2 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -14558,6 +14558,78 @@
|
|
|
14558
14558
|
ExportUsd.Export = Export;
|
|
14559
14559
|
})(exports.ExportUsd || (exports.ExportUsd = {}));
|
|
14560
14560
|
|
|
14561
|
+
(function (Hexbin) {
|
|
14562
|
+
const RESOLUTIONS_CACHE_KEY = "hexbin:resolutions";
|
|
14563
|
+
function GetResolutionsCacheKey() {
|
|
14564
|
+
return RESOLUTIONS_CACHE_KEY;
|
|
14565
|
+
}
|
|
14566
|
+
Hexbin.GetResolutionsCacheKey = GetResolutionsCacheKey;
|
|
14567
|
+
function GetResolutions(params) {
|
|
14568
|
+
var _a, _b;
|
|
14569
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14570
|
+
if (!params) {
|
|
14571
|
+
params = {};
|
|
14572
|
+
}
|
|
14573
|
+
let { api, req: reqParams } = params;
|
|
14574
|
+
if (!api) {
|
|
14575
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
14576
|
+
}
|
|
14577
|
+
const cache = (_a = api.GetCacheItem) === null || _a === void 0 ? void 0 : _a.call(api, GetResolutionsCacheKey(), reqParams);
|
|
14578
|
+
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
14579
|
+
return cache.data;
|
|
14580
|
+
}
|
|
14581
|
+
const prom = api.GET("geography/hexbin/resolutions", exports.Api.PrepReqParams(reqParams));
|
|
14582
|
+
(_b = api.SetCacheItem) === null || _b === void 0 ? void 0 : _b.call(api, {
|
|
14583
|
+
key: GetResolutionsCacheKey(),
|
|
14584
|
+
value: prom,
|
|
14585
|
+
req: reqParams
|
|
14586
|
+
});
|
|
14587
|
+
return prom;
|
|
14588
|
+
});
|
|
14589
|
+
}
|
|
14590
|
+
Hexbin.GetResolutions = GetResolutions;
|
|
14591
|
+
function GenerateEntities(params) {
|
|
14592
|
+
var _a, _b, _c, _d;
|
|
14593
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14594
|
+
let { api, targetEntityTypeId, resolution, geometry, wkt, entityId, objectBase, body, req: reqParams } = params;
|
|
14595
|
+
if (!api) {
|
|
14596
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
14597
|
+
}
|
|
14598
|
+
const payload = Object.assign({}, (body !== null && body !== void 0 ? body : {}));
|
|
14599
|
+
const resolvedTargetEntityTypeId = (_b = (_a = targetEntityTypeId !== null && targetEntityTypeId !== void 0 ? targetEntityTypeId : payload.TargetEntityTypeID) !== null && _a !== void 0 ? _a : payload.EntityTypeId) !== null && _b !== void 0 ? _b : payload.Type;
|
|
14600
|
+
if (!resolvedTargetEntityTypeId) {
|
|
14601
|
+
throw new Error("Target Entity Type ID is required. Set targetEntityTypeId, body.TargetEntityTypeID, body.EntityTypeId, or body.Type.");
|
|
14602
|
+
}
|
|
14603
|
+
const resolvedResolution = resolution !== null && resolution !== void 0 ? resolution : payload.Resolution;
|
|
14604
|
+
if (resolvedResolution == null) {
|
|
14605
|
+
throw new Error("Resolution is required.");
|
|
14606
|
+
}
|
|
14607
|
+
const resolvedEntityId = (_c = entityId !== null && entityId !== void 0 ? entityId : payload.EntityID) !== null && _c !== void 0 ? _c : (_d = payload.Entity) === null || _d === void 0 ? void 0 : _d.ID;
|
|
14608
|
+
const resolvedGeometry = geometry !== null && geometry !== void 0 ? geometry : payload.Geometry;
|
|
14609
|
+
const resolvedWkt = wkt !== null && wkt !== void 0 ? wkt : payload.WKT;
|
|
14610
|
+
if (resolvedGeometry == null && resolvedWkt == null && !resolvedEntityId) {
|
|
14611
|
+
throw new Error("Specify one of geometry, wkt, entityId, body.Geometry, body.WKT, or body.EntityID.");
|
|
14612
|
+
}
|
|
14613
|
+
payload.TargetEntityTypeID = resolvedTargetEntityTypeId;
|
|
14614
|
+
payload.Resolution = resolvedResolution;
|
|
14615
|
+
if (resolvedGeometry != null) {
|
|
14616
|
+
payload.Geometry = resolvedGeometry;
|
|
14617
|
+
}
|
|
14618
|
+
if (resolvedWkt != null) {
|
|
14619
|
+
payload.WKT = resolvedWkt;
|
|
14620
|
+
}
|
|
14621
|
+
if (resolvedEntityId) {
|
|
14622
|
+
payload.EntityID = resolvedEntityId;
|
|
14623
|
+
}
|
|
14624
|
+
if (objectBase != null) {
|
|
14625
|
+
payload.ObjectBase = objectBase;
|
|
14626
|
+
}
|
|
14627
|
+
return yield api.POST("geography/hexbin/entities", payload, exports.Api.PrepReqParams(reqParams));
|
|
14628
|
+
});
|
|
14629
|
+
}
|
|
14630
|
+
Hexbin.GenerateEntities = GenerateEntities;
|
|
14631
|
+
})(exports.Hexbin || (exports.Hexbin = {}));
|
|
14632
|
+
|
|
14561
14633
|
(function (ImportAssembly) {
|
|
14562
14634
|
function Analyze(params) {
|
|
14563
14635
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -20010,7 +20082,7 @@
|
|
|
20010
20082
|
})(exports.UrlUtils || (exports.UrlUtils = {}));
|
|
20011
20083
|
|
|
20012
20084
|
// This is updated with the package.json version on build.
|
|
20013
|
-
const VERSION = "7.1.
|
|
20085
|
+
const VERSION = "7.1.78";
|
|
20014
20086
|
|
|
20015
20087
|
exports.VERSION = VERSION;
|
|
20016
20088
|
exports.AbstractApi = AbstractApi;
|