bruce-models 4.0.3 → 4.0.4
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 +21 -6
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +21 -6
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/tileset/tileset.js +20 -5
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/tileset/tileset.d.ts +4 -0
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -8091,7 +8091,7 @@ var Tileset;
|
|
|
8091
8091
|
* @returns
|
|
8092
8092
|
*/
|
|
8093
8093
|
function GetFileUrl(params) {
|
|
8094
|
-
let { api, tilesetId, file } = params;
|
|
8094
|
+
let { api, tilesetId, file, cacheToken, legacy, viaCdn } = params;
|
|
8095
8095
|
if (!tilesetId) {
|
|
8096
8096
|
throw ("Tileset ID is required.");
|
|
8097
8097
|
}
|
|
@@ -8101,7 +8101,23 @@ var Tileset;
|
|
|
8101
8101
|
if (!file) {
|
|
8102
8102
|
file = "";
|
|
8103
8103
|
}
|
|
8104
|
-
|
|
8104
|
+
let url = null;
|
|
8105
|
+
const cdnBaseUrl = viaCdn ? api.GetCdnBaseUrl() : null;
|
|
8106
|
+
if (cdnBaseUrl) {
|
|
8107
|
+
url = `v3/tilesets/${tilesetId}/files/${legacy ? "" : "files/"}${file}`;
|
|
8108
|
+
const urlParams = new URLSearchParams();
|
|
8109
|
+
if (cacheToken != null) {
|
|
8110
|
+
urlParams.append("cacheToken", String(cacheToken));
|
|
8111
|
+
}
|
|
8112
|
+
url = api.ConstructCdnUrl(url, urlParams);
|
|
8113
|
+
}
|
|
8114
|
+
else {
|
|
8115
|
+
url = api.GetBaseUrl() + `v3/tilesets/${tilesetId}/files/${legacy ? "" : "files/"}${file}`;
|
|
8116
|
+
if (cacheToken != null) {
|
|
8117
|
+
url += `?cacheToken=${cacheToken}`;
|
|
8118
|
+
}
|
|
8119
|
+
}
|
|
8120
|
+
return url;
|
|
8105
8121
|
}
|
|
8106
8122
|
Tileset.GetFileUrl = GetFileUrl;
|
|
8107
8123
|
/**
|
|
@@ -8126,6 +8142,7 @@ var Tileset;
|
|
|
8126
8142
|
/**
|
|
8127
8143
|
* Returns file url for a file + tileset.
|
|
8128
8144
|
* @param params
|
|
8145
|
+
* @deprecated Use GetFileUrl instead.
|
|
8129
8146
|
* @returns
|
|
8130
8147
|
*/
|
|
8131
8148
|
function GetPublicFileUrl(params) {
|
|
@@ -8146,9 +8163,7 @@ var Tileset;
|
|
|
8146
8163
|
}
|
|
8147
8164
|
return cdnBaseUrl + `tileset/file/${tilesetId}/${file}?accountId=${api.AccountId}&cacheToken=${viaCdnCacheToken}`;
|
|
8148
8165
|
}
|
|
8149
|
-
|
|
8150
|
-
return api.GetBaseUrl() + `tileset/file/${tilesetId}/${file}`;
|
|
8151
|
-
}
|
|
8166
|
+
return api.GetBaseUrl() + `tileset/file/${tilesetId}/${file}`;
|
|
8152
8167
|
}
|
|
8153
8168
|
Tileset.GetPublicFileUrl = GetPublicFileUrl;
|
|
8154
8169
|
/**
|
|
@@ -11647,7 +11662,7 @@ var DataSource;
|
|
|
11647
11662
|
})(DataSource || (DataSource = {}));
|
|
11648
11663
|
|
|
11649
11664
|
// This is updated with the package.json version on build.
|
|
11650
|
-
const VERSION = "4.0.
|
|
11665
|
+
const VERSION = "4.0.4";
|
|
11651
11666
|
|
|
11652
11667
|
export { VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityTypeVisualSettings, EntityAttribute, EntityHistoricData, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
11653
11668
|
//# sourceMappingURL=bruce-models.es5.js.map
|