bruce-models 1.0.5 → 1.0.7

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.
@@ -1646,19 +1646,16 @@ var Entity;
1646
1646
  ]
1647
1647
  };
1648
1648
  }
1649
- let url = "entities" +
1650
- // Page size and index.
1651
- `?PageSize=${filter.pageSize}&PageIndex=${filter.pageIndex}` +
1652
- // Entity type id.
1653
- (filter.entityTypeId ? `&BruceEntityType=${filter.entityTypeId}` : "") +
1654
- // Lod.
1655
- (filter.lodCategoryId ? "&LODType=" + filter.lodCategoryId : "") +
1656
- // Attribute filter.
1657
- (!requestFilter ? "" : "&Filter=" + Api.Encode(JSON.stringify(requestFilter))) +
1658
- // Order by attribute + sort order.
1659
- (!filter.orderBy ? "" : "&OrderBy=" + filter.orderBy) +
1660
- (filter.sortOrder ? `&SortOrder=${filter.sortOrder == Api.ESortOrder.Asc ? "ASC" : "DESC"}` : "");
1661
- const data = yield api.GET(url, Api.PrepReqParams(reqParams));
1649
+ const body = {
1650
+ SortOrder: filter.sortOrder == Api.ESortOrder.Asc ? "ASC" : "DESC",
1651
+ OrderBy: filter.orderBy,
1652
+ Filter: requestFilter,
1653
+ LODType: filter.lodCategoryId,
1654
+ BruceEntityType: filter.entityTypeId,
1655
+ PageIndex: filter.pageIndex,
1656
+ PageSize: filter.pageSize
1657
+ };
1658
+ const data = yield api.POST("entities", body, Api.PrepReqParams(reqParams));
1662
1659
  const entities = data.Items;
1663
1660
  for (let i = 0; i < entities.length; i++) {
1664
1661
  const entity = entities[i];
@@ -3332,6 +3329,7 @@ var EntityGlobe;
3332
3329
  const lon2 = lon1 + cellDegreeSize;
3333
3330
  const lat2 = lat1 + cellDegreeSize;
3334
3331
  const [id, cell] = getOrCreateCell(this.cells, cellDegreeSize, lon1, lon2, lat1, lat2);
3332
+ /*
3335
3333
  {
3336
3334
  const cell_bounds = { south: lat1, west: lon1, north: lat2, east: lon2 };
3337
3335
  const subcells = [];
@@ -3358,11 +3356,13 @@ var EntityGlobe;
3358
3356
  cell.Fetched = true;
3359
3357
  return;
3360
3358
  }
3359
+
3361
3360
  let [x2, y2] = max;
3362
3361
  x2 = Math.max(x2, lon2);
3363
3362
  y2 = Math.max(y2, lat2);
3364
3363
  max = [x2, y2];
3365
3364
  }
3365
+ */
3366
3366
  ids.push(id);
3367
3367
  cells.push(cell);
3368
3368
  cells[id] = cell;
@@ -3398,31 +3398,6 @@ function intersects(l, r) {
3398
3398
  const { west: wr, south: sr, north: nr, east: er } = r;
3399
3399
  return !(e <= wr || w >= er || n <= sr || s >= nr);
3400
3400
  }
3401
- function contains(l, r) {
3402
- const { west: w, south: s, north: n, east: e } = l;
3403
- const { west: wr, south: sr, north: nr, east: er } = r;
3404
- return !(er < e || wr > w || nr > n || sr < s);
3405
- }
3406
- function crop(rect, by) {
3407
- let { west: w, south: s, north: n, east: e } = rect;
3408
- const { west: wc, south: sc, north: nc, east: ec } = by;
3409
- w = Math.max(w, ec);
3410
- e = Math.min(e, wc);
3411
- s = Math.max(s, nc);
3412
- n = Math.min(n, sc);
3413
- return { west: w, south: s, north: n, east: e };
3414
- }
3415
- function intersection(l, r) {
3416
- const { west: w, south: s, north: n, east: e } = l;
3417
- const { west: wr, south: sr, north: nr, east: er } = r;
3418
- const x = Math.min(e, er) - Math.max(w, wr);
3419
- const y = Math.min(n, nr) - Math.max(s, sr);
3420
- return (x > 0 && y > 0) ? x * y : 0;
3421
- }
3422
- function area(rect) {
3423
- let { west: w, south: s, north: n, east: e } = rect;
3424
- return Math.abs((e - w) * (n - s));
3425
- }
3426
3401
  function floorValueToCellSize(size, value) {
3427
3402
  return Math.floor(value / size) * size;
3428
3403
  }
@@ -4004,11 +3979,11 @@ var ClientFile;
4004
3979
  }
4005
3980
  ClientFile.GetCacheKey = GetCacheKey;
4006
3981
  function GetUrl(api, fileId) {
4007
- return `${api.GetBaseUrl()}/file/${fileId}`;
3982
+ return `${api.GetBaseUrl()}file/${fileId}`;
4008
3983
  }
4009
3984
  ClientFile.GetUrl = GetUrl;
4010
3985
  function GetUrlWithExt(api, file) {
4011
- return `${api.GetBaseUrl()}/file/${file.ID}${file.FileExt ? file.FileExt : ""}`;
3986
+ return `${api.GetBaseUrl()}file/${file.ID}${file.FileExt ? file.FileExt : ""}`;
4012
3987
  }
4013
3988
  ClientFile.GetUrlWithExt = GetUrlWithExt;
4014
3989
  function Get(api, fileId, reqParams) {