@massif-maps/web 6.2.1 → 6.4.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/bridge.mjs +11 -0
- package/massif-maps.bundle.mjs +67 -17
- package/massif-web-full.mjs +1 -1
- package/massif-web-full.wasm +0 -0
- package/massif-web.mjs +1 -1
- package/massif-web.wasm +0 -0
- package/package.json +2 -2
package/bridge.mjs
CHANGED
|
@@ -33,6 +33,7 @@ export function createBridge(module) {
|
|
|
33
33
|
doublesCount: fn('mm_doubles_count', 'number', ['number', 'number', 'number']),
|
|
34
34
|
doublesCopy: fn('mm_doubles_copy', 'number', ['number', 'number', 'number', 'number', 'number']),
|
|
35
35
|
dataSize: fn('mm_data_size', 'number', ['number', 'number', 'string', 'number']),
|
|
36
|
+
dataCreate: fn('mm_data_create', 'number', ['number', 'string', 'number', 'number', 'number']),
|
|
36
37
|
dataCopy: fn('mm_data_copy', 'number', ['number', 'number', 'string', 'number', 'number', 'number']),
|
|
37
38
|
on: fn('mm_on', 'number', ['number', 'number', 'string', 'number', 'number', 'string', 'number']),
|
|
38
39
|
off: fn('mm_off', 'number', ['number', 'number']),
|
|
@@ -145,6 +146,16 @@ export function createBridge(module) {
|
|
|
145
146
|
c.dataCopy(ctx, handle, path, buffer, size, copied) === OK ? module.HEAPU8.slice(buffer, buffer + size).buffer : null));
|
|
146
147
|
},
|
|
147
148
|
|
|
149
|
+
createData(id, bytes) {
|
|
150
|
+
const pointer = module._malloc(bytes.length);
|
|
151
|
+
try {
|
|
152
|
+
module.HEAPU8.set(bytes, pointer);
|
|
153
|
+
return scratch(4, (out) => (c.dataCreate(ctx, id, pointer, bytes.length, out) === OK ? unsigned(out) : 0));
|
|
154
|
+
} finally {
|
|
155
|
+
module._free(pointer);
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
|
|
148
159
|
on(handle, event, handler, delivery, coalesce, projection) {
|
|
149
160
|
const pointer = module.addFunction((userData, target, eventName, payload) =>
|
|
150
161
|
(handler(target >>> 0, module.UTF8ToString(eventName), payload >>> 0) ? 1 : 0), 'iiiii');
|
package/massif-maps.bundle.mjs
CHANGED
|
@@ -59,6 +59,7 @@ function setBridge(platform) {
|
|
|
59
59
|
// ../../bindings/js/dist/schema.js
|
|
60
60
|
var PROPS = {
|
|
61
61
|
"massif::Address": "categories,t;country,s;county,s;houseNumber,s;locality,s;name,s;neighbourhood,s;postcode,s;region,s;street,s",
|
|
62
|
+
"massif::AnimatedRasterTileLayer": "animationPosition,f;frameTimestamps,t;prefetchBudget,i;prefetchFrames,i",
|
|
62
63
|
"massif::AnimationStyle": "fadeAnimationType,e,AnimationType;phaseInDuration,f;phaseOutDuration,f;relativeSpeed,f;sizeAnimationType,e,AnimationType",
|
|
63
64
|
"massif::AnimationStyleBuilder": "fadeAnimationType,e,AnimationType;phaseInDuration,f;phaseOutDuration,f;relativeSpeed,f;sizeAnimationType,e,AnimationType",
|
|
64
65
|
"massif::AssetPackage": "assetNames,t",
|
|
@@ -93,7 +94,7 @@ var PROPS = {
|
|
|
93
94
|
"massif::ContourTileDataSource": "baseInterval,f;labelInterval,f;labelStubsEnabled,b;layerName,s;minVisibleZoom,i;resolution,i;seamlessEdgesEnabled,b;simplifyTolerance,f;terrainOptions,o,massif::TerrainOptions",
|
|
94
95
|
"massif::CullState": "viewState,t",
|
|
95
96
|
"massif::CustomPopup": "popupHandler,o,massif::CustomPopupHandler",
|
|
96
|
-
"massif::CustomRasterTileLayer": "shaderSource,s",
|
|
97
|
+
"massif::CustomRasterTileLayer": "shaderParameters,g,v;shaderSource,s",
|
|
97
98
|
"massif::DirAssetPackage": "dirPath,s;localAssetNames,t",
|
|
98
99
|
"massif::EditableVectorLayer": "selectedVectorElement,o,massif::VectorElement;vectorEditEventListener,o,massif::VectorEditEventListener",
|
|
99
100
|
"massif::Feature": "geometry,o,massif::Geometry;geometryGeoJSON,s;properties,v",
|
|
@@ -111,7 +112,7 @@ var PROPS = {
|
|
|
111
112
|
"massif::GeometryCollection": "geometry,o,massif::MultiGeometry;style,o,massif::GeometryCollectionStyle",
|
|
112
113
|
"massif::GeometryCollectionStyle": "lineStyle,o,massif::LineStyle;pointStyle,o,massif::PointStyle;polygonStyle,o,massif::PolygonStyle",
|
|
113
114
|
"massif::GeometryCollectionStyleBuilder": "lineStyle,o,massif::LineStyle;pointStyle,o,massif::PointStyle;polygonStyle,o,massif::PolygonStyle",
|
|
114
|
-
"massif::HTTPTileDataSource": "HTTPHeaders,g,s;TMSScheme,b;baseURL,s;maxAgeHeaderCheck,b;subdomains,t;timeout,i",
|
|
115
|
+
"massif::HTTPTileDataSource": "HTTPHeaders,g,s;TMSScheme,b;baseURL,s;frameTimestamps,t;maxAgeHeaderCheck,b;subdomains,t;timeout,i",
|
|
115
116
|
"massif::HillshadeRasterTileLayer": "accentColor,c;contourColor,c;contourEnabled,b;contourInterval,f;contourWidth,f;contrast,f;elevationEncodingEnabled,b;exagerateHeightScaleEnabled,b;exaggeration,f;heightScale,f;highlightColor,c;hillshadeMethod,e,HillshadeMethod;illuminationDirection,t;illuminationMapRotationEnabled,b;legacyHeightScaleEnabled,b;normalMapLightingShader,s;shadowColor,c;terrainPaintEnabled,b;terrainPaintFullDetailEnabled,b",
|
|
116
117
|
"massif::Label": "style,o,massif::LabelStyle",
|
|
117
118
|
"massif::LabelStyle": "anchorPointX,f;anchorPointY,f;flippable,b;orientationMode,e,BillboardOrientation;renderScale,f;scalingMode,e,BillboardScaling",
|
|
@@ -148,7 +149,7 @@ var PROPS = {
|
|
|
148
149
|
"massif::NMLModel": "rotationAngle,f;rotationAxis,t;scale,f;style,o,massif::NMLModelStyle",
|
|
149
150
|
"massif::NMLModelStyle": "modelAsset,o,massif::BinaryData;orientationMode,e,BillboardOrientation;scalingMode,e,BillboardScaling",
|
|
150
151
|
"massif::NMLModelStyleBuilder": "modelAsset,o,massif::BinaryData;orientationMode,e,BillboardOrientation;scalingMode,e,BillboardScaling",
|
|
151
|
-
"massif::Options": "DPI,f;ambientLightColor,c;backgroundBitmap,o,massif::Bitmap;baseProjection,o,massif::Projection;clearColor,c;clickMovingTolerance,f;clickTypeDetection,b;debugTileBorders,b;doubleClickDetection,b;doubleClickMaxDuration,f;drawDistance,f;envelopeThreadPoolSize,i;fieldOfViewY,f;focusPointOffset,t;fogOptions,o,massif::FogOptions;freeRoamLookSensitivity,f;freeRoamMode,e,FreeRoamMode;freeRoamMoveSpeed,f;kineticPan,b;kineticRotation,b;kineticZoom,b;labelPadding,f;labelViewDistance,f;layersLabelsProcessedInReverseOrder,b;lightOptions,o,massif::LightOptions;longClickDuration,f;mainLightColor,c;mainLightDirection,t;modelAnimationsEnabled,b;modelShadowsEnabled,b;orbitAroundPivot,b;panBounds,p;panningMode,e,PanningMode;panningSpeedMode,e,PanningSpeedMode;pivotMode,e,PivotMode;renderProjectionMode,e,RenderProjectionMode;restrictedPanning,b;rotatable,b;rotationGestures,b;seamlessPanning,b;skyColor,c;skyOptions,o,massif::SkyOptions;terrainOptions,o,massif::TerrainOptions;tileDrawSize,i;tileLODFactor,f;tileLODMaxZoomLevelsOnScreen,f;tileLODTileCountRatio,f;tileStyleZoomLift,i;tileThreadPoolSize,i;tiltGestureReversed,b;tiltRange,t;userInput,b;zoomGestures,b;zoomOffset,f;zoomRange,t",
|
|
152
|
+
"massif::Options": "DPI,f;ambientLightColor,c;backgroundBitmap,o,massif::Bitmap;baseProjection,o,massif::Projection;clearColor,c;clickMovingTolerance,f;clickTypeDetection,b;debugTileBorders,b;doubleClickDetection,b;doubleClickMaxDuration,f;drawDistance,f;envelopeThreadPoolSize,i;fieldOfViewY,f;focusPointOffset,t;fogOptions,o,massif::FogOptions;freeRoamLookSensitivity,f;freeRoamMode,e,FreeRoamMode;freeRoamMoveSpeed,f;kineticPan,b;kineticRotation,b;kineticZoom,b;labelPadding,f;labelViewDistance,f;layersLabelsProcessedInReverseOrder,b;lightOptions,o,massif::LightOptions;longClickDuration,f;mainLightColor,c;mainLightDirection,t;modelAnimationsEnabled,b;modelShadowsEnabled,b;orbitAroundPivot,b;panBounds,p;panningMode,e,PanningMode;panningSpeedMode,e,PanningSpeedMode;pivotMode,e,PivotMode;renderProjectionMode,e,RenderProjectionMode;restrictedPanning,b;rotatable,b;rotationGestures,b;seamlessPanning,b;skyColor,c;skyOptions,o,massif::SkyOptions;terrainOptions,o,massif::TerrainOptions;tileDrawSize,i;tileLODFactor,f;tileLODMaxZoomLevelsOnScreen,f;tileLODProfile,e,TileLODProfile;tileLODTileCountRatio,f;tileStyleZoomLift,i;tileThreadPoolSize,i;tiltGestureReversed,b;tiltRange,t;userInput,b;zoomGestures,b;zoomOffset,f;zoomRange,t",
|
|
152
153
|
"massif::PackageInfo": "metaInfo,o,massif::PackageMetaInfo;name,s;packageId,s;packageType,e,PackageType;size,i;tileMask,o,massif::PackageTileMask;version,i",
|
|
153
154
|
"massif::PackageManager": "localPackages,t;packageManagerListener,o,massif::PackageManagerListener;serverPackageListAge,i;serverPackageListMetaInfo,o,massif::PackageMetaInfo;serverPackages,t",
|
|
154
155
|
"massif::PackageManagerTileDataSource": "packageManager,o,massif::PackageManager",
|
|
@@ -173,7 +174,7 @@ var PROPS = {
|
|
|
173
174
|
"massif::Popup": "anchorPointX,f;anchorPointY,f;style,o,massif::PopupStyle",
|
|
174
175
|
"massif::PopupClickInfo": "clickInfo,t;clickPos,p;clickType,e,ClickType;elementClickPos,t;popup,o,massif::Popup",
|
|
175
176
|
"massif::PopupDrawInfo": "DPToPX,f;anchorScreenPos,t;popup,o,massif::Popup;screenBounds,t",
|
|
176
|
-
"massif::PostProcessEffect": "fragmentShader,s;name,s;terrainDepthRequired,b;terrainNormalsRequired,b",
|
|
177
|
+
"massif::PostProcessEffect": "colorParams,g,v;floatParams,g,v;fragmentShader,s;name,s;terrainDepthRequired,b;terrainNormalsRequired,b",
|
|
177
178
|
"massif::Projection": "bounds,p;name,s",
|
|
178
179
|
"massif::RasterTileClickInfo": "clickInfo,t;clickPos,p;clickType,e,ClickType;interpolatedColor,c;layer,o,massif::Layer;mapTile,t;nearestColor,c",
|
|
179
180
|
"massif::RasterTileLayer": "rasterTileEventListener,o,massif::RasterTileEventListener;textureCacheCapacity,i;tileBlendingSpeed,f;tileFilterMode,e,RasterTileFilterMode",
|
|
@@ -193,7 +194,7 @@ var PROPS = {
|
|
|
193
194
|
"massif::SolidLayer": "bitmap,o,massif::Bitmap;bitmapScale,f;color,c",
|
|
194
195
|
"massif::Style": "color,c",
|
|
195
196
|
"massif::StyleBuilder": "color,c",
|
|
196
|
-
"massif::TerrainOptions": "alwaysDecode,b;autoFlattenDuration,f;autoFlattenParallax,f;autoFlattenRiseDuration,f;autoFlattenTilt,f;backgroundColor,c;billboardOcclusionEnabled,b;billboardOcclusionTolerance,f;bridges3DEnabled,b;cameraClampDuration,f;cameraClearance,f;cameraClearanceFraction,f;depthBias,f;drapeCacheSize,i;drapeFillsEnabled,b;drapeLinesEnabled,b;drapeResolution,i;drapeWorkingSet,i;elevationCacheSize,i;elevationPrefetchEnabled,b;enabled,b;exaggeration,f;flattenMode,e,TerrainFlattenMode;flattenRatio,f;flattened,b;focusLift,f;maxTileZoomCoarsening,i;maxTileZoomOffset,i;maxZoom,i;meshCacheSize,i;meshResolution,i;minZoom,i;noDrapeLayerFilter,s;normalSampleDistance,f;postProcessDownscale,i;seamlessTileEdgesEnabled,b;sharedGroundEnabled,b;subdivideDistance,f;surfaceNodeResolution,i;surfaceShaderSource,s;switching,b;textOcclusionOpacity,f;tileEdgeStitchingEnabled,b;viewDistance,f;viewDistanceFactor,f;viewDistanceMax,f",
|
|
197
|
+
"massif::TerrainOptions": "alwaysDecode,b;autoFlattenDuration,f;autoFlattenParallax,f;autoFlattenRiseDuration,f;autoFlattenTilt,f;backgroundBitmapEnabled,b;backgroundColor,c;billboardOcclusionEnabled,b;billboardOcclusionTolerance,f;bridges3DEnabled,b;cameraClampDuration,f;cameraClearance,f;cameraClearanceFraction,f;depthBias,f;drapeCacheSize,i;drapeFillsEnabled,b;drapeLinesEnabled,b;drapeResolution,i;drapeWorkingSet,i;elevationCacheSize,i;elevationPrefetchEnabled,b;enabled,b;exaggeration,f;flattenMode,e,TerrainFlattenMode;flattenRatio,f;flattened,b;focusLift,f;maxTileZoomCoarsening,i;maxTileZoomOffset,i;maxZoom,i;meshCacheSize,i;meshResolution,i;minZoom,i;noDrapeLayerFilter,s;normalSampleDistance,f;postProcessDownscale,i;seamlessTileEdgesEnabled,b;sharedGroundEnabled,b;subdivideDistance,f;surfaceColorParams,g,v;surfaceNodeResolution,i;surfaceParams,g,v;surfaceShaderSource,s;switching,b;textOcclusionOpacity,f;tileEdgeStitchingEnabled,b;viewDistance,f;viewDistanceFactor,f;viewDistanceMax,f",
|
|
197
198
|
"massif::Text": "style,o,massif::TextStyle;title,s",
|
|
198
199
|
"massif::TextMargins": "bottom,i;left,i;right,i;top,i",
|
|
199
200
|
"massif::TextStyle": "backgroundColor,c;borderColor,c;borderWidth,f;breakLines,b;fontColor,c;fontName,s;fontSize,f;strokeColor,c;strokeWidth,f;textField,s;textMargins,t",
|
|
@@ -201,10 +202,9 @@ var PROPS = {
|
|
|
201
202
|
"massif::TileData": "data,o,massif::BinaryData;height,i;maxAge,i;rawPixels,b;replaceWithParent,b;width,i",
|
|
202
203
|
"massif::TileDataSource": "dataExtent,p;maxOverzoomLevel,i;maxZoom,i;metaData,g,v;minZoom,i;projection,o,massif::Projection",
|
|
203
204
|
"massif::TileDownloadInfo": "progress,f;tile,t;tileCount,i",
|
|
204
|
-
"massif::TileLayer": "UTFGridDataSource,o,massif::TileDataSource;UTFGridEventListener,o,massif::UTFGridEventListener;dataSource,o,massif::TileDataSource;frameNr,i;maxOverzoomLevel,i;maxUnderzoomLevel,i;preloading,b;preloadingTileCount,i;projection,o,massif::Projection;synchronizedRefresh,b;tileLoadListener,o,massif::TileLoadListener;tileSubstitutionPolicy,e,TileSubstitutionPolicy;visibleTileCount,i;zoomLevelBias,f",
|
|
205
|
+
"massif::TileLayer": "UTFGridDataSource,o,massif::TileDataSource;UTFGridEventListener,o,massif::UTFGridEventListener;dataSource,o,massif::TileDataSource;frameNr,i;maxOverzoomLevel,i;maxStandInLevel,i;maxUnderzoomLevel,i;preloading,b;preloadingTileCount,i;projection,o,massif::Projection;synchronizedRefresh,b;tileLoadListener,o,massif::TileLoadListener;tileSubstitutionPolicy,e,TileSubstitutionPolicy;visibleTileCount,i;zoomLevelBias,f",
|
|
205
206
|
"massif::TomTomOnlineGeocodingService": "customServiceURL,s",
|
|
206
207
|
"massif::TomTomOnlineReverseGeocodingService": "customServiceURL,s",
|
|
207
|
-
"massif::TorqueTileDecoder": "animationDuration,f;frameCount,i;resolution,i;styleSet,o,massif::CartoCSSStyleSet",
|
|
208
208
|
"massif::UTFGridClickInfo": "clickInfo,t;clickPos,p;clickType,e,ClickType;elementInfo,v;layer,o,massif::Layer",
|
|
209
209
|
"massif::ValhallaOnlineRoutingService": "HTTPHeaders,g,s;customServiceURL,s;timeout,i",
|
|
210
210
|
"massif::Variant": "arraySize,i;bool,b;double,f;long,i;objectKeys,t;string,s;type,e,VariantType",
|
|
@@ -232,6 +232,7 @@ var ALIASES = {
|
|
|
232
232
|
"massif::VectorTileLayer": "style=tileDecoder"
|
|
233
233
|
};
|
|
234
234
|
var BASES = {
|
|
235
|
+
"massif::AnimatedRasterTileLayer": "massif::CustomRasterTileLayer",
|
|
235
236
|
"massif::AssetTileDataSource": "massif::TileDataSource",
|
|
236
237
|
"massif::BalloonPopup": "massif::Popup",
|
|
237
238
|
"massif::BalloonPopupButtonStyle": "massif::Style",
|
|
@@ -338,8 +339,6 @@ var BASES = {
|
|
|
338
339
|
"massif::TileLayer": "massif::Layer",
|
|
339
340
|
"massif::TomTomOnlineGeocodingService": "massif::GeocodingService",
|
|
340
341
|
"massif::TomTomOnlineReverseGeocodingService": "massif::ReverseGeocodingService",
|
|
341
|
-
"massif::TorqueTileDecoder": "massif::VectorTileDecoder",
|
|
342
|
-
"massif::TorqueTileLayer": "massif::VectorTileLayer",
|
|
343
342
|
"massif::ValhallaOfflineRoutingService": "massif::RoutingService",
|
|
344
343
|
"massif::ValhallaOnlineRoutingService": "massif::RoutingService",
|
|
345
344
|
"massif::VectorLayer": "massif::Layer",
|
|
@@ -381,7 +380,7 @@ var ENUMS = {
|
|
|
381
380
|
SkyType: "SKY_TYPE_GRADIENT=0,SKY_TYPE_ATMOSPHERE=1",
|
|
382
381
|
TerrainFlattenMode: "TERRAIN_FLATTEN_MODE_RENDER=0,TERRAIN_FLATTEN_MODE_FULL=1",
|
|
383
382
|
TileFormat: "TILE_FORMAT_AUTO=0,TILE_FORMAT_MVT=1,TILE_FORMAT_MLT=2",
|
|
384
|
-
TileLODProfile: "TILE_LOD_PROFILE_REFERENCE=0,TILE_LOD_PROFILE_MOBILE=1,TILE_LOD_PROFILE_DESKTOP=2",
|
|
383
|
+
TileLODProfile: "TILE_LOD_PROFILE_REFERENCE=0,TILE_LOD_PROFILE_MOBILE=1,TILE_LOD_PROFILE_DESKTOP=2,TILE_LOD_PROFILE_CUSTOM=3",
|
|
385
384
|
TileSubstitutionPolicy: "TILE_SUBSTITUTION_POLICY_ALL=0,TILE_SUBSTITUTION_POLICY_VISIBLE=1,TILE_SUBSTITUTION_POLICY_NONE=2",
|
|
386
385
|
VariantType: "VARIANT_TYPE_NULL=0,VARIANT_TYPE_STRING=1,VARIANT_TYPE_BOOL=2,VARIANT_TYPE_INTEGER=3,VARIANT_TYPE_DOUBLE=4,VARIANT_TYPE_ARRAY=5,VARIANT_TYPE_OBJECT=6",
|
|
387
386
|
VectorElementDragMode: "VECTOR_ELEMENT_DRAG_MODE_VERTEX=0,VECTOR_ELEMENT_DRAG_MODE_ELEMENT=1",
|
|
@@ -401,7 +400,7 @@ var SPEC_CLASS = {
|
|
|
401
400
|
"feature": { "feature": "massif::Feature" },
|
|
402
401
|
"geocoding": { "multi-osm-offline": "massif::MultiOSMOfflineGeocodingService", "multi-osm-offline-reverse": "massif::MultiOSMOfflineReverseGeocodingService" },
|
|
403
402
|
"geometry": { "line": "massif::LineGeometry", "maneuver-arrow": "massif::ManeuverArrowBuilder", "point": "massif::PointGeometry", "polygon": "massif::PolygonGeometry" },
|
|
404
|
-
"layer": { "celestial": "massif::CelestialLayer", "composite-vector": "massif::CompositeVectorTileLayer", "elements": "massif::VectorLayer", "hillshade": "massif::HillshadeRasterTileLayer", "raster": "massif::RasterTileLayer", "solid": "massif::SolidLayer", "vector": "massif::VectorTileLayer" },
|
|
403
|
+
"layer": { "animated-raster": "massif::AnimatedRasterTileLayer", "celestial": "massif::CelestialLayer", "composite-vector": "massif::CompositeVectorTileLayer", "custom-raster": "massif::CustomRasterTileLayer", "elements": "massif::VectorLayer", "hillshade": "massif::HillshadeRasterTileLayer", "raster": "massif::RasterTileLayer", "solid": "massif::SolidLayer", "vector": "massif::VectorTileLayer" },
|
|
405
404
|
"options": { "fog": "massif::FogOptions", "light": "massif::LightOptions", "sky": "massif::SkyOptions", "terrain": "massif::TerrainOptions" },
|
|
406
405
|
"routing": { "multi-valhalla-offline": "massif::MultiValhallaOfflineRoutingService", "valhalla-offline": "massif::ValhallaOfflineRoutingService", "valhalla-online": "massif::ValhallaOnlineRoutingService" },
|
|
407
406
|
"search": { "request": "massif::SearchRequest", "vectortile": "massif::VectorTileSearchService" },
|
|
@@ -410,6 +409,7 @@ var SPEC_CLASS = {
|
|
|
410
409
|
"styleset": { "cartocss": "massif::CartoCSSStyleSet", "project": "massif::CompiledStyleSet" }
|
|
411
410
|
};
|
|
412
411
|
var KIND_OF_CLASS = {
|
|
412
|
+
"massif::AnimatedRasterTileLayer": "layer",
|
|
413
413
|
"massif::AssetPackage": "assets",
|
|
414
414
|
"massif::AssetTileDataSource": "source",
|
|
415
415
|
"massif::BalloonPopup": "element",
|
|
@@ -511,14 +511,16 @@ var KIND_OF_CLASS = {
|
|
|
511
511
|
"massif::ZippedAssetPackage": "assets"
|
|
512
512
|
};
|
|
513
513
|
var METHODS = {
|
|
514
|
-
"massif::BaseMapView": "fitBounds,v;flyTo,v;mapToScreen,j;moveCameraTo,v;moveTo,v;screenToMap,j;stopFlight,v",
|
|
514
|
+
"massif::BaseMapView": "cancelAllTasks,v;clearAllCaches,v;clearPreloadingCaches,v;fitBounds,v;flyTo,v;mapToScreen,j;moveCameraTo,v;moveTo,v;screenToMap,j;stopFlight,v",
|
|
515
515
|
"massif::CelestialArc": "setCircle,v;setDirections,v;setSegments,v",
|
|
516
516
|
"massif::CelestialImage": "setAnchors,v",
|
|
517
517
|
"massif::CelestialLabel": "setAnchorPoint,v;setOffset,v",
|
|
518
518
|
"massif::CelestialLayer": "add,v;clear,v;remove,b",
|
|
519
519
|
"massif::CelestialObject": "setDirection,v;setPosition,v",
|
|
520
520
|
"massif::CompositeVectorTileLayer": "addExternalDataSource,v;addVectorDataSource,v;getExternalChildLayer,o,massif::Layer;getExternalDataSourceNames,j;removeExternalDataSource,b;setExternalDataSourceMaxOverzoomLevel,v;setExternalDataSourceZoomLevelBias,v",
|
|
521
|
-
"massif::
|
|
521
|
+
"massif::ContourTileDataSource": "clearIntervalMultipliers,v;clearResolutionsForZoom,v;setIntervalMultiplier,v;setResolutionForZoom,v",
|
|
522
|
+
"massif::CustomRasterTileLayer": "addDataSource,v",
|
|
523
|
+
"massif::FeatureCollection": "getFeature,o,massif::Feature;toGeoJSON,j",
|
|
522
524
|
"massif::FeatureCollectionSearchService": "findFeatures,o,massif::FeatureCollection",
|
|
523
525
|
"massif::GeoJSONVectorTileDataSource": "addFeature,v;createLayer,i;deleteLayer,v;removeFeature,v;setLayerGeoJSON,v;updateFeature,v",
|
|
524
526
|
"massif::GeocodingService": "calculateAddresses,j",
|
|
@@ -529,20 +531,20 @@ var METHODS = {
|
|
|
529
531
|
"massif::LocalVectorDataSource": "add,v;clear,v;remove,b",
|
|
530
532
|
"massif::MBVectorTileDecoder": "addFallbackFont,v;getLegend,j;getStyleParameter,s;setStyleParameter,b;setStyleParameters,v",
|
|
531
533
|
"massif::ManeuverArrowBuilder": "buildArrow,j;buildArrowAtIndex,j",
|
|
534
|
+
"massif::MapRenderer": "capturePNG,o,massif::BinaryData",
|
|
532
535
|
"massif::MultiOSMOfflineGeocodingService": "add,v;remove,b",
|
|
533
536
|
"massif::MultiOSMOfflineReverseGeocodingService": "add,v;remove,b",
|
|
534
537
|
"massif::MultiTileDataSource": "add,v;remove,b",
|
|
535
538
|
"massif::MultiValhallaOfflineRoutingService": "add,v;addLocale,v;remove,b;setConfigurationParameter,v",
|
|
536
539
|
"massif::PersistentCacheTileDataSource": "clear,v;startDownloadArea,v;stopAllDownloads,v",
|
|
537
|
-
"massif::PostProcessEffect": "setFloatParameter,v",
|
|
538
540
|
"massif::ReverseGeocodingService": "calculateAddresses,j",
|
|
539
541
|
"massif::RouteMatchingRequest": "setCustomParameter,v",
|
|
540
542
|
"massif::RoutingRequest": "setCustomParameter,v",
|
|
541
543
|
"massif::RoutingResult": "getInstruction,o,massif::RoutingInstruction;getPoints,d",
|
|
542
544
|
"massif::RoutingService": "calculateRoute,o,massif::RoutingResult;matchRoute,o,massif::RouteMatchingResult",
|
|
543
|
-
"massif::TerrainOptions": "calculateHorizon,d;
|
|
545
|
+
"massif::TerrainOptions": "calculateHorizon,d;getElevation,f;getElevations,d",
|
|
544
546
|
"massif::TileData": "getMetaDataElement,j",
|
|
545
|
-
"massif::TileDataSource": "getMetaDataElement,j;loadTile,o,massif::TileData;setMetaDataElement,v",
|
|
547
|
+
"massif::TileDataSource": "getMetaDataElement,j;loadTile,o,massif::TileData;notifyTilesChanged,v;setMetaDataElement,v",
|
|
546
548
|
"massif::TileLayer": "clearTileCaches,v",
|
|
547
549
|
"massif::VectorTileFeatureCollection": "getFeature,o,massif::VectorTileFeature",
|
|
548
550
|
"massif::VectorTileLayer": "clearModelHighlight,v;setModelHighlight,v",
|
|
@@ -550,12 +552,14 @@ var METHODS = {
|
|
|
550
552
|
};
|
|
551
553
|
var EVENTS = {
|
|
552
554
|
"massif::CelestialLayer": { "celestial.clicked": { payload: "massif::CelestialClickInfo", consume: true }, "sky.clicked": { payload: "massif::CelestialClickInfo", consume: true } },
|
|
555
|
+
"massif::MapRenderer": { "frame.after": { payload: "", consume: false }, "frame.before": { payload: "", consume: false } },
|
|
553
556
|
"massif::Options": { "map.clicked": { payload: "massif::MapClickInfo", consume: false }, "map.idle": { payload: "", consume: false }, "map.interaction": { payload: "massif::MapInteractionInfo", consume: false }, "map.moved": { payload: "massif::MapMoveInfo", consume: false }, "map.stable": { payload: "massif::MapMoveInfo", consume: false } },
|
|
554
557
|
"massif::PersistentCacheTileDataSource": { "download.completed": { payload: "", consume: false }, "download.failed": { payload: "massif::TileDownloadInfo", consume: false }, "download.progress": { payload: "massif::TileDownloadInfo", consume: false }, "download.started": { payload: "massif::TileDownloadInfo", consume: false } },
|
|
558
|
+
"massif::TileLayer": { "tiles.loaded": { payload: "", consume: false }, "tiles.preloaded": { payload: "", consume: false } },
|
|
555
559
|
"massif::VectorLayer": { "vectorelement.clicked": { payload: "massif::VectorElementClickInfo", consume: true } },
|
|
556
560
|
"massif::VectorTileLayer": { "vectortile.clicked": { payload: "massif::VectorTileClickInfo", consume: true } }
|
|
557
561
|
};
|
|
558
|
-
var CLASS_NAMES = "Address,AnimationStyle,AnimationStyleBuilder,AssetPackage,AssetTileDataSource,BalloonPopup,BalloonPopupButton,BalloonPopupButtonClickInfo,BalloonPopupButtonStyle,BalloonPopupButtonStyleBuilder,BalloonPopupEventListener,BalloonPopupMargins,BalloonPopupStyle,BalloonPopupStyleBuilder,BaseMapView,Billboard,BillboardStyle,BillboardStyleBuilder,BinaryData,Bitmap,BitmapOverlayRasterTileDataSource,BundleAssetPackage,CacheTileDataSource,CartoCSSStyleSet,CelestialArc,CelestialClickInfo,CelestialEventListener,CelestialImage,CelestialLabel,CelestialLayer,CelestialObject,CelestialSprite,ClickInfo,ClusterElementBuilder,ClusterFetchTask,ClusteredVectorLayer,Color,CombinedTileDataSource,CompiledStyleSet,CompositeVectorTileLayer,ContourTileDataSource,CullState,CustomPopup,CustomPopupHandler,CustomRasterTileLayer,DataSourceListener,DirAssetPackage,DouglasPeuckerGeometrySimplifier,DownloadTask,EPSG3857,EPSG4326,EditableVectorLayer,ElevationDecoder,EventListener,Feature,FeatureBuilder,FeatureCollection,FeatureCollectionSearchService,FetchTask,FetchTaskBase,FetchingTasks,FetchingTileTasks,FogOptions,GeoJSONGeometryReader,GeoJSONGeometryWriter,GeoJSONVectorTileDataSource,GeocodingAddress,GeocodingRequest,GeocodingResult,GeocodingService,Geometry,GeometryCollection,GeometryCollectionStyle,GeometryCollectionStyleBuilder,GeometrySimplifier,HTTPTileDataSource,HillshadeRasterTileLayer,Label,LabelStyle,LabelStyleBuilder,Layer,Layers,LightOptions,LightStop,Line,LineGeometry,LineStyle,LineStyleBuilder,LocalVectorDataSource,Log,LogEventListener,MBTilesTileDataSource,MBVectorTileDecoder,ManeuverArrowBuilder,MapBounds,MapBoxElevationDataDecoder,MapBoxOnlineGeocodingService,MapBoxOnlineReverseGeocodingService,MapClickInfo,MapEnvelope,MapEventListener,MapInteractionInfo,MapMoveInfo,MapPos,MapRange,MapRenderer,MapRendererListener,MapTile,MapTilerOnlineTileDataSource,MapVec,Marker,MarkerStyle,MarkerStyleBuilder,MassifApi,MassifInterop,MemoryCacheTileDataSource,MergedMBVTTileDataSource,MultiGeometry,MultiLineGeometry,MultiOSMOfflineGeocodingService,MultiOSMOfflineReverseGeocodingService,MultiPointGeometry,MultiPolygonGeometry,MultiTileDataSource,MultiValhallaOfflineRoutingService,NMLModel,NMLModelStyle,NMLModelStyleBuilder,OSMOfflineGeocodingService,OSMOfflineReverseGeocodingService,OSRMOfflineRoutingService,OnChangeListener,Options,OptionsListener,OrderedTileDataSource,PMTilesTileDataSource,PackageInfo,PackageManager,PackageManagerGeocodingService,PackageManagerListener,PackageManagerReverseGeocodingService,PackageManagerRoutingService,PackageManagerTileDataSource,PackageManagerValhallaRoutingService,PackageMetaInfo,PackageStatus,PackageTileMask,PeliasOnlineGeocodingService,PeliasOnlineReverseGeocodingService,PersistentCacheTileDataSource,PersistentTaskQueue,Point,PointDetailTileDataSource,PointGeometry,PointStyle,PointStyleBuilder,Polygon,Polygon3D,Polygon3DStyle,Polygon3DStyleBuilder,PolygonGeometry,PolygonStyle,PolygonStyleBuilder,Popup,PopupClickInfo,PopupDrawInfo,PopupStyle,PopupStyleBuilder,PostProcessEffect,Projection,RasterTileClickInfo,RasterTileEventListener,RasterTileLayer,RedrawRequestListener,RendererCaptureListener,ReverseGeocodingRequest,ReverseGeocodingService,RouteMatchingEdge,RouteMatchingPoint,RouteMatchingRequest,RouteMatchingResult,RoutingInstruction,RoutingRequest,RoutingResult,RoutingService,SGREOfflineRoutingService,ScreenBounds,ScreenPos,SearchRequest,SkyOptions,SolidLayer,Style,StyleBuilder,TerrainOptions,TerrariumElevationDataDecoder,Text,TextMargins,TextStyle,TextStyleBuilder,TileData,TileDataSource,TileDecoderListener,TileDownloadInfo,TileDownloadListener,TileInfo,TileLayer,TileLoadListener,TileUtils,TomTomOnlineGeocodingService,TomTomOnlineReverseGeocodingService,
|
|
562
|
+
var CLASS_NAMES = "Address,AnimatedRasterTileLayer,AnimationStyle,AnimationStyleBuilder,AssetPackage,AssetTileDataSource,BalloonPopup,BalloonPopupButton,BalloonPopupButtonClickInfo,BalloonPopupButtonStyle,BalloonPopupButtonStyleBuilder,BalloonPopupEventListener,BalloonPopupMargins,BalloonPopupStyle,BalloonPopupStyleBuilder,BaseMapView,Billboard,BillboardStyle,BillboardStyleBuilder,BinaryData,Bitmap,BitmapOverlayRasterTileDataSource,BundleAssetPackage,CacheTileDataSource,CartoCSSStyleSet,CelestialArc,CelestialClickInfo,CelestialEventListener,CelestialImage,CelestialLabel,CelestialLayer,CelestialObject,CelestialSprite,ClickInfo,ClusterElementBuilder,ClusterFetchTask,ClusteredVectorLayer,Color,CombinedTileDataSource,CompiledStyleSet,CompositeVectorTileLayer,ContourTileDataSource,CullState,CustomPopup,CustomPopupHandler,CustomRasterTileLayer,DataSourceListener,DirAssetPackage,DouglasPeuckerGeometrySimplifier,DownloadTask,EPSG3857,EPSG4326,EditableVectorLayer,ElevationDecoder,EventListener,Feature,FeatureBuilder,FeatureCollection,FeatureCollectionSearchService,FetchTask,FetchTaskBase,FetchingTasks,FetchingTileTasks,FogOptions,GeoJSONGeometryReader,GeoJSONGeometryWriter,GeoJSONVectorTileDataSource,GeocodingAddress,GeocodingRequest,GeocodingResult,GeocodingService,Geometry,GeometryCollection,GeometryCollectionStyle,GeometryCollectionStyleBuilder,GeometrySimplifier,HTTPTileDataSource,HillshadeRasterTileLayer,Label,LabelStyle,LabelStyleBuilder,Layer,Layers,LightOptions,LightStop,Line,LineGeometry,LineStyle,LineStyleBuilder,LocalVectorDataSource,Log,LogEventListener,MBTilesTileDataSource,MBVectorTileDecoder,ManeuverArrowBuilder,MapBounds,MapBoxElevationDataDecoder,MapBoxOnlineGeocodingService,MapBoxOnlineReverseGeocodingService,MapClickInfo,MapEnvelope,MapEventListener,MapInteractionInfo,MapMoveInfo,MapPos,MapRange,MapRenderer,MapRendererListener,MapTile,MapTilerOnlineTileDataSource,MapVec,Marker,MarkerStyle,MarkerStyleBuilder,MassifApi,MassifInterop,MemoryCacheTileDataSource,MergedMBVTTileDataSource,MultiGeometry,MultiLineGeometry,MultiOSMOfflineGeocodingService,MultiOSMOfflineReverseGeocodingService,MultiPointGeometry,MultiPolygonGeometry,MultiTileDataSource,MultiValhallaOfflineRoutingService,NMLModel,NMLModelStyle,NMLModelStyleBuilder,OSMOfflineGeocodingService,OSMOfflineReverseGeocodingService,OSRMOfflineRoutingService,OnChangeListener,Options,OptionsListener,OrderedTileDataSource,PMTilesTileDataSource,PackageInfo,PackageManager,PackageManagerGeocodingService,PackageManagerListener,PackageManagerReverseGeocodingService,PackageManagerRoutingService,PackageManagerTileDataSource,PackageManagerValhallaRoutingService,PackageMetaInfo,PackageStatus,PackageTileMask,PeliasOnlineGeocodingService,PeliasOnlineReverseGeocodingService,PersistentCacheTileDataSource,PersistentTaskQueue,Point,PointDetailTileDataSource,PointGeometry,PointStyle,PointStyleBuilder,Polygon,Polygon3D,Polygon3DStyle,Polygon3DStyleBuilder,PolygonGeometry,PolygonStyle,PolygonStyleBuilder,Popup,PopupClickInfo,PopupDrawInfo,PopupStyle,PopupStyleBuilder,PostProcessEffect,Projection,RasterTileClickInfo,RasterTileEventListener,RasterTileLayer,RedrawRequestListener,RendererCaptureListener,ReverseGeocodingRequest,ReverseGeocodingService,RouteMatchingEdge,RouteMatchingPoint,RouteMatchingRequest,RouteMatchingResult,RoutingInstruction,RoutingRequest,RoutingResult,RoutingService,SGREOfflineRoutingService,ScreenBounds,ScreenPos,SearchRequest,SkyOptions,SolidLayer,Style,StyleBuilder,TerrainOptions,TerrariumElevationDataDecoder,Text,TextMargins,TextStyle,TextStyleBuilder,TileData,TileDataSource,TileDecoderListener,TileDownloadInfo,TileDownloadListener,TileInfo,TileLayer,TileLoadListener,TileUtils,TomTomOnlineGeocodingService,TomTomOnlineReverseGeocodingService,TouchHandlerListener,UTFGridClickInfo,UTFGridEventListener,UiDispatcher,ValhallaOfflineRoutingService,ValhallaOnlineRoutingService,Variant,VariantArrayBuilder,VariantObjectBuilder,VectorData,VectorDataSource,VectorEditEventListener,VectorElement,VectorElementClickInfo,VectorElementDragInfo,VectorElementEventListener,VectorElementSearchService,VectorLayer,VectorTileClickInfo,VectorTileDecoder,VectorTileEventListener,VectorTileFeature,VectorTileFeatureBuilder,VectorTileFeatureCollection,VectorTileLayer,VectorTileSearchService,ViewState,WKBGeometryReader,WKBGeometryWriter,WKTGeometryReader,WKTGeometryWriter,ZippedAssetPackage";
|
|
559
563
|
|
|
560
564
|
// ../../bindings/js/dist/resolve.js
|
|
561
565
|
var propCache = {};
|
|
@@ -1675,6 +1679,13 @@ function find(kind, id, className) {
|
|
|
1675
1679
|
function destroy(kind, id) {
|
|
1676
1680
|
return bridge.available ? bridge.unregisterObject(kind, id) : false;
|
|
1677
1681
|
}
|
|
1682
|
+
function createData(id, bytes) {
|
|
1683
|
+
const handle = bridge.createData(id, bytes instanceof Uint8Array ? bytes : new Uint8Array(bytes));
|
|
1684
|
+
if (!handle) {
|
|
1685
|
+
throw new MassifApiError(`could not create data "${id}": the id is taken or there are no bytes`);
|
|
1686
|
+
}
|
|
1687
|
+
return new MassifObject(handle, "massif::BinaryData", id);
|
|
1688
|
+
}
|
|
1678
1689
|
function wrap(handle, className, id) {
|
|
1679
1690
|
return new MassifObject(handle, className, id);
|
|
1680
1691
|
}
|
|
@@ -1828,6 +1839,23 @@ var MapCamera = class {
|
|
|
1828
1839
|
}
|
|
1829
1840
|
return this.moveTo(this.position(), { tilt: degrees });
|
|
1830
1841
|
}
|
|
1842
|
+
/**
|
|
1843
|
+
* What the old map view had as pan, zoom, rotate and tilt: relative to where the camera is now, one move
|
|
1844
|
+
* like `moveTo`, animated by `animate`. `panBy` is in degrees; rotation is positive clockwise.
|
|
1845
|
+
*/
|
|
1846
|
+
panBy(deltaLng, deltaLat) {
|
|
1847
|
+
const [lng, lat, alt] = this.position();
|
|
1848
|
+
return this.moveTo(alt === void 0 ? [lng + deltaLng, lat + deltaLat] : [lng + deltaLng, lat + deltaLat, alt]);
|
|
1849
|
+
}
|
|
1850
|
+
zoomBy(delta) {
|
|
1851
|
+
return this.zoom(this.zoom() + delta);
|
|
1852
|
+
}
|
|
1853
|
+
rotateBy(degrees) {
|
|
1854
|
+
return this.rotation(this.rotation() + degrees);
|
|
1855
|
+
}
|
|
1856
|
+
tiltBy(degrees) {
|
|
1857
|
+
return this.tilt(this.tilt() + degrees);
|
|
1858
|
+
}
|
|
1831
1859
|
/**
|
|
1832
1860
|
* Position, zoom, rotation and tilt in ONE move.
|
|
1833
1861
|
*
|
|
@@ -1857,6 +1885,10 @@ var MapCamera = class {
|
|
|
1857
1885
|
return this;
|
|
1858
1886
|
}
|
|
1859
1887
|
/** Whether a flight is running. */
|
|
1888
|
+
/** The map's renderer: where the post-process effect and the frame capture live. */
|
|
1889
|
+
renderer() {
|
|
1890
|
+
return this.view.child("mapRenderer");
|
|
1891
|
+
}
|
|
1860
1892
|
isMoving() {
|
|
1861
1893
|
return this.view.get("flightActive");
|
|
1862
1894
|
}
|
|
@@ -2113,6 +2145,13 @@ var MassifMap = class extends MassifObject {
|
|
|
2113
2145
|
return this;
|
|
2114
2146
|
}
|
|
2115
2147
|
/** The camera. See MapCamera - a move is a flight, not a property. */
|
|
2148
|
+
/**
|
|
2149
|
+
* The next rendered frame as PNG bytes, through the facade: it needs no object API. `wait` holds
|
|
2150
|
+
* the capture until the tiles have settled. Null when the capture failed or timed out.
|
|
2151
|
+
*/
|
|
2152
|
+
capturePng(wait = false) {
|
|
2153
|
+
return this.camera().renderer().callAsync("capturePNG", [wait], ((result) => result.getData("")));
|
|
2154
|
+
}
|
|
2116
2155
|
camera() {
|
|
2117
2156
|
if (!this.mCamera) {
|
|
2118
2157
|
const id = `${this.id}:view`;
|
|
@@ -2248,6 +2287,7 @@ function createBridge(module) {
|
|
|
2248
2287
|
doublesCount: fn("mm_doubles_count", "number", ["number", "number", "number"]),
|
|
2249
2288
|
doublesCopy: fn("mm_doubles_copy", "number", ["number", "number", "number", "number", "number"]),
|
|
2250
2289
|
dataSize: fn("mm_data_size", "number", ["number", "number", "string", "number"]),
|
|
2290
|
+
dataCreate: fn("mm_data_create", "number", ["number", "string", "number", "number", "number"]),
|
|
2251
2291
|
dataCopy: fn("mm_data_copy", "number", ["number", "number", "string", "number", "number", "number"]),
|
|
2252
2292
|
on: fn("mm_on", "number", ["number", "number", "string", "number", "number", "string", "number"]),
|
|
2253
2293
|
off: fn("mm_off", "number", ["number", "number"]),
|
|
@@ -2345,6 +2385,15 @@ function createBridge(module) {
|
|
|
2345
2385
|
}
|
|
2346
2386
|
return scratch(size, (buffer) => scratch(4, (copied) => c.dataCopy(ctx, handle, path, buffer, size, copied) === OK ? module.HEAPU8.slice(buffer, buffer + size).buffer : null));
|
|
2347
2387
|
},
|
|
2388
|
+
createData(id, bytes) {
|
|
2389
|
+
const pointer = module._malloc(bytes.length);
|
|
2390
|
+
try {
|
|
2391
|
+
module.HEAPU8.set(bytes, pointer);
|
|
2392
|
+
return scratch(4, (out) => c.dataCreate(ctx, id, pointer, bytes.length, out) === OK ? unsigned(out) : 0);
|
|
2393
|
+
} finally {
|
|
2394
|
+
module._free(pointer);
|
|
2395
|
+
}
|
|
2396
|
+
},
|
|
2348
2397
|
on(handle, event, handler, delivery, coalesce, projection) {
|
|
2349
2398
|
const pointer = module.addFunction((userData, target, eventName, payload) => handler(target >>> 0, module.UTF8ToString(eventName), payload >>> 0) ? 1 : 0, "iiiii");
|
|
2350
2399
|
const options = JSON.stringify({ delivery: DELIVERY_UI, coalesce: !!coalesce, ...projection ? { projection } : {} });
|
|
@@ -2517,6 +2566,7 @@ export {
|
|
|
2517
2566
|
attach,
|
|
2518
2567
|
canConsume,
|
|
2519
2568
|
create,
|
|
2569
|
+
createData,
|
|
2520
2570
|
createLayer,
|
|
2521
2571
|
createMap,
|
|
2522
2572
|
createSource,
|