@impargo/react-here-maps
Advanced tools
Comparing version 2.0.1 to 2.1.0
@@ -155,3 +155,3 @@ "use strict"; | ||
(0, react_1.useEffect)(function () { | ||
(0, cache_1.loadScripts)(secure).then(function () { | ||
(0, cache_1.loadScripts)(secure, !useVectorTiles).then(function () { | ||
if (unmountedRef.current) { | ||
@@ -181,2 +181,4 @@ return; | ||
center: center, | ||
// @ts-ignore | ||
engineType: useVectorTiles ? undefined : H.map.render.RenderEngine.EngineType.P2D, | ||
pixelRatio: hidpi ? 2 : (window.devicePixelRatio || 1), | ||
@@ -183,0 +185,0 @@ zoom: zoom |
@@ -12,2 +12,7 @@ /// <reference types="heremaps" /> | ||
style?: object; | ||
/** | ||
* This is only supported when using the legacy P2D engine (when not using vector tiles). | ||
* When using vector tiles and/or the new engine, use lineDash, lineHeadCap, and lineTailCap instead. | ||
*/ | ||
arrows?: object; | ||
onPointerMove?: (evt: H.mapevents.Event) => void; | ||
@@ -14,0 +19,0 @@ onPointerLeave?: (evt: H.mapevents.Event) => void; |
@@ -12,3 +12,3 @@ "use strict"; | ||
var Route = function (_a) { | ||
var _b = _a.style, style = _b === void 0 ? defaultMapStyles : _b, data = _a.data, zIndex = _a.zIndex, points = _a.points, onPointerMove = _a.onPointerMove, onPointerLeave = _a.onPointerLeave, onPointerEnter = _a.onPointerEnter, onTap = _a.onTap; | ||
var _b = _a.style, style = _b === void 0 ? defaultMapStyles : _b, arrows = _a.arrows, data = _a.data, zIndex = _a.zIndex, points = _a.points, onPointerMove = _a.onPointerMove, onPointerLeave = _a.onPointerLeave, onPointerEnter = _a.onPointerEnter, onTap = _a.onTap; | ||
var routesGroup = (0, react_1.useContext)(context_1.HEREMapContext).routesGroup; | ||
@@ -24,3 +24,3 @@ var _c = (0, react_1.useState)(null), polyline = _c[0], setPolyline = _c[1]; | ||
}); | ||
routeLine = new H.map.Polyline(route, { style: style, zIndex: zIndex, data: data }); | ||
routeLine = new H.map.Polyline(route, { style: style, arrows: arrows, zIndex: zIndex, data: data }); | ||
return routeLine; | ||
@@ -27,0 +27,0 @@ }; |
@@ -5,2 +5,2 @@ /** | ||
export declare const loadScriptsStandAlone: (secure?: boolean) => Promise<void>; | ||
export declare const loadScripts: (secure?: boolean) => Promise<void>; | ||
export declare const loadScripts: (secure?: boolean, loadLegacyModules?: boolean) => Promise<void>; |
@@ -73,10 +73,11 @@ "use strict"; | ||
}; | ||
var loadScripts = function (secure) { | ||
var loadScripts = function (secure, loadLegacyModules) { | ||
if (secure === void 0) { secure = true; } | ||
if (loadLegacyModules === void 0) { loadLegacyModules = true; } | ||
return __awaiter(void 0, void 0, void 0, function () { | ||
var _a, coreScript, scripts; | ||
var _a, coreScript, coreLegacyScript, serviceLegacyScript, scripts; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
_a = (0, get_script_map_1["default"])(secure), coreScript = _a.coreScript, scripts = __rest(_a, ["coreScript"]); | ||
_a = (0, get_script_map_1["default"])(secure), coreScript = _a.coreScript, coreLegacyScript = _a.coreLegacyScript, serviceLegacyScript = _a.serviceLegacyScript, scripts = __rest(_a, ["coreScript", "coreLegacyScript", "serviceLegacyScript"]); | ||
if (!!loadjs_1["default"].isDefined("mapsjs-core")) return [3 /*break*/, 2]; | ||
@@ -95,3 +96,9 @@ // Make sure this is loaded before the others | ||
_b.label = 4; | ||
case 4: return [2 /*return*/]; | ||
case 4: | ||
if (!(loadLegacyModules && !loadjs_1["default"].isDefined("mapsjs-legacy"))) return [3 /*break*/, 6]; | ||
return [4 /*yield*/, (0, loadjs_1["default"])([coreLegacyScript, serviceLegacyScript], "mapsjs-legacy", loadJsDefaultOptions)]; | ||
case 5: | ||
_b.sent(); | ||
_b.label = 6; | ||
case 6: return [2 /*return*/]; | ||
} | ||
@@ -98,0 +105,0 @@ }); |
@@ -18,4 +18,8 @@ "use strict"; | ||
var coreScript = "".concat(baseUrl, "/mapsjs-core.js"); | ||
// core legacy code | ||
var coreLegacyScript = "".concat(baseUrl, "/mapsjs-core-legacy.js"); | ||
// service code | ||
var serviceScript = "".concat(baseUrl, "/mapsjs-service.js"); | ||
// service legacy code | ||
var serviceLegacyScript = "".concat(baseUrl, "/mapsjs-service-legacy.js"); | ||
// default ui code | ||
@@ -32,4 +36,6 @@ var uiScript = "".concat(baseUrl, "/mapsjs-ui.js"); | ||
clusteringScript: clusteringScript, | ||
coreLegacyScript: coreLegacyScript, | ||
coreScript: coreScript, | ||
mapEventsScript: mapEventsScript, | ||
serviceLegacyScript: serviceLegacyScript, | ||
serviceScript: serviceScript, | ||
@@ -36,0 +42,0 @@ uiCss: uiCss, |
{ | ||
"name": "@impargo/react-here-maps", | ||
"version": "2.0.1", | ||
"version": "2.1.0", | ||
"description": "React.js HERE Maps component", | ||
@@ -5,0 +5,0 @@ "main": "dist/main.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
80181
1279
0