@mapvx/web-js 1.0.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/LICENSE.md +19 -0
- package/README.md +257 -0
- package/dist/cjs/assets/icons.js +87 -0
- package/dist/cjs/assets/icons.js.map +1 -0
- package/dist/cjs/assets/route_animation_icon.svg +15 -0
- package/dist/cjs/assets/user-dot-icon.svg +3 -0
- package/dist/cjs/config/sdkConfig.js +3 -0
- package/dist/cjs/config/sdkConfig.js.map +1 -0
- package/dist/cjs/controllers/routeController.js +1054 -0
- package/dist/cjs/controllers/routeController.js.map +1 -0
- package/dist/cjs/domain/models/_internal.js +15 -0
- package/dist/cjs/domain/models/_internal.js.map +1 -0
- package/dist/cjs/domain/models/_rtl.js +10 -0
- package/dist/cjs/domain/models/_rtl.js.map +1 -0
- package/dist/cjs/domain/models/animation.js +63 -0
- package/dist/cjs/domain/models/animation.js.map +1 -0
- package/dist/cjs/domain/models/banner.js +24 -0
- package/dist/cjs/domain/models/banner.js.map +1 -0
- package/dist/cjs/domain/models/categories.js +25 -0
- package/dist/cjs/domain/models/categories.js.map +1 -0
- package/dist/cjs/domain/models/cityFilterOption.js +3 -0
- package/dist/cjs/domain/models/cityFilterOption.js.map +1 -0
- package/dist/cjs/domain/models/configuration.js +3 -0
- package/dist/cjs/domain/models/configuration.js.map +1 -0
- package/dist/cjs/domain/models/cssCustomization.js +3 -0
- package/dist/cjs/domain/models/cssCustomization.js.map +1 -0
- package/dist/cjs/domain/models/fitOptions.js +3 -0
- package/dist/cjs/domain/models/fitOptions.js.map +1 -0
- package/dist/cjs/domain/models/innerFloors.js +3 -0
- package/dist/cjs/domain/models/innerFloors.js.map +1 -0
- package/dist/cjs/domain/models/institution.js +44 -0
- package/dist/cjs/domain/models/institution.js.map +1 -0
- package/dist/cjs/domain/models/latLng.js +3 -0
- package/dist/cjs/domain/models/latLng.js.map +1 -0
- package/dist/cjs/domain/models/location.js +3 -0
- package/dist/cjs/domain/models/location.js.map +1 -0
- package/dist/cjs/domain/models/loggeable.js +52 -0
- package/dist/cjs/domain/models/loggeable.js.map +1 -0
- package/dist/cjs/domain/models/mapCamera.js +3 -0
- package/dist/cjs/domain/models/mapCamera.js.map +1 -0
- package/dist/cjs/domain/models/mapConfig.js +15 -0
- package/dist/cjs/domain/models/mapConfig.js.map +1 -0
- package/dist/cjs/domain/models/marker.js +400 -0
- package/dist/cjs/domain/models/marker.js.map +1 -0
- package/dist/cjs/domain/models/multilanguage.js +18 -0
- package/dist/cjs/domain/models/multilanguage.js.map +1 -0
- package/dist/cjs/domain/models/openingHours.js +3 -0
- package/dist/cjs/domain/models/openingHours.js.map +1 -0
- package/dist/cjs/domain/models/place.js +101 -0
- package/dist/cjs/domain/models/place.js.map +1 -0
- package/dist/cjs/domain/models/platform.js +3 -0
- package/dist/cjs/domain/models/platform.js.map +1 -0
- package/dist/cjs/domain/models/popover.js +3 -0
- package/dist/cjs/domain/models/popover.js.map +1 -0
- package/dist/cjs/domain/models/product.js +3 -0
- package/dist/cjs/domain/models/product.js.map +1 -0
- package/dist/cjs/domain/models/property.js +104 -0
- package/dist/cjs/domain/models/property.js.map +1 -0
- package/dist/cjs/domain/models/route.js +166 -0
- package/dist/cjs/domain/models/route.js.map +1 -0
- package/dist/cjs/domain/models/routeConfiguration.js +80 -0
- package/dist/cjs/domain/models/routeConfiguration.js.map +1 -0
- package/dist/cjs/domain/models/routeInstance.js +30 -0
- package/dist/cjs/domain/models/routeInstance.js.map +1 -0
- package/dist/cjs/domain/models/routeStyle.js +3 -0
- package/dist/cjs/domain/models/routeStyle.js.map +1 -0
- package/dist/cjs/domain/models/transport.js +22 -0
- package/dist/cjs/domain/models/transport.js.map +1 -0
- package/dist/cjs/domain/ports/ICache.js +3 -0
- package/dist/cjs/domain/ports/ICache.js.map +1 -0
- package/dist/cjs/domain/ports/IHttpClient.js +3 -0
- package/dist/cjs/domain/ports/IHttpClient.js.map +1 -0
- package/dist/cjs/domain/ports/ILogger.js +23 -0
- package/dist/cjs/domain/ports/ILogger.js.map +1 -0
- package/dist/cjs/domain/ports/index.js +10 -0
- package/dist/cjs/domain/ports/index.js.map +1 -0
- package/dist/cjs/index.js +76 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/infrastructure/cache/CacheManager.js +236 -0
- package/dist/cjs/infrastructure/cache/CacheManager.js.map +1 -0
- package/dist/cjs/infrastructure/cache/LRUCache.js +153 -0
- package/dist/cjs/infrastructure/cache/LRUCache.js.map +1 -0
- package/dist/cjs/infrastructure/cache/PersistentCache.js +160 -0
- package/dist/cjs/infrastructure/cache/PersistentCache.js.map +1 -0
- package/dist/cjs/infrastructure/cache/cacheConfig.js +70 -0
- package/dist/cjs/infrastructure/cache/cacheConfig.js.map +1 -0
- package/dist/cjs/infrastructure/http/FetchHttpClient.js +75 -0
- package/dist/cjs/infrastructure/http/FetchHttpClient.js.map +1 -0
- package/dist/cjs/infrastructure/logging/CountlyLogger.js +78 -0
- package/dist/cjs/infrastructure/logging/CountlyLogger.js.map +1 -0
- package/dist/cjs/interfaces/cache.js +3 -0
- package/dist/cjs/interfaces/cache.js.map +1 -0
- package/dist/cjs/interfaces/healthResponse.js +3 -0
- package/dist/cjs/interfaces/healthResponse.js.map +1 -0
- package/dist/cjs/interfaces/institutionResponse.js +3 -0
- package/dist/cjs/interfaces/institutionResponse.js.map +1 -0
- package/dist/cjs/interfaces/metadata.js +3 -0
- package/dist/cjs/interfaces/metadata.js.map +1 -0
- package/dist/cjs/interfaces/placeResponse.js +3 -0
- package/dist/cjs/interfaces/placeResponse.js.map +1 -0
- package/dist/cjs/interfaces/routeCacheResponse.js +3 -0
- package/dist/cjs/interfaces/routeCacheResponse.js.map +1 -0
- package/dist/cjs/interfaces/routeResponse.js +3 -0
- package/dist/cjs/interfaces/routeResponse.js.map +1 -0
- package/dist/cjs/interfaces/styleResponse.js +3 -0
- package/dist/cjs/interfaces/styleResponse.js.map +1 -0
- package/dist/cjs/logger/logger.js +91 -0
- package/dist/cjs/logger/logger.js.map +1 -0
- package/dist/cjs/logger/rollbar.js +24 -0
- package/dist/cjs/logger/rollbar.js.map +1 -0
- package/dist/cjs/map/map.js +1457 -0
- package/dist/cjs/map/map.js.map +1 -0
- package/dist/cjs/repository/repository.js +574 -0
- package/dist/cjs/repository/repository.js.map +1 -0
- package/dist/cjs/repository/requester.js +590 -0
- package/dist/cjs/repository/requester.js.map +1 -0
- package/dist/cjs/sdk.js +351 -0
- package/dist/cjs/sdk.js.map +1 -0
- package/dist/cjs/utils/error.js +20 -0
- package/dist/cjs/utils/error.js.map +1 -0
- package/dist/cjs/utils/images.js +26 -0
- package/dist/cjs/utils/images.js.map +1 -0
- package/dist/cjs/utils/nav-functions.js +150 -0
- package/dist/cjs/utils/nav-functions.js.map +1 -0
- package/dist/cjs/utils/opening-hours-helper.js +911 -0
- package/dist/cjs/utils/opening-hours-helper.js.map +1 -0
- package/dist/cjs/utils/route-utils.js +58 -0
- package/dist/cjs/utils/route-utils.js.map +1 -0
- package/dist/cjs/utils/update-css.js +77 -0
- package/dist/cjs/utils/update-css.js.map +1 -0
- package/dist/cjs/utils/utils.js +105 -0
- package/dist/cjs/utils/utils.js.map +1 -0
- package/dist/es/assets/icons.d.ts +86 -0
- package/dist/es/assets/icons.d.ts.map +1 -0
- package/dist/es/assets/icons.js +83 -0
- package/dist/es/assets/icons.js.map +1 -0
- package/dist/es/assets/route_animation_icon.svg +15 -0
- package/dist/es/assets/user-dot-icon.svg +3 -0
- package/dist/es/config/sdkConfig.d.ts +105 -0
- package/dist/es/config/sdkConfig.d.ts.map +1 -0
- package/dist/es/config/sdkConfig.js +2 -0
- package/dist/es/config/sdkConfig.js.map +1 -0
- package/dist/es/controllers/routeController.d.ts +161 -0
- package/dist/es/controllers/routeController.d.ts.map +1 -0
- package/dist/es/controllers/routeController.js +1050 -0
- package/dist/es/controllers/routeController.js.map +1 -0
- package/dist/es/domain/models/_internal.d.ts +21 -0
- package/dist/es/domain/models/_internal.d.ts.map +1 -0
- package/dist/es/domain/models/_internal.js +11 -0
- package/dist/es/domain/models/_internal.js.map +1 -0
- package/dist/es/domain/models/_rtl.d.ts +7 -0
- package/dist/es/domain/models/_rtl.d.ts.map +1 -0
- package/dist/es/domain/models/_rtl.js +7 -0
- package/dist/es/domain/models/_rtl.js.map +1 -0
- package/dist/es/domain/models/animation.d.ts +161 -0
- package/dist/es/domain/models/animation.d.ts.map +1 -0
- package/dist/es/domain/models/animation.js +58 -0
- package/dist/es/domain/models/animation.js.map +1 -0
- package/dist/es/domain/models/banner.d.ts +64 -0
- package/dist/es/domain/models/banner.d.ts.map +1 -0
- package/dist/es/domain/models/banner.js +20 -0
- package/dist/es/domain/models/banner.js.map +1 -0
- package/dist/es/domain/models/categories.d.ts +157 -0
- package/dist/es/domain/models/categories.d.ts.map +1 -0
- package/dist/es/domain/models/categories.js +20 -0
- package/dist/es/domain/models/categories.js.map +1 -0
- package/dist/es/domain/models/cityFilterOption.d.ts +15 -0
- package/dist/es/domain/models/cityFilterOption.d.ts.map +1 -0
- package/dist/es/domain/models/cityFilterOption.js +2 -0
- package/dist/es/domain/models/cityFilterOption.js.map +1 -0
- package/dist/es/domain/models/configuration.d.ts +523 -0
- package/dist/es/domain/models/configuration.d.ts.map +1 -0
- package/dist/es/domain/models/configuration.js +2 -0
- package/dist/es/domain/models/configuration.js.map +1 -0
- package/dist/es/domain/models/cssCustomization.d.ts +63 -0
- package/dist/es/domain/models/cssCustomization.d.ts.map +1 -0
- package/dist/es/domain/models/cssCustomization.js +2 -0
- package/dist/es/domain/models/cssCustomization.js.map +1 -0
- package/dist/es/domain/models/fitOptions.d.ts +175 -0
- package/dist/es/domain/models/fitOptions.d.ts.map +1 -0
- package/dist/es/domain/models/fitOptions.js +2 -0
- package/dist/es/domain/models/fitOptions.js.map +1 -0
- package/dist/es/domain/models/innerFloors.d.ts +42 -0
- package/dist/es/domain/models/innerFloors.d.ts.map +1 -0
- package/dist/es/domain/models/innerFloors.js +2 -0
- package/dist/es/domain/models/innerFloors.js.map +1 -0
- package/dist/es/domain/models/institution.d.ts +64 -0
- package/dist/es/domain/models/institution.d.ts.map +1 -0
- package/dist/es/domain/models/institution.js +40 -0
- package/dist/es/domain/models/institution.js.map +1 -0
- package/dist/es/domain/models/latLng.d.ts +14 -0
- package/dist/es/domain/models/latLng.d.ts.map +1 -0
- package/dist/es/domain/models/latLng.js +2 -0
- package/dist/es/domain/models/latLng.js.map +1 -0
- package/dist/es/domain/models/location.d.ts +10 -0
- package/dist/es/domain/models/location.d.ts.map +1 -0
- package/dist/es/domain/models/location.js +2 -0
- package/dist/es/domain/models/location.js.map +1 -0
- package/dist/es/domain/models/loggeable.d.ts +43 -0
- package/dist/es/domain/models/loggeable.d.ts.map +1 -0
- package/dist/es/domain/models/loggeable.js +48 -0
- package/dist/es/domain/models/loggeable.js.map +1 -0
- package/dist/es/domain/models/mapCamera.d.ts +109 -0
- package/dist/es/domain/models/mapCamera.d.ts.map +1 -0
- package/dist/es/domain/models/mapCamera.js +2 -0
- package/dist/es/domain/models/mapCamera.js.map +1 -0
- package/dist/es/domain/models/mapConfig.d.ts +238 -0
- package/dist/es/domain/models/mapConfig.d.ts.map +1 -0
- package/dist/es/domain/models/mapConfig.js +12 -0
- package/dist/es/domain/models/mapConfig.js.map +1 -0
- package/dist/es/domain/models/marker.d.ts +301 -0
- package/dist/es/domain/models/marker.d.ts.map +1 -0
- package/dist/es/domain/models/marker.js +396 -0
- package/dist/es/domain/models/marker.js.map +1 -0
- package/dist/es/domain/models/multilanguage.d.ts +27 -0
- package/dist/es/domain/models/multilanguage.d.ts.map +1 -0
- package/dist/es/domain/models/multilanguage.js +14 -0
- package/dist/es/domain/models/multilanguage.js.map +1 -0
- package/dist/es/domain/models/openingHours.d.ts +30 -0
- package/dist/es/domain/models/openingHours.d.ts.map +1 -0
- package/dist/es/domain/models/openingHours.js +2 -0
- package/dist/es/domain/models/openingHours.js.map +1 -0
- package/dist/es/domain/models/place.d.ts +167 -0
- package/dist/es/domain/models/place.d.ts.map +1 -0
- package/dist/es/domain/models/place.js +97 -0
- package/dist/es/domain/models/place.js.map +1 -0
- package/dist/es/domain/models/platform.d.ts +6 -0
- package/dist/es/domain/models/platform.d.ts.map +1 -0
- package/dist/es/domain/models/platform.js +2 -0
- package/dist/es/domain/models/platform.js.map +1 -0
- package/dist/es/domain/models/popover.d.ts +14 -0
- package/dist/es/domain/models/popover.d.ts.map +1 -0
- package/dist/es/domain/models/popover.js +2 -0
- package/dist/es/domain/models/popover.js.map +1 -0
- package/dist/es/domain/models/product.d.ts +36 -0
- package/dist/es/domain/models/product.d.ts.map +1 -0
- package/dist/es/domain/models/product.js +2 -0
- package/dist/es/domain/models/product.js.map +1 -0
- package/dist/es/domain/models/property.d.ts +172 -0
- package/dist/es/domain/models/property.d.ts.map +1 -0
- package/dist/es/domain/models/property.js +100 -0
- package/dist/es/domain/models/property.js.map +1 -0
- package/dist/es/domain/models/route.d.ts +199 -0
- package/dist/es/domain/models/route.d.ts.map +1 -0
- package/dist/es/domain/models/route.js +160 -0
- package/dist/es/domain/models/route.js.map +1 -0
- package/dist/es/domain/models/routeConfiguration.d.ts +140 -0
- package/dist/es/domain/models/routeConfiguration.d.ts.map +1 -0
- package/dist/es/domain/models/routeConfiguration.js +75 -0
- package/dist/es/domain/models/routeConfiguration.js.map +1 -0
- package/dist/es/domain/models/routeInstance.d.ts +52 -0
- package/dist/es/domain/models/routeInstance.d.ts.map +1 -0
- package/dist/es/domain/models/routeInstance.js +26 -0
- package/dist/es/domain/models/routeInstance.js.map +1 -0
- package/dist/es/domain/models/routeStyle.d.ts +47 -0
- package/dist/es/domain/models/routeStyle.d.ts.map +1 -0
- package/dist/es/domain/models/routeStyle.js +2 -0
- package/dist/es/domain/models/routeStyle.js.map +1 -0
- package/dist/es/domain/models/transport.d.ts +176 -0
- package/dist/es/domain/models/transport.d.ts.map +1 -0
- package/dist/es/domain/models/transport.js +18 -0
- package/dist/es/domain/models/transport.js.map +1 -0
- package/dist/es/domain/ports/ICache.d.ts +70 -0
- package/dist/es/domain/ports/ICache.d.ts.map +1 -0
- package/dist/es/domain/ports/ICache.js +2 -0
- package/dist/es/domain/ports/ICache.js.map +1 -0
- package/dist/es/domain/ports/IHttpClient.d.ts +77 -0
- package/dist/es/domain/ports/IHttpClient.d.ts.map +1 -0
- package/dist/es/domain/ports/IHttpClient.js +2 -0
- package/dist/es/domain/ports/IHttpClient.js.map +1 -0
- package/dist/es/domain/ports/ILogger.d.ts +61 -0
- package/dist/es/domain/ports/ILogger.d.ts.map +1 -0
- package/dist/es/domain/ports/ILogger.js +19 -0
- package/dist/es/domain/ports/ILogger.js.map +1 -0
- package/dist/es/domain/ports/index.d.ts +9 -0
- package/dist/es/domain/ports/index.d.ts.map +1 -0
- package/dist/es/domain/ports/index.js +6 -0
- package/dist/es/domain/ports/index.js.map +1 -0
- package/dist/es/index.d.ts +58 -0
- package/dist/es/index.d.ts.map +1 -0
- package/dist/es/index.js +48 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/infrastructure/cache/CacheManager.d.ts +106 -0
- package/dist/es/infrastructure/cache/CacheManager.d.ts.map +1 -0
- package/dist/es/infrastructure/cache/CacheManager.js +232 -0
- package/dist/es/infrastructure/cache/CacheManager.js.map +1 -0
- package/dist/es/infrastructure/cache/LRUCache.d.ts +70 -0
- package/dist/es/infrastructure/cache/LRUCache.d.ts.map +1 -0
- package/dist/es/infrastructure/cache/LRUCache.js +149 -0
- package/dist/es/infrastructure/cache/LRUCache.js.map +1 -0
- package/dist/es/infrastructure/cache/PersistentCache.d.ts +58 -0
- package/dist/es/infrastructure/cache/PersistentCache.d.ts.map +1 -0
- package/dist/es/infrastructure/cache/PersistentCache.js +156 -0
- package/dist/es/infrastructure/cache/PersistentCache.js.map +1 -0
- package/dist/es/infrastructure/cache/cacheConfig.d.ts +51 -0
- package/dist/es/infrastructure/cache/cacheConfig.d.ts.map +1 -0
- package/dist/es/infrastructure/cache/cacheConfig.js +66 -0
- package/dist/es/infrastructure/cache/cacheConfig.js.map +1 -0
- package/dist/es/infrastructure/http/FetchHttpClient.d.ts +41 -0
- package/dist/es/infrastructure/http/FetchHttpClient.d.ts.map +1 -0
- package/dist/es/infrastructure/http/FetchHttpClient.js +71 -0
- package/dist/es/infrastructure/http/FetchHttpClient.js.map +1 -0
- package/dist/es/infrastructure/logging/CountlyLogger.d.ts +47 -0
- package/dist/es/infrastructure/logging/CountlyLogger.d.ts.map +1 -0
- package/dist/es/infrastructure/logging/CountlyLogger.js +74 -0
- package/dist/es/infrastructure/logging/CountlyLogger.js.map +1 -0
- package/dist/es/interfaces/cache.d.ts +5 -0
- package/dist/es/interfaces/cache.d.ts.map +1 -0
- package/dist/es/interfaces/cache.js +2 -0
- package/dist/es/interfaces/cache.js.map +1 -0
- package/dist/es/interfaces/healthResponse.d.ts +17 -0
- package/dist/es/interfaces/healthResponse.d.ts.map +1 -0
- package/dist/es/interfaces/healthResponse.js +2 -0
- package/dist/es/interfaces/healthResponse.js.map +1 -0
- package/dist/es/interfaces/institutionResponse.d.ts +12 -0
- package/dist/es/interfaces/institutionResponse.d.ts.map +1 -0
- package/dist/es/interfaces/institutionResponse.js +2 -0
- package/dist/es/interfaces/institutionResponse.js.map +1 -0
- package/dist/es/interfaces/metadata.d.ts +7 -0
- package/dist/es/interfaces/metadata.d.ts.map +1 -0
- package/dist/es/interfaces/metadata.js +2 -0
- package/dist/es/interfaces/metadata.js.map +1 -0
- package/dist/es/interfaces/placeResponse.d.ts +50 -0
- package/dist/es/interfaces/placeResponse.d.ts.map +1 -0
- package/dist/es/interfaces/placeResponse.js +2 -0
- package/dist/es/interfaces/placeResponse.js.map +1 -0
- package/dist/es/interfaces/routeCacheResponse.d.ts +13 -0
- package/dist/es/interfaces/routeCacheResponse.d.ts.map +1 -0
- package/dist/es/interfaces/routeCacheResponse.js +2 -0
- package/dist/es/interfaces/routeCacheResponse.js.map +1 -0
- package/dist/es/interfaces/routeResponse.d.ts +42 -0
- package/dist/es/interfaces/routeResponse.d.ts.map +1 -0
- package/dist/es/interfaces/routeResponse.js +2 -0
- package/dist/es/interfaces/routeResponse.js.map +1 -0
- package/dist/es/interfaces/styleResponse.d.ts +5 -0
- package/dist/es/interfaces/styleResponse.d.ts.map +1 -0
- package/dist/es/interfaces/styleResponse.js +2 -0
- package/dist/es/interfaces/styleResponse.js.map +1 -0
- package/dist/es/logger/logger.d.ts +14 -0
- package/dist/es/logger/logger.d.ts.map +1 -0
- package/dist/es/logger/logger.js +84 -0
- package/dist/es/logger/logger.js.map +1 -0
- package/dist/es/logger/rollbar.d.ts +4 -0
- package/dist/es/logger/rollbar.d.ts.map +1 -0
- package/dist/es/logger/rollbar.js +20 -0
- package/dist/es/logger/rollbar.js.map +1 -0
- package/dist/es/map/map.d.ts +598 -0
- package/dist/es/map/map.d.ts.map +1 -0
- package/dist/es/map/map.js +1430 -0
- package/dist/es/map/map.js.map +1 -0
- package/dist/es/repository/repository.d.ts +65 -0
- package/dist/es/repository/repository.d.ts.map +1 -0
- package/dist/es/repository/repository.js +570 -0
- package/dist/es/repository/repository.js.map +1 -0
- package/dist/es/repository/requester.d.ts +169 -0
- package/dist/es/repository/requester.d.ts.map +1 -0
- package/dist/es/repository/requester.js +586 -0
- package/dist/es/repository/requester.js.map +1 -0
- package/dist/es/sdk.d.ts +279 -0
- package/dist/es/sdk.d.ts.map +1 -0
- package/dist/es/sdk.js +346 -0
- package/dist/es/sdk.js.map +1 -0
- package/dist/es/utils/error.d.ts +8 -0
- package/dist/es/utils/error.d.ts.map +1 -0
- package/dist/es/utils/error.js +16 -0
- package/dist/es/utils/error.js.map +1 -0
- package/dist/es/utils/images.d.ts +8 -0
- package/dist/es/utils/images.d.ts.map +1 -0
- package/dist/es/utils/images.js +22 -0
- package/dist/es/utils/images.js.map +1 -0
- package/dist/es/utils/nav-functions.d.ts +85 -0
- package/dist/es/utils/nav-functions.d.ts.map +1 -0
- package/dist/es/utils/nav-functions.js +143 -0
- package/dist/es/utils/nav-functions.js.map +1 -0
- package/dist/es/utils/opening-hours-helper.d.ts +395 -0
- package/dist/es/utils/opening-hours-helper.d.ts.map +1 -0
- package/dist/es/utils/opening-hours-helper.js +906 -0
- package/dist/es/utils/opening-hours-helper.js.map +1 -0
- package/dist/es/utils/route-utils.d.ts +28 -0
- package/dist/es/utils/route-utils.d.ts.map +1 -0
- package/dist/es/utils/route-utils.js +54 -0
- package/dist/es/utils/route-utils.js.map +1 -0
- package/dist/es/utils/update-css.d.ts +12 -0
- package/dist/es/utils/update-css.d.ts.map +1 -0
- package/dist/es/utils/update-css.js +73 -0
- package/dist/es/utils/update-css.js.map +1 -0
- package/dist/es/utils/utils.d.ts +39 -0
- package/dist/es/utils/utils.d.ts.map +1 -0
- package/dist/es/utils/utils.js +97 -0
- package/dist/es/utils/utils.js.map +1 -0
- package/dist/umd/index.js +16874 -0
- package/dist/umd/index.js.map +1 -0
- package/dist/umd/styles.css +107 -0
- package/dist/umd/styles.css.map +1 -0
- package/dist/umd/styles.js +37 -0
- package/dist/umd/styles.js.map +1 -0
- package/package.json +198 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import type { MapVxRequestContext } from "../../config/sdkConfig";
|
|
2
|
+
import type { LatLng } from "./latLng";
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for map tile caching.
|
|
5
|
+
* Allows controlling how map tiles are cached in memory and persisted via service worker.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const tileCacheConfig: MapTileCacheConfig = {
|
|
10
|
+
* enabled: true,
|
|
11
|
+
* maxTiles: 500,
|
|
12
|
+
* ttlMs: 60 * 60 * 1000, // 1 hour
|
|
13
|
+
* persistToServiceWorker: true,
|
|
14
|
+
* preloadAdjacentZooms: false
|
|
15
|
+
* };
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @group Configuration
|
|
19
|
+
*/
|
|
20
|
+
export interface MapTileCacheConfig {
|
|
21
|
+
/**
|
|
22
|
+
* Enable tile caching
|
|
23
|
+
* When false, tiles are fetched directly without caching
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Maximum number of tiles to keep in MapLibre's memory cache
|
|
29
|
+
* Higher values use more memory but improve performance for panning/zooming
|
|
30
|
+
* @default 400
|
|
31
|
+
*/
|
|
32
|
+
maxTiles?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Time-to-live in milliseconds for cached tiles
|
|
35
|
+
* After this time, tiles will be re-fetched on next request
|
|
36
|
+
* @default 1800000 (30 minutes)
|
|
37
|
+
*/
|
|
38
|
+
ttlMs?: number;
|
|
39
|
+
/**
|
|
40
|
+
* Enable service worker persistence for offline tile access
|
|
41
|
+
* When true, tiles are cached via the cached-tile:// protocol
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
persistToServiceWorker?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Preload tiles for adjacent zoom levels
|
|
47
|
+
* Improves zoom transitions but increases initial load time and bandwidth
|
|
48
|
+
* @default false
|
|
49
|
+
*/
|
|
50
|
+
preloadAdjacentZooms?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Default values for tile cache configuration
|
|
54
|
+
* @internal
|
|
55
|
+
*/
|
|
56
|
+
export declare const DEFAULT_TILE_CACHE_CONFIG: Required<MapTileCacheConfig>;
|
|
57
|
+
/**
|
|
58
|
+
* Basic configuration for the map.
|
|
59
|
+
* Provides essential settings for initializing and customizing map behavior.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```typescript
|
|
63
|
+
* const mapConfig: MapConfig = {
|
|
64
|
+
* zoom: 15,
|
|
65
|
+
* center: { lat: 40.7128, lng: -74.0060 },
|
|
66
|
+
* parentPlaceId: "building-1",
|
|
67
|
+
* onMapReady: () => console.log("Map is ready!"),
|
|
68
|
+
* enableHover: true,
|
|
69
|
+
* showCompass: true
|
|
70
|
+
* };
|
|
71
|
+
* ```
|
|
72
|
+
*
|
|
73
|
+
* @group Map
|
|
74
|
+
*
|
|
75
|
+
* @property zoom - The initial zoom level of the map.
|
|
76
|
+
* @property center - The initial center coordinates of the map.
|
|
77
|
+
* @property parentPlaceId - (Optional) The ID of the parent place to display.
|
|
78
|
+
* @property otherPotentialParentPlacesIds - (Optional) List of alternative parent place IDs.
|
|
79
|
+
* @property onMapReady - (Optional) Callback invoked when the map is ready.
|
|
80
|
+
* @property onZoomEnd - (Optional) Callback invoked when the zoom operation ends. Receives the new zoom level.
|
|
81
|
+
* @property onRotate - (Optional) Callback invoked when the map is rotated. Receives the rotation in degrees.
|
|
82
|
+
* @property onFloorChange - (Optional) Callback invoked when the floor changes. Receives the new floor ID.
|
|
83
|
+
* @property onParentPlaceChange - (Optional) Callback invoked when the parent place changes. Receives the new parent place ID.
|
|
84
|
+
* @property lang - (Optional) Language code for map labels and UI.
|
|
85
|
+
* @property minZoom - (Optional) Minimum allowed zoom level.
|
|
86
|
+
* @property maxZoom - (Optional) Maximum allowed zoom level.
|
|
87
|
+
* @property pitch - (Optional) The pitch (tilt) of the map in degrees.
|
|
88
|
+
* @property maxBounds - (Optional) Array of coordinates defining the maximum bounds of the map.
|
|
89
|
+
* @property enableHover - (Optional) Whether to enable hover interactions on the map.
|
|
90
|
+
* @property showCompass - (Optional) Whether to display the compass control.
|
|
91
|
+
* @property showZoom - (Optional) Whether to display the zoom control.
|
|
92
|
+
* @property navigationPosition - (Optional) Position of the navigation controls on the map.
|
|
93
|
+
* @property bearingSnap - (Optional) The bearing snap threshold in degrees.
|
|
94
|
+
* @property institutionId - (Optional) The institution identifier for map context. Required for loading map related data from Portal.
|
|
95
|
+
* @property authToken - (Optional) Authentication token for accessing protected map resources. Required for loading map related data from Portal.
|
|
96
|
+
* @property apiUrl - (Optional) Injected by SDK when creating map; base API URL for map requests.
|
|
97
|
+
* @property mapvxRequestContext - (Optional) Injected by SDK when creating map; context sent as headers to public-api.mapvx.com.
|
|
98
|
+
*/
|
|
99
|
+
export interface MapConfig {
|
|
100
|
+
/**
|
|
101
|
+
* Initial zoom level for the map
|
|
102
|
+
* Higher values indicate more zoomed in view
|
|
103
|
+
*/
|
|
104
|
+
zoom: number;
|
|
105
|
+
/**
|
|
106
|
+
* Initial center coordinates for the map
|
|
107
|
+
* @see {@link LatLng} for coordinate structure
|
|
108
|
+
*/
|
|
109
|
+
center: LatLng;
|
|
110
|
+
/**
|
|
111
|
+
* Identifier of the parent place for the map
|
|
112
|
+
* Used for context and navigation within a specific building or area
|
|
113
|
+
*/
|
|
114
|
+
parentPlaceId?: string;
|
|
115
|
+
/**
|
|
116
|
+
* List of other potential parent place identifiers
|
|
117
|
+
* Used for multi-building navigation scenarios
|
|
118
|
+
*/
|
|
119
|
+
otherPotentialParentPlacesIds?: string[];
|
|
120
|
+
/**
|
|
121
|
+
* Callback function executed when the map is ready
|
|
122
|
+
* @param event - Map ready event
|
|
123
|
+
*/
|
|
124
|
+
onMapReady?: () => void;
|
|
125
|
+
/**
|
|
126
|
+
* Callback function executed when zoom level changes
|
|
127
|
+
* @param zoomLvl - New zoom level (optional)
|
|
128
|
+
*/
|
|
129
|
+
onZoomEnd?: (zoomLvl?: number) => void;
|
|
130
|
+
/**
|
|
131
|
+
* Callback function executed when map rotation changes
|
|
132
|
+
* @param degrees - Rotation angle in degrees
|
|
133
|
+
*/
|
|
134
|
+
onRotate?: (degrees: number) => void;
|
|
135
|
+
/**
|
|
136
|
+
* Callback function executed when floor changes
|
|
137
|
+
* @param newFloorId - New floor identifier
|
|
138
|
+
*/
|
|
139
|
+
onFloorChange?: (newFloorId: string) => void;
|
|
140
|
+
/**
|
|
141
|
+
* Callback function executed when parent place changes
|
|
142
|
+
* @param newParentPlaceId - New parent place identifier
|
|
143
|
+
*/
|
|
144
|
+
onParentPlaceChange?: (newParentPlaceId: string) => void;
|
|
145
|
+
/**
|
|
146
|
+
* Language code for map localization
|
|
147
|
+
* @example
|
|
148
|
+
* ```typescript
|
|
149
|
+
* lang: "en" // English
|
|
150
|
+
* lang: "es" // Spanish
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
lang?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Minimum zoom level allowed on the map
|
|
156
|
+
* Prevents users from zooming out too far
|
|
157
|
+
*/
|
|
158
|
+
minZoom?: number;
|
|
159
|
+
/**
|
|
160
|
+
* Maximum zoom level allowed on the map
|
|
161
|
+
* Prevents users from zooming in too close
|
|
162
|
+
*/
|
|
163
|
+
maxZoom?: number;
|
|
164
|
+
/**
|
|
165
|
+
* Map pitch angle in degrees
|
|
166
|
+
* Controls the 3D tilt of the map view
|
|
167
|
+
*/
|
|
168
|
+
pitch?: number;
|
|
169
|
+
/**
|
|
170
|
+
* Maximum bounds for the map view
|
|
171
|
+
* Restricts the map to a specific geographic area
|
|
172
|
+
* @see {@link LatLng} for coordinate structure
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```typescript
|
|
176
|
+
* maxBounds: [
|
|
177
|
+
* { lat: 40.7589, lng: -73.9851 }, // Southwest corner
|
|
178
|
+
* { lat: 40.7128, lng: -74.0060 } // Northeast corner
|
|
179
|
+
* ]
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
maxBounds?: LatLng[];
|
|
183
|
+
/**
|
|
184
|
+
* Flag to enable hover effects on map elements
|
|
185
|
+
* Enables interactive hover states for markers and other map features
|
|
186
|
+
*/
|
|
187
|
+
enableHover?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Flag to show the compass control on the map
|
|
190
|
+
* Provides a visual indicator of map orientation
|
|
191
|
+
*/
|
|
192
|
+
showCompass?: boolean;
|
|
193
|
+
/**
|
|
194
|
+
* Flag to show zoom controls on the map
|
|
195
|
+
* Provides buttons for zooming in and out
|
|
196
|
+
*/
|
|
197
|
+
showZoom?: boolean;
|
|
198
|
+
/**
|
|
199
|
+
* Position of navigation controls on the map
|
|
200
|
+
* Controls the placement of zoom, compass, and other navigation elements
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* ```typescript
|
|
204
|
+
* navigationPosition: "top-right" // Top right corner
|
|
205
|
+
* navigationPosition: "bottom-left" // Bottom left corner
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
navigationPosition?: "top-right" | "bottom-right" | "bottom-left" | "top-left";
|
|
209
|
+
/**
|
|
210
|
+
* Bearing snap angle in degrees
|
|
211
|
+
* Controls the snapping behavior when rotating the map
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```typescript
|
|
215
|
+
* bearingSnap: 15 // Snap to 15-degree increments
|
|
216
|
+
* ```
|
|
217
|
+
*/
|
|
218
|
+
bearingSnap?: number;
|
|
219
|
+
institutionId?: string;
|
|
220
|
+
authToken?: string;
|
|
221
|
+
/**
|
|
222
|
+
* Base API URL for map requests. Set by SDK when creating map from createMap().
|
|
223
|
+
* @internal
|
|
224
|
+
*/
|
|
225
|
+
apiUrl?: string;
|
|
226
|
+
/**
|
|
227
|
+
* Context sent with requests to public-api.mapvx.com. Set by SDK when creating map from createMap().
|
|
228
|
+
* @internal
|
|
229
|
+
*/
|
|
230
|
+
mapvxRequestContext?: MapVxRequestContext;
|
|
231
|
+
/**
|
|
232
|
+
* Tile cache configuration options
|
|
233
|
+
* Controls how map tiles are cached in memory and persisted
|
|
234
|
+
* @see {@link MapTileCacheConfig} for available options
|
|
235
|
+
*/
|
|
236
|
+
tileCache?: MapTileCacheConfig;
|
|
237
|
+
}
|
|
238
|
+
//# sourceMappingURL=mapConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapConfig.d.ts","sourceRoot":"","sources":["../../../../src/domain/models/mapConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEtC;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAA;IAEhC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAA;CAC/B;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,kBAAkB,CAMlE,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;;OAGG;IACH,6BAA6B,CAAC,EAAE,MAAM,EAAE,CAAA;IAExC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IAEvB;;;OAGG;IACH,SAAS,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAEtC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAEpC;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAA;IAE5C;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CAAC,gBAAgB,EAAE,MAAM,KAAK,IAAI,CAAA;IAExD;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;;;;;;;;;;OAYG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;;;;;OASG;IACH,kBAAkB,CAAC,EAAE,WAAW,GAAG,cAAc,GAAG,aAAa,GAAG,UAAU,CAAA;IAE9E;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;;OAGG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAA;IAEzC;;;;OAIG;IACH,SAAS,CAAC,EAAE,kBAAkB,CAAA;CAC/B"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default values for tile cache configuration
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export const DEFAULT_TILE_CACHE_CONFIG = {
|
|
6
|
+
enabled: true,
|
|
7
|
+
maxTiles: 400,
|
|
8
|
+
ttlMs: 30 * 60 * 1000,
|
|
9
|
+
persistToServiceWorker: true,
|
|
10
|
+
preloadAdjacentZooms: false,
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=mapConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapConfig.js","sourceRoot":"","sources":["../../../../src/domain/models/mapConfig.ts"],"names":[],"mappings":"AAyDA;;;GAGG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAiC;IACrE,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,GAAG;IACb,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI;IACrB,sBAAsB,EAAE,IAAI;IAC5B,oBAAoB,EAAE,KAAK;CAC5B,CAAA"}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { Marker, type Map, type PositionAnchor } from "maplibre-gl";
|
|
2
|
+
import { type LatLng } from "./latLng";
|
|
3
|
+
/**
|
|
4
|
+
* Represents the possible placements of text elements in a marker container.
|
|
5
|
+
* Defines the relative positioning of text labels around marker icons.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const markerConfig: MarkerConfig = {
|
|
10
|
+
* text: "Coffee Shop",
|
|
11
|
+
* textPosition: TextPosition.right,
|
|
12
|
+
* coordinate: { lat: 40.7128, lng: -74.0060 }
|
|
13
|
+
* };
|
|
14
|
+
* ```
|
|
15
|
+
*
|
|
16
|
+
* @group Markers
|
|
17
|
+
*/
|
|
18
|
+
export declare enum TextPosition {
|
|
19
|
+
/** Text positioned to the left of the icon */
|
|
20
|
+
left = 0,
|
|
21
|
+
/** Text positioned to the right of the icon */
|
|
22
|
+
right = 1,
|
|
23
|
+
/** Text positioned above the icon */
|
|
24
|
+
top = 2,
|
|
25
|
+
/** Text positioned below the icon */
|
|
26
|
+
bottom = 3
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Alignment options for marker rotation and pitch behavior.
|
|
30
|
+
* Controls how the marker responds to map rotation and pitch changes.
|
|
31
|
+
*/
|
|
32
|
+
export type Alignment = "map" | "viewport" | "auto";
|
|
33
|
+
/**
|
|
34
|
+
* Represents the configuration for the creation of a marker in a map.
|
|
35
|
+
* Provides all necessary properties to create and customize a map marker.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* const markerConfig: MarkerConfig = {
|
|
40
|
+
* id: "coffee-shop-1",
|
|
41
|
+
* coordinate: { lat: 40.7128, lng: -74.0060 },
|
|
42
|
+
* icon: "https://example.com/coffee-icon.png",
|
|
43
|
+
* text: "Coffee Shop",
|
|
44
|
+
* onClick: () => console.log("Marker clicked!")
|
|
45
|
+
* };
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @group Markers
|
|
49
|
+
*/
|
|
50
|
+
export interface MarkerConfig {
|
|
51
|
+
/**
|
|
52
|
+
* Unique identifier for the marker.
|
|
53
|
+
* If not provided, a hexadecimal key will be generated automatically.
|
|
54
|
+
*/
|
|
55
|
+
id?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Reference identifier of the marker related place.
|
|
58
|
+
* Used to associate the marker with a specific place in the system.
|
|
59
|
+
*/
|
|
60
|
+
refId?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The geographic coordinates of the pointed position.
|
|
63
|
+
* @see {@link LatLng} for coordinate structure
|
|
64
|
+
*/
|
|
65
|
+
coordinate: LatLng;
|
|
66
|
+
/**
|
|
67
|
+
* Identifier for the floor on which the marker is located.
|
|
68
|
+
* Used for indoor navigation and floor-specific marker management.
|
|
69
|
+
*/
|
|
70
|
+
floorId?: string;
|
|
71
|
+
/**
|
|
72
|
+
* The position of the marker's text relative to its container.
|
|
73
|
+
* @see {@link TextPosition} for available positioning options
|
|
74
|
+
*/
|
|
75
|
+
textPosition?: TextPosition;
|
|
76
|
+
/**
|
|
77
|
+
* The icon element to be displayed within the marker.
|
|
78
|
+
* Can be either a URL string or an HTML element.
|
|
79
|
+
*/
|
|
80
|
+
icon?: HTMLElement | string;
|
|
81
|
+
/**
|
|
82
|
+
* Additional properties for customizing the marker icon.
|
|
83
|
+
* @see {@link IconProperties} for available customization options
|
|
84
|
+
*/
|
|
85
|
+
iconProperties?: IconProperties;
|
|
86
|
+
/**
|
|
87
|
+
* The text content to be displayed with the marker.
|
|
88
|
+
* Can be either a string or an HTML element.
|
|
89
|
+
*/
|
|
90
|
+
text?: HTMLElement | string;
|
|
91
|
+
/**
|
|
92
|
+
* Additional properties for customizing the marker text.
|
|
93
|
+
* If text content is an instance of HTMLElement, this value will not be considered.
|
|
94
|
+
* @see {@link TextProperties} for available customization options
|
|
95
|
+
*/
|
|
96
|
+
textProperties?: TextProperties;
|
|
97
|
+
/**
|
|
98
|
+
* The HTML element associated with the marker.
|
|
99
|
+
* If provided, this element will be used instead of the icon and text properties.
|
|
100
|
+
*/
|
|
101
|
+
element?: HTMLElement;
|
|
102
|
+
/**
|
|
103
|
+
* The function to be executed when the marker is clicked.
|
|
104
|
+
* @param event - The click event object
|
|
105
|
+
*/
|
|
106
|
+
onClick?: () => void;
|
|
107
|
+
/**
|
|
108
|
+
* Sets the `rotationAlignment` property of the marker.
|
|
109
|
+
* Controls how the marker rotates with the map.
|
|
110
|
+
* @see {@link Alignment} for available alignment options
|
|
111
|
+
*/
|
|
112
|
+
rotationAlignment?: Alignment;
|
|
113
|
+
/**
|
|
114
|
+
* A string indicating the part of the Marker that should be positioned closest to the coordinate set via {@link coordinate}.
|
|
115
|
+
* Options are `'center'`, `'top'`, `'bottom'`, `'left'`, `'right'`, `'top-left'`, `'top-right'`, `'bottom-left'`, and `'bottom-right'`.
|
|
116
|
+
* @defaultValue 'center'
|
|
117
|
+
*/
|
|
118
|
+
anchor?: PositionAnchor;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Represents the properties for customizing the icon of a marker.
|
|
122
|
+
* @group Markers
|
|
123
|
+
*/
|
|
124
|
+
interface IconProperties {
|
|
125
|
+
/**
|
|
126
|
+
* Width of the icon in pixels
|
|
127
|
+
*/
|
|
128
|
+
width: number;
|
|
129
|
+
/**
|
|
130
|
+
* Height of the icon in pixels
|
|
131
|
+
*/
|
|
132
|
+
height: number;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Represents the properties for customizing the text of a marker.
|
|
136
|
+
* Provides comprehensive styling options for marker text labels.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```typescript
|
|
140
|
+
* const textProperties: TextProperties = {
|
|
141
|
+
* fontSize: "14px",
|
|
142
|
+
* color: "#333333",
|
|
143
|
+
* fontWeight: "bold",
|
|
144
|
+
* textShadow: "1px 1px 2px rgba(0,0,0,0.5)"
|
|
145
|
+
* };
|
|
146
|
+
* ```
|
|
147
|
+
*
|
|
148
|
+
* @group Markers
|
|
149
|
+
*/
|
|
150
|
+
export interface TextProperties {
|
|
151
|
+
/**
|
|
152
|
+
* Font size for the text (e.g., "14px", "1.2em")
|
|
153
|
+
*/
|
|
154
|
+
fontSize?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Padding around the text (e.g., "5px", "10px 5px")
|
|
157
|
+
*/
|
|
158
|
+
padding?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Margin around the text (e.g., "5px", "10px 5px")
|
|
161
|
+
*/
|
|
162
|
+
margin?: string;
|
|
163
|
+
/**
|
|
164
|
+
* Font weight for the text (e.g., "normal", "bold", "600")
|
|
165
|
+
*/
|
|
166
|
+
fontWeight?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Font family for the text (e.g., "Arial", "Helvetica, sans-serif")
|
|
169
|
+
*/
|
|
170
|
+
fontFamily?: string;
|
|
171
|
+
/**
|
|
172
|
+
* Text color in any valid CSS color format
|
|
173
|
+
*/
|
|
174
|
+
color?: string;
|
|
175
|
+
/**
|
|
176
|
+
* Text shadow effect (e.g., "1px 1px 2px rgba(0,0,0,0.5)")
|
|
177
|
+
*/
|
|
178
|
+
textShadow?: string;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Custom implementation of a MapLibre Marker with additional functionality.
|
|
182
|
+
* Extends the base MapLibre Marker class with MapVX-specific features.
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* ```typescript
|
|
186
|
+
* const marker = new MarkerAttribute({
|
|
187
|
+
* id: "place-1",
|
|
188
|
+
* coordinate: { lat: 40.7128, lng: -74.0060 },
|
|
189
|
+
* icon: "https://example.com/icon.png"
|
|
190
|
+
* });
|
|
191
|
+
* marker.addToMap(map);
|
|
192
|
+
* ```
|
|
193
|
+
*/
|
|
194
|
+
export declare class MarkerAttribute extends Marker {
|
|
195
|
+
/**
|
|
196
|
+
* Unique identifier for the marker attribute.
|
|
197
|
+
* Used for marker management and identification.
|
|
198
|
+
*/
|
|
199
|
+
id: string;
|
|
200
|
+
/**
|
|
201
|
+
* Geographic coordinates of the marker attribute.
|
|
202
|
+
* @see {@link LatLng} for coordinate structure
|
|
203
|
+
*/
|
|
204
|
+
coordinate: LatLng;
|
|
205
|
+
/**
|
|
206
|
+
* Identifier of the floor where the marker attribute is located.
|
|
207
|
+
* Used for indoor navigation and floor-specific marker management.
|
|
208
|
+
*/
|
|
209
|
+
floorId?: string;
|
|
210
|
+
/**
|
|
211
|
+
* Constructs a new `MarkerAttribute` object with the specified properties.
|
|
212
|
+
*
|
|
213
|
+
* @param markerConfig - `MarkerConfig` object containing the configuration properties
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* ```typescript
|
|
217
|
+
* const marker = new MarkerAttribute({
|
|
218
|
+
* id: "coffee-shop",
|
|
219
|
+
* coordinate: { lat: 40.7128, lng: -74.0060 },
|
|
220
|
+
* floorId: "ground-floor",
|
|
221
|
+
* icon: "coffee-icon.png"
|
|
222
|
+
* });
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
constructor(markerConfig: MarkerConfig);
|
|
226
|
+
/**
|
|
227
|
+
* Adds the marker attribute to the specified map.
|
|
228
|
+
*
|
|
229
|
+
* @param map - The map instance where the marker attribute will be added
|
|
230
|
+
*
|
|
231
|
+
* @example
|
|
232
|
+
* ```typescript
|
|
233
|
+
* const marker = new MarkerAttribute(markerConfig);
|
|
234
|
+
* marker.addToMap(mapInstance);
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
addToMap(map: Map): void;
|
|
238
|
+
/**
|
|
239
|
+
* Updates the icon of the marker attribute based on the specified marker configuration.
|
|
240
|
+
*
|
|
241
|
+
* @param marker - `MarkerConfig` object containing the new marker configuration
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* ```typescript
|
|
245
|
+
* marker.updateIcon({
|
|
246
|
+
* icon: "new-icon.png",
|
|
247
|
+
* text: "Updated Text"
|
|
248
|
+
* });
|
|
249
|
+
* ```
|
|
250
|
+
*/
|
|
251
|
+
updateIcon(marker: MarkerConfig): void;
|
|
252
|
+
/**
|
|
253
|
+
* Sets the current floor ID for the marker.
|
|
254
|
+
* Marker will be shown if and only if such floor is displayed.
|
|
255
|
+
*
|
|
256
|
+
* @param floorId - The ID of the floor to set for the marker.
|
|
257
|
+
* This parameter is optional and defaults to `undefined` if not provided.
|
|
258
|
+
*
|
|
259
|
+
* @example
|
|
260
|
+
* ```typescript
|
|
261
|
+
* marker.setFloor("ground-floor");
|
|
262
|
+
* ```
|
|
263
|
+
*/
|
|
264
|
+
setFloor(floorId?: string): void;
|
|
265
|
+
/**
|
|
266
|
+
* Hides the marker element from the map without deleting it.
|
|
267
|
+
* The marker can be shown again using the {@link show} method.
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* ```typescript
|
|
271
|
+
* marker.hide();
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
hide(): void;
|
|
275
|
+
/**
|
|
276
|
+
* Makes the marker visible again after it has been hidden.
|
|
277
|
+
*
|
|
278
|
+
* @param map - The map instance where the marker should be shown
|
|
279
|
+
*
|
|
280
|
+
* @example
|
|
281
|
+
* ```typescript
|
|
282
|
+
* marker.show(mapInstance);
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
show(map: Map): void;
|
|
286
|
+
/**
|
|
287
|
+
* Hides marker if currentFloor is different from the marker floor.
|
|
288
|
+
* Used for floor-based marker visibility management.
|
|
289
|
+
*
|
|
290
|
+
* @param floorId - The current floor ID to compare against
|
|
291
|
+
* @param map - The map instance for showing/hiding the marker
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* ```typescript
|
|
295
|
+
* marker.changeFloor("first-floor", mapInstance);
|
|
296
|
+
* ```
|
|
297
|
+
*/
|
|
298
|
+
changeFloor(floorId: string | null | undefined, map: Map, isOutdoor?: boolean): void;
|
|
299
|
+
}
|
|
300
|
+
export {};
|
|
301
|
+
//# sourceMappingURL=marker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"marker.d.ts","sourceRoot":"","sources":["../../../../src/domain/models/marker.ts"],"names":[],"mappings":"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"}
|