@rio-cloud/rio-uikit 0.16.2-beta.8 → 0.16.2
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/.DS_Store +0 -0
- package/AspectRatioPlaceholder.js +2 -0
- package/AspectRatioPlaceholder.ts +5 -0
- package/Map.d.ts +2 -1
- package/ResponsiveColumnStripe.d.ts +5 -0
- package/ResponsiveColumnStripe.js +2 -0
- package/RuleConnector.d.ts +2 -1
- package/RuleContainer.d.ts +3 -2
- package/RulesWrapper.d.ts +2 -1
- package/components/activity/Activity.js +6 -4
- package/components/animatedNumber/AnimatedNumber.js +6 -4
- package/components/applicationHeader/AppMenu.js +6 -3
- package/components/applicationHeader/AppMenuDropdown.js +6 -2
- package/components/applicationHeader/ApplicationHeader.js +16 -8
- package/components/applicationHeader/MobileAppMenu.js +8 -4
- package/components/applicationLayout/ApplicationLayout.js +8 -8
- package/components/applicationLayout/ApplicationLayoutBody.js +6 -3
- package/components/applicationLayout/ApplicationLayoutBodyBanner.js +4 -3
- package/components/applicationLayout/ApplicationLayoutBodyBottomBar.js +6 -4
- package/components/applicationLayout/ApplicationLayoutBodyNavigation.js +6 -4
- package/components/applicationLayout/ApplicationLayoutHeader.js +9 -7
- package/components/aspectRatioPlaceholder/AspectRatioPlaceholder.js +25 -0
- package/components/assetTree/AssetTree.js +6 -3
- package/components/assetTree/TypeCounter.js +6 -4
- package/components/clearableInput/ClearableInput.js +2 -1
- package/components/datepicker/DatePicker.js +8 -4
- package/components/dialog/MediaDialog.js +5 -1
- package/components/dialog/SaveDialog.js +5 -2
- package/components/fade/Fade.js +5 -0
- package/components/filepicker/FilePicker.js +1 -1
- package/components/map/assets/icon_map_settings_bounding_box_active.svg +1 -1
- package/components/map/assets/icon_map_settings_bounding_box_inactive.svg +1 -1
- package/components/map/assets/icon_map_settings_construction_active.svg +1 -1
- package/components/map/assets/icon_map_settings_construction_inactive.svg +1 -1
- package/components/map/assets/icon_map_settings_layer_active.svg +1 -1
- package/components/map/assets/icon_map_settings_layer_inactive.svg +1 -1
- package/components/map/assets/icon_map_settings_maptype_flat_active.svg +1 -1
- package/components/map/assets/icon_map_settings_maptype_flat_inactive.svg +1 -1
- package/components/map/assets/icon_map_settings_maptype_flat_truck_active.svg +1 -1
- package/components/map/assets/icon_map_settings_maptype_flat_truck_inactive.svg +1 -1
- package/components/map/assets/icon_map_settings_maptype_night_active.svg +1 -12
- package/components/map/assets/icon_map_settings_maptype_night_inactive.svg +1 -12
- package/components/map/assets/icon_map_settings_maptype_satelite_active.svg +1 -1
- package/components/map/assets/icon_map_settings_maptype_satelite_inactive.svg +1 -1
- package/components/map/assets/icon_map_settings_maptype_terrain_active.svg +1 -1
- package/components/map/assets/icon_map_settings_maptype_terrain_inactive.svg +1 -1
- package/components/map/assets/icon_map_settings_road_restrictions_active.svg +1 -1
- package/components/map/assets/icon_map_settings_road_restrictions_inactive.svg +1 -1
- package/components/map/assets/icon_map_settings_system_pois_active.svg +1 -1
- package/components/map/assets/icon_map_settings_system_pois_inactive.svg +1 -1
- package/components/map/assets/icon_map_settings_workshop_pois_active.svg +1 -1
- package/components/map/assets/icon_map_settings_workshop_pois_inactive.svg +1 -1
- package/components/map/components/Map.js +47 -36
- package/components/map/components/features/ContextMenu.js +1 -1
- package/components/map/components/features/Route.js +1 -10
- package/components/map/components/features/basics/Circle.js +11 -6
- package/components/map/components/features/basics/MapLayerGroup.js +8 -5
- package/components/map/components/features/basics/Polygon.js +6 -5
- package/components/map/components/features/basics/Polyline.js +42 -40
- package/components/map/components/features/basics/marker/DomMarker.js +9 -3
- package/components/map/components/features/basics/marker/Marker.js +101 -121
- package/components/map/components/features/basics/marker/TextMarker.js +15 -43
- package/components/map/components/features/layers/Layer.js +1 -1
- package/components/map/components/features/layers/MarkerLayer.js +7 -4
- package/components/map/components/features/layers/RoadRestrictionLayer.js +1 -2
- package/components/map/components/features/layers/TrafficLayer.js +2 -2
- package/components/map/components/features/layers/baselayers/DefaultRasterLayer.js +2 -1
- package/components/map/components/features/layers/baselayers/useBaseLayer.js +4 -1
- package/components/map/components/features/layers/clustering/ClusterLayer.js +25 -9
- package/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +18 -3
- package/components/map/icons/MapIcon.js +46 -66
- package/components/map/utils/hooks.js +3 -3
- package/components/mapMarker/ClusterMapMarker.js +16 -20
- package/components/mapMarker/SingleMapMarker.js +16 -30
- package/components/numberControl/NumberControl.js +13 -7
- package/components/numberInput/NumberInput.js +30 -12
- package/components/responsiveColumnStripe/ResponsiveColumnStripe.js +255 -0
- package/components/rules/RuleContainer.js +4 -0
- package/components/rules/RulesWrapper.js +3 -3
- package/hooks/useDarkMode.js +3 -2
- package/hooks/useMutationObserver.js +13 -4
- package/hooks/useScrollPosition.js +6 -7
- package/index.d.ts +29 -29
- package/index.js +4 -0
- package/lib/es/AspectRatioPlaceholder.js +13 -0
- package/lib/es/AspectRatioPlaceholder.ts +5 -0
- package/lib/es/Map.d.ts +2 -1
- package/lib/es/ResponsiveColumnStripe.d.ts +5 -0
- package/lib/es/ResponsiveColumnStripe.js +13 -0
- package/lib/es/RuleConnector.d.ts +2 -1
- package/lib/es/RuleContainer.d.ts +3 -2
- package/lib/es/RulesWrapper.d.ts +2 -1
- package/lib/es/components/activity/Activity.js +9 -4
- package/lib/es/components/animatedNumber/AnimatedNumber.js +5 -3
- package/lib/es/components/applicationHeader/AppMenu.js +6 -3
- package/lib/es/components/applicationHeader/AppMenuDropdown.js +6 -2
- package/lib/es/components/applicationHeader/ApplicationHeader.js +15 -7
- package/lib/es/components/applicationHeader/MobileAppMenu.js +8 -4
- package/lib/es/components/applicationLayout/ApplicationLayout.js +11 -8
- package/lib/es/components/applicationLayout/ApplicationLayoutBody.js +5 -2
- package/lib/es/components/applicationLayout/ApplicationLayoutBodyBanner.js +7 -3
- package/lib/es/components/applicationLayout/ApplicationLayoutBodyBottomBar.js +9 -4
- package/lib/es/components/applicationLayout/ApplicationLayoutBodyNavigation.js +9 -4
- package/lib/es/components/applicationLayout/ApplicationLayoutHeader.js +12 -7
- package/lib/es/components/aspectRatioPlaceholder/AspectRatioPlaceholder.js +33 -0
- package/lib/es/components/assetTree/AssetTree.js +5 -2
- package/lib/es/components/assetTree/TypeCounter.js +9 -4
- package/lib/es/components/clearableInput/ClearableInput.js +2 -1
- package/lib/es/components/datepicker/DatePicker.js +7 -3
- package/lib/es/components/dialog/MediaDialog.js +5 -1
- package/lib/es/components/dialog/SaveDialog.js +5 -2
- package/lib/es/components/fade/Fade.js +5 -0
- package/lib/es/components/filepicker/FilePicker.js +1 -1
- package/lib/es/components/map/assets/icon_map_settings_bounding_box_active.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_bounding_box_inactive.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_construction_active.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_construction_inactive.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_layer_active.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_layer_inactive.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_maptype_flat_active.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_maptype_flat_inactive.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_maptype_flat_truck_active.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_maptype_flat_truck_inactive.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_maptype_night_active.svg +1 -12
- package/lib/es/components/map/assets/icon_map_settings_maptype_night_inactive.svg +1 -12
- package/lib/es/components/map/assets/icon_map_settings_maptype_satelite_active.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_maptype_satelite_inactive.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_maptype_terrain_active.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_maptype_terrain_inactive.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_road_restrictions_active.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_road_restrictions_inactive.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_system_pois_active.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_system_pois_inactive.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_workshop_pois_active.svg +1 -1
- package/lib/es/components/map/assets/icon_map_settings_workshop_pois_inactive.svg +1 -1
- package/lib/es/components/map/components/Map.js +47 -36
- package/lib/es/components/map/components/features/ContextMenu.js +1 -1
- package/lib/es/components/map/components/features/Route.js +1 -10
- package/lib/es/components/map/components/features/basics/Circle.js +10 -5
- package/lib/es/components/map/components/features/basics/MapLayerGroup.js +8 -5
- package/lib/es/components/map/components/features/basics/Polygon.js +6 -5
- package/lib/es/components/map/components/features/basics/Polyline.js +42 -42
- package/lib/es/components/map/components/features/basics/marker/DomMarker.js +8 -3
- package/lib/es/components/map/components/features/basics/marker/Marker.js +105 -120
- package/lib/es/components/map/components/features/basics/marker/TextMarker.js +15 -42
- package/lib/es/components/map/components/features/layers/Layer.js +1 -1
- package/lib/es/components/map/components/features/layers/MarkerLayer.js +7 -4
- package/lib/es/components/map/components/features/layers/RoadRestrictionLayer.js +1 -2
- package/lib/es/components/map/components/features/layers/TrafficLayer.js +2 -2
- package/lib/es/components/map/components/features/layers/baselayers/DefaultRasterLayer.js +2 -1
- package/lib/es/components/map/components/features/layers/baselayers/useBaseLayer.js +4 -1
- package/lib/es/components/map/components/features/layers/clustering/ClusterLayer.js +25 -9
- package/lib/es/components/map/components/features/settings/builtinSettings/MapTypeSettings.js +18 -3
- package/lib/es/components/map/icons/MapIcon.js +46 -66
- package/lib/es/components/map/utils/hooks.js +3 -3
- package/lib/es/components/mapMarker/ClusterMapMarker.js +16 -20
- package/lib/es/components/mapMarker/SingleMapMarker.js +16 -30
- package/lib/es/components/numberControl/NumberControl.js +13 -7
- package/lib/es/components/numberInput/NumberInput.js +31 -12
- package/lib/es/components/responsiveColumnStripe/ResponsiveColumnStripe.js +266 -0
- package/lib/es/components/rules/RuleContainer.js +4 -0
- package/lib/es/components/rules/RulesWrapper.js +3 -3
- package/lib/es/hooks/useDarkMode.js +4 -3
- package/lib/es/hooks/useMutationObserver.js +15 -4
- package/lib/es/hooks/useScrollPosition.js +6 -7
- package/lib/es/index.d.ts +29 -29
- package/lib/es/index.js +24 -0
- package/lib/es/styles/components/Dialog.less +13 -10
- package/lib/es/styles/components/MapMarker.less +224 -14
- package/lib/es/styles/components/MapSettings.less +45 -29
- package/lib/es/styles/components/Notification.less +1 -1
- package/lib/es/styles/design/alerts.less +7 -9
- package/lib/es/styles/design/aspect-ratio.less +1 -0
- package/lib/es/styles/design/blur.less +7 -0
- package/lib/es/styles/design/border.less +51 -14
- package/lib/es/styles/design/callouts.less +12 -11
- package/lib/es/styles/design/colors.less +15 -6
- package/lib/es/styles/design/cols.less +19 -18
- package/lib/es/styles/design/divide.less +165 -0
- package/lib/es/styles/design/divider.less +90 -0
- package/lib/es/styles/design/responsive/_imports.less +1 -0
- package/lib/es/styles/design/responsive/gap.less +0 -8
- package/lib/es/styles/design/responsive/spacing.less +25 -0
- package/lib/es/styles/design/text.less +16 -2
- package/lib/es/styles/mapping/color-map.less +10 -0
- package/lib/es/styles/mapping/spacings-map.less +5 -0
- package/lib/es/styles/rio-uikit-core.less +2 -0
- package/lib/es/styles/variables/colors.json +6 -0
- package/lib/es/styles/variables/concated_css_variables.less +6 -0
- package/lib/es/styles/variables/dark_colors.less +7 -0
- package/lib/es/styles/variables/dark_css_variables_map.less +7 -0
- package/lib/es/styles/variables/light_colors.less +7 -0
- package/lib/es/styles/variables/light_css_variables_map.less +7 -0
- package/lib/es/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js +14 -5
- package/lib/es/types.ts +69 -23
- package/lib/es/useDarkMode.d.ts +4 -0
- package/lib/es/useDarkMode.js +13 -0
- package/lib/es/useMutationObserver.d.ts +4 -0
- package/lib/es/useMutationObserver.js +13 -0
- package/lib/es/version.json +1 -1
- package/package.json +2 -2
- package/styles/components/Dialog.less +13 -10
- package/styles/components/MapMarker.less +224 -14
- package/styles/components/MapSettings.less +45 -29
- package/styles/components/Notification.less +1 -1
- package/styles/design/alerts.less +7 -9
- package/styles/design/aspect-ratio.less +1 -0
- package/styles/design/blur.less +7 -0
- package/styles/design/border.less +51 -14
- package/styles/design/callouts.less +12 -11
- package/styles/design/colors.less +15 -6
- package/styles/design/cols.less +19 -18
- package/styles/design/divide.less +165 -0
- package/styles/design/divider.less +90 -0
- package/styles/design/responsive/_imports.less +1 -0
- package/styles/design/responsive/gap.less +0 -8
- package/styles/design/responsive/spacing.less +25 -0
- package/styles/design/text.less +16 -2
- package/styles/mapping/color-map.less +10 -0
- package/styles/mapping/spacings-map.less +5 -0
- package/styles/rio-uikit-core.less +2 -0
- package/styles/variables/colors.json +6 -0
- package/styles/variables/concated_css_variables.less +6 -0
- package/styles/variables/dark_colors.less +7 -0
- package/styles/variables/dark_css_variables_map.less +7 -0
- package/styles/variables/light_colors.less +7 -0
- package/styles/variables/light_css_variables_map.less +7 -0
- package/themes/Volkswagen/components/applicationHeader/VolkswagenApplicationHeader.js +15 -6
- package/types.ts +69 -23
- package/useDarkMode.d.ts +4 -0
- package/useDarkMode.js +2 -0
- package/useMutationObserver.d.ts +4 -0
- package/useMutationObserver.js +2 -0
- package/version.json +1 -1
- package/components/.DS_Store +0 -0
- package/components/map/.DS_Store +0 -0
- package/components/map/components/.DS_Store +0 -0
- package/components/map/components/features/layers/TruckLayer.js +0 -20
- package/components/map/components/features/layers/baselayers/BaseLayer.js +0 -33
- package/components/map/components/features/layers/baselayers/DefaultLayer.js +0 -23
- package/hooks/useHereMap.ts +0 -23
- package/hooks/useScripts.ts +0 -52
- package/lib/.DS_Store +0 -0
- package/lib/es/.DS_Store +0 -0
- package/lib/es/components/.DS_Store +0 -0
- package/lib/es/components/map/components/features/layers/TruckLayer.js +0 -28
- package/lib/es/components/map/components/features/layers/baselayers/BaseLayer.js +0 -41
- package/lib/es/components/map/components/features/layers/baselayers/DefaultLayer.js +0 -30
- package/lib/es/hooks/useHereMap.ts +0 -23
- package/lib/es/hooks/useScripts.ts +0 -52
- package/lib/es/styles/.DS_Store +0 -0
- package/lib/es/styles/mixins/_mixins.less +0 -13
- package/lib/es/styles/mixins/alerts.less +0 -13
- package/lib/es/styles/shared/colors.json +0 -56
- package/lib/es/styles/shared/colors.less +0 -73
- package/lib/es/styles/shared/screens.less +0 -7
- package/lib/es/styles/shared/text.less +0 -23
- package/lib/es/styles/variables.less +0 -186
- package/lib/es/themes/.DS_Store +0 -0
- package/styles/.DS_Store +0 -0
- package/styles/mixins/_mixins.less +0 -13
- package/styles/mixins/alerts.less +0 -13
- package/styles/shared/colors.json +0 -56
- package/styles/shared/colors.less +0 -73
- package/styles/shared/screens.less +0 -7
- package/styles/shared/text.less +0 -23
- package/styles/variables.less +0 -186
- package/themes/.DS_Store +0 -0
- package/themes/Volkswagen/.DS_Store +0 -0
- package/themes/Website/.DS_Store +0 -0
|
@@ -10,6 +10,7 @@ import isFunction from 'lodash/fp/isFunction';
|
|
|
10
10
|
import map from 'lodash/fp/map';
|
|
11
11
|
import isEmpty from 'lodash/fp/isEmpty';
|
|
12
12
|
import throttle from 'lodash/fp/throttle';
|
|
13
|
+
import cloneDeep from 'lodash/fp/cloneDeep';
|
|
13
14
|
import mapProps from '../utils/proptypes';
|
|
14
15
|
import addEventListener from '../../../utils/addEventListener';
|
|
15
16
|
import '../herePolyfill';
|
|
@@ -28,7 +29,7 @@ import { getDefaultBaseLayer } from './features/layers/baselayers/useBaseLayer';
|
|
|
28
29
|
import { addEventListenerMap, removeEventListenerMap } from '../utils/eventHandling';
|
|
29
30
|
import { MapContext, MapSettingsContext } from './context';
|
|
30
31
|
import { createUtils, getPPI } from './mapUtils';
|
|
31
|
-
import
|
|
32
|
+
import useDarkMode from '../../../hooks/useDarkMode';
|
|
32
33
|
export var NO_CREDENTIALS_ERROR_MESSAGE = 'Cannot instantiate the Map. Missing credentials property.';
|
|
33
34
|
var RESIZE_THROTTLE = 1100; // 100 more than the ApplicationLayout handler
|
|
34
35
|
|
|
@@ -59,14 +60,14 @@ var getBounds = function getBounds(boundingBox) {
|
|
|
59
60
|
right = boundingBox.right;
|
|
60
61
|
return new H.geo.Rect(top, left, bottom, right);
|
|
61
62
|
};
|
|
62
|
-
var getLayer = function getLayer(api, layer, language,
|
|
63
|
+
var getLayer = function getLayer(api, layer, language, enableWebGL) {
|
|
63
64
|
switch (layer) {
|
|
64
65
|
case MAP_LAYER_TRAFFIC:
|
|
65
66
|
return /*#__PURE__*/React.createElement(TrafficLayer, {
|
|
66
67
|
api: api,
|
|
67
68
|
language: language,
|
|
68
69
|
key: layer,
|
|
69
|
-
useWebGL:
|
|
70
|
+
useWebGL: enableWebGL
|
|
70
71
|
});
|
|
71
72
|
case MAP_LAYER_INCIDENTS:
|
|
72
73
|
return /*#__PURE__*/React.createElement(IncidentsLayer, {
|
|
@@ -79,17 +80,17 @@ var getLayer = function getLayer(api, layer, language, useWebGL) {
|
|
|
79
80
|
api: api,
|
|
80
81
|
language: language,
|
|
81
82
|
key: layer,
|
|
82
|
-
useWebGL:
|
|
83
|
+
useWebGL: enableWebGL
|
|
83
84
|
});
|
|
84
85
|
default:
|
|
85
86
|
null;
|
|
86
87
|
}
|
|
87
88
|
};
|
|
88
|
-
var getBaseLayer = function getBaseLayer(api, baseLayer, language,
|
|
89
|
+
var getBaseLayer = function getBaseLayer(api, baseLayer, language, enableWebGL, darkMode) {
|
|
89
90
|
switch (baseLayer) {
|
|
90
91
|
case MAP_TYPE_DEFAULT:
|
|
91
92
|
{
|
|
92
|
-
return !darkMode &&
|
|
93
|
+
return !darkMode && enableWebGL ? /*#__PURE__*/React.createElement(DefaultVectorLayer, {
|
|
93
94
|
api: api,
|
|
94
95
|
language: language,
|
|
95
96
|
key: baseLayer
|
|
@@ -173,7 +174,8 @@ var Map = function Map(props) {
|
|
|
173
174
|
onZoomOut = props.onZoomOut,
|
|
174
175
|
mapSettingsTooltip = props.mapSettingsTooltip,
|
|
175
176
|
mapSettings = props.mapSettings,
|
|
176
|
-
|
|
177
|
+
enableWebGL = props.enableWebGL,
|
|
178
|
+
enableDevicePixelRatio = props.enableDevicePixelRatio,
|
|
177
179
|
darkMode = props.darkMode;
|
|
178
180
|
var mapRef = useRef(null);
|
|
179
181
|
var _useState = useState(false),
|
|
@@ -196,33 +198,22 @@ var Map = function Map(props) {
|
|
|
196
198
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
197
199
|
showCluster = _useState10[0],
|
|
198
200
|
setShowCluster = _useState10[1];
|
|
199
|
-
var
|
|
200
|
-
useEffect(function () {
|
|
201
|
-
// Toggle night map only if current map type is default
|
|
202
|
-
if (isDarkMode && baseLayer === MAP_TYPE_DEFAULT) {
|
|
203
|
-
setBaseLayer(MAP_TYPE_NIGHT);
|
|
204
|
-
onMapTypeChange(MAP_TYPE_NIGHT);
|
|
205
|
-
}
|
|
206
|
-
// Toggle back to default map only if current map type is night
|
|
207
|
-
else if (!isDarkMode && baseLayer === MAP_TYPE_NIGHT) {
|
|
208
|
-
setBaseLayer(MAP_TYPE_DEFAULT);
|
|
209
|
-
onMapTypeChange(MAP_TYPE_DEFAULT);
|
|
210
|
-
}
|
|
211
|
-
}, [isDarkMode]);
|
|
212
|
-
var devicePixelRatio = window.devicePixelRatio || 1;
|
|
201
|
+
var devicePixelRatio = enableDevicePixelRatio ? window.devicePixelRatio || 1 : 1;
|
|
213
202
|
useEffect(function () {
|
|
214
203
|
console.debug('initialize here map');
|
|
215
204
|
var bounds = boundingBox && getBounds(boundingBox);
|
|
216
205
|
var platform = getPlatform(credentials);
|
|
217
206
|
var defaultLayers = platform.createDefaultLayers();
|
|
218
|
-
var defaultLayer = getDefaultBaseLayer(defaultLayers, baseLayer,
|
|
207
|
+
var defaultLayer = getDefaultBaseLayer(defaultLayers, baseLayer, enableWebGL);
|
|
219
208
|
|
|
220
209
|
// Instantiate (and display) a map object:
|
|
221
210
|
var mapConfig = {
|
|
222
211
|
zoom: zoom,
|
|
223
212
|
center: center,
|
|
224
213
|
bounds: bounds,
|
|
225
|
-
pixelRatio: devicePixelRatio
|
|
214
|
+
pixelRatio: devicePixelRatio,
|
|
215
|
+
// need to be set for better performence of legacy map
|
|
216
|
+
engineType: enableWebGL ? undefined : H.map.render.RenderEngine.EngineType.P2D
|
|
226
217
|
};
|
|
227
218
|
var hereMap = new H.Map(mapRef.current, defaultLayer, mapConfig);
|
|
228
219
|
|
|
@@ -237,10 +228,12 @@ var Map = function Map(props) {
|
|
|
237
228
|
var hereMapEvents = !disableMapEvents && new H.mapevents.MapEvents(hereMap);
|
|
238
229
|
var hereBehavior = !(disableMapEvents || disableBehavior) && new H.mapevents.Behavior(hereMapEvents);
|
|
239
230
|
addEventListenerMap(hereMap, eventListenerMap, hereMap);
|
|
231
|
+
|
|
232
|
+
// The api will be passed to services when using a render function.
|
|
233
|
+
// This allows the service to access the map internals
|
|
240
234
|
setApi({
|
|
241
235
|
credentials: credentials,
|
|
242
236
|
defaultLayers: defaultLayers,
|
|
243
|
-
group: hereMap,
|
|
244
237
|
map: hereMap,
|
|
245
238
|
mapEvents: hereMapEvents,
|
|
246
239
|
behavior: hereBehavior,
|
|
@@ -248,6 +241,7 @@ var Map = function Map(props) {
|
|
|
248
241
|
ui: getHereUi(hereMap, defaultLayers, showScaleBar),
|
|
249
242
|
utils: createUtils(hereMap),
|
|
250
243
|
settings: {
|
|
244
|
+
enableWebGL: enableWebGL,
|
|
251
245
|
baseLayer: baseLayer,
|
|
252
246
|
mapLayer: activeLayers,
|
|
253
247
|
showCluster: showCluster
|
|
@@ -268,7 +262,18 @@ var Map = function Map(props) {
|
|
|
268
262
|
hereMap.dispose();
|
|
269
263
|
}
|
|
270
264
|
};
|
|
271
|
-
}, [
|
|
265
|
+
}, [enableWebGL, enableDevicePixelRatio]);
|
|
266
|
+
var isDarkMode = useDarkMode();
|
|
267
|
+
useEffect(function () {
|
|
268
|
+
// Toggle night map only if current map type is default
|
|
269
|
+
if (isDarkMode && baseLayer === MAP_TYPE_DEFAULT) {
|
|
270
|
+
handleMapTypeChange(MAP_TYPE_NIGHT);
|
|
271
|
+
}
|
|
272
|
+
// Toggle back to default map only if current map type is night
|
|
273
|
+
else if (!isDarkMode && baseLayer === MAP_TYPE_NIGHT) {
|
|
274
|
+
handleMapTypeChange(MAP_TYPE_DEFAULT);
|
|
275
|
+
}
|
|
276
|
+
}, [isDarkMode]);
|
|
272
277
|
|
|
273
278
|
// Update BoundingBox from outside
|
|
274
279
|
useEffect(function () {
|
|
@@ -307,7 +312,7 @@ var Map = function Map(props) {
|
|
|
307
312
|
|
|
308
313
|
// Update MapType from outside
|
|
309
314
|
useEffect(function () {
|
|
310
|
-
return
|
|
315
|
+
return handleMapTypeChange(mapType);
|
|
311
316
|
}, [mapType]);
|
|
312
317
|
|
|
313
318
|
// Update MapLayer from outside
|
|
@@ -322,11 +327,13 @@ var Map = function Map(props) {
|
|
|
322
327
|
var handleMapTypeChange = function handleMapTypeChange(newMapType) {
|
|
323
328
|
setBaseLayer(newMapType);
|
|
324
329
|
onMapTypeChange(newMapType, mapType);
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
+
if (api) {
|
|
331
|
+
setApi(_objectSpread(_objectSpread({}, api), {}, {
|
|
332
|
+
settings: _objectSpread(_objectSpread({}, api.settings), {}, {
|
|
333
|
+
baseLayer: newMapType
|
|
334
|
+
})
|
|
335
|
+
}));
|
|
336
|
+
}
|
|
330
337
|
};
|
|
331
338
|
var handleMapLayerChange = function handleMapLayerChange(layer) {
|
|
332
339
|
var removeLayer = function removeLayer(layerToRemove) {
|
|
@@ -372,7 +379,9 @@ var Map = function Map(props) {
|
|
|
372
379
|
style: style,
|
|
373
380
|
ref: mapRef
|
|
374
381
|
}, isMapInitialized && /*#__PURE__*/React.createElement(MapContext.Provider, {
|
|
375
|
-
value:
|
|
382
|
+
value: {
|
|
383
|
+
api: api
|
|
384
|
+
}
|
|
376
385
|
}, !hideZoomButtons && /*#__PURE__*/React.createElement(ZoomButtons, {
|
|
377
386
|
onZoomIn: handleZoomIn,
|
|
378
387
|
onZoomOut: handleZoomOut
|
|
@@ -388,8 +397,8 @@ var Map = function Map(props) {
|
|
|
388
397
|
onShowClusterChange: handleShowClusterChange,
|
|
389
398
|
mapSettingsTooltip: mapSettingsTooltip
|
|
390
399
|
}
|
|
391
|
-
}, mapSettings), getBaseLayer(api, baseLayer, language,
|
|
392
|
-
return getLayer(api, layer, language,
|
|
400
|
+
}, mapSettings), getBaseLayer(api, baseLayer, language, enableWebGL, darkMode), map(function (layer) {
|
|
401
|
+
return getLayer(api, layer, language, enableWebGL);
|
|
393
402
|
}, activeLayers), children && /*#__PURE__*/React.createElement("div", {
|
|
394
403
|
className: 'MapElements'
|
|
395
404
|
}, isFunction(children) ? children(api) : enrichChildrenWithApi(children, api))));
|
|
@@ -417,7 +426,8 @@ Map.defaultProps = {
|
|
|
417
426
|
onShowClusterChange: function onShowClusterChange() {},
|
|
418
427
|
onZoomIn: function onZoomIn() {},
|
|
419
428
|
onZoomOut: function onZoomOut() {},
|
|
420
|
-
|
|
429
|
+
enableWebGL: true,
|
|
430
|
+
enableDevicePixelRatio: true,
|
|
421
431
|
darkMode: false
|
|
422
432
|
};
|
|
423
433
|
Map.propTypes = {
|
|
@@ -446,7 +456,8 @@ Map.propTypes = {
|
|
|
446
456
|
getApi: PropTypes.func,
|
|
447
457
|
mapSettingsTooltip: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
|
|
448
458
|
mapSettings: PropTypes.node,
|
|
449
|
-
|
|
459
|
+
enableWebGL: PropTypes.bool,
|
|
460
|
+
enableDevicePixelRatio: PropTypes.bool,
|
|
450
461
|
darkMode: PropTypes.bool
|
|
451
462
|
};
|
|
452
463
|
export default Map;
|
|
@@ -80,7 +80,7 @@ var ContextMenu = function ContextMenu(props) {
|
|
|
80
80
|
contextMenuEvent = props.contextMenuEvent,
|
|
81
81
|
targetPosition = props.targetPosition;
|
|
82
82
|
var mapContext = useContext(MapContext);
|
|
83
|
-
var _ref = api || mapContext,
|
|
83
|
+
var _ref = api || mapContext.api,
|
|
84
84
|
hereMap = _ref.map;
|
|
85
85
|
|
|
86
86
|
// Use a ref to store the target position used when a map object was clicked with a fixed
|
|
@@ -15,7 +15,6 @@ export var MISSING_POSITIONS_EXCEPTION_MSG = 'Route requires a minimum of 1 posi
|
|
|
15
15
|
export var TO_LESS_LINE_WIDTH_EXCEPTION_MSG = 'If isBorderIncludedInWidth is set to true than width has to be greater than twice of borderWidth';
|
|
16
16
|
var LINE_STROKE_COLOR = 'rgba(48, 194, 255, 1)';
|
|
17
17
|
var LINE_STROKE_COLOR_REDUCED = 'rgba(48, 194, 255, 0.5)';
|
|
18
|
-
var BORDER_STROKE_COLOR = 'rgba(255, 255, 255, 1)';
|
|
19
18
|
var BORDER_STROKE_COLOR_REDUCED = 'rgba(255, 255, 255, 0)';
|
|
20
19
|
var defaultStyle = {
|
|
21
20
|
width: 5,
|
|
@@ -24,14 +23,6 @@ var defaultStyle = {
|
|
|
24
23
|
borderColor: 'rgba(54, 144, 174, 1)',
|
|
25
24
|
isBorderIncludedInWidth: false
|
|
26
25
|
};
|
|
27
|
-
var defaultArrowStyle = {
|
|
28
|
-
lineWidth: 10,
|
|
29
|
-
fillColor: 'rgba(42, 55, 64, 1)',
|
|
30
|
-
strokeColor: BORDER_STROKE_COLOR,
|
|
31
|
-
lineDash: [0, 6],
|
|
32
|
-
lineTailCap: 'arrow-tail',
|
|
33
|
-
lineHeadCap: 'arrow-head'
|
|
34
|
-
};
|
|
35
26
|
var alternativeRouteStyle = _objectSpread(_objectSpread({}, defaultStyle), {}, {
|
|
36
27
|
color: 'rgb(218,253,255)'
|
|
37
28
|
});
|
|
@@ -144,7 +135,7 @@ var Route = function Route(props) {
|
|
|
144
135
|
};
|
|
145
136
|
Route.defaultProps = {
|
|
146
137
|
hasArrows: true,
|
|
147
|
-
arrowStyle:
|
|
138
|
+
arrowStyle: {},
|
|
148
139
|
isReduced: false,
|
|
149
140
|
isRouteAlternative: false,
|
|
150
141
|
markers: []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
/* eslint-disable no-undef */
|
|
3
|
-
import { useContext, useState, useEffect } from 'react';
|
|
3
|
+
import { useContext, useState, useEffect, useRef } from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import mapProps from '../../../utils/proptypes';
|
|
6
6
|
import { MapContext } from '../../context';
|
|
@@ -13,25 +13,30 @@ var Circle = function Circle(_ref) {
|
|
|
13
13
|
precision = _ref$precision === void 0 ? 60 : _ref$precision,
|
|
14
14
|
style = _ref.style,
|
|
15
15
|
eventListenerMap = _ref.eventListenerMap;
|
|
16
|
-
var
|
|
16
|
+
var _useContext = useContext(MapContext),
|
|
17
|
+
api = _useContext.api;
|
|
17
18
|
var _useState = useState(),
|
|
18
19
|
_useState2 = _slicedToArray(_useState, 2),
|
|
19
20
|
circle = _useState2[0],
|
|
20
21
|
setCircle = _useState2[1];
|
|
22
|
+
|
|
23
|
+
// Create a new circle and check for changes on the map itself.
|
|
24
|
+
// The map instance may change due to rendering changes like webgl vs raster.
|
|
25
|
+
// In this case, add the circle to the new map instance otherwise it will be gone.
|
|
21
26
|
useEffect(function () {
|
|
22
27
|
var newCircle = new H.map.Circle(position, radius, {
|
|
23
28
|
style: style,
|
|
24
29
|
precision: parseFloat(precision)
|
|
25
30
|
});
|
|
26
31
|
setCircle(newCircle);
|
|
27
|
-
|
|
32
|
+
api.map.addObject(newCircle);
|
|
28
33
|
return function () {
|
|
29
|
-
if (
|
|
30
|
-
|
|
34
|
+
if (api.map.getObjects().includes(newCircle)) {
|
|
35
|
+
api.map.removeObject(newCircle);
|
|
31
36
|
}
|
|
32
37
|
newCircle.dispose();
|
|
33
38
|
};
|
|
34
|
-
}, []);
|
|
39
|
+
}, [api.map]);
|
|
35
40
|
useUpdateProp(circle, 'setCenter', position);
|
|
36
41
|
useUpdateProp(circle, 'setStyle', style);
|
|
37
42
|
useUpdateProp(circle, 'setRadius', radius);
|
|
@@ -12,6 +12,7 @@ var MapLayerGroup = function MapLayerGroup(_ref) {
|
|
|
12
12
|
maxZoom = _ref.maxZoom,
|
|
13
13
|
isVisible = _ref.isVisible;
|
|
14
14
|
var context = useContext(MapContext);
|
|
15
|
+
var api = context.api;
|
|
15
16
|
var _useState = useState(),
|
|
16
17
|
_useState2 = _slicedToArray(_useState, 2),
|
|
17
18
|
group = _useState2[0],
|
|
@@ -26,19 +27,21 @@ var MapLayerGroup = function MapLayerGroup(_ref) {
|
|
|
26
27
|
max: parseFloat(maxZoom)
|
|
27
28
|
});
|
|
28
29
|
newGroup.setVisibility(isVisible);
|
|
29
|
-
|
|
30
|
+
api.map.addObject(newGroup);
|
|
30
31
|
setGroup(newGroup);
|
|
31
32
|
var newChildApi = _objectSpread(_objectSpread({}, context), {}, {
|
|
32
|
-
|
|
33
|
+
api: _objectSpread(_objectSpread({}, api), {}, {
|
|
34
|
+
group: newGroup
|
|
35
|
+
})
|
|
33
36
|
});
|
|
34
37
|
setChildApi(newChildApi);
|
|
35
38
|
return function () {
|
|
36
|
-
if (
|
|
37
|
-
|
|
39
|
+
if (api.map.getObjects().includes(newGroup)) {
|
|
40
|
+
api.map.removeObject(newGroup);
|
|
38
41
|
}
|
|
39
42
|
newGroup.dispose();
|
|
40
43
|
};
|
|
41
|
-
}, []);
|
|
44
|
+
}, [api.map]);
|
|
42
45
|
useEffect(function () {
|
|
43
46
|
if (group) {
|
|
44
47
|
group.setVisibility(isVisible);
|
|
@@ -21,7 +21,8 @@ var Polygon = function Polygon(_ref) {
|
|
|
21
21
|
_ref$style = _ref.style,
|
|
22
22
|
style = _ref$style === void 0 ? H.map.SpatialStyle.DEFAULT_STYLE : _ref$style,
|
|
23
23
|
eventListenerMap = _ref.eventListenerMap;
|
|
24
|
-
var
|
|
24
|
+
var _useContext = useContext(MapContext),
|
|
25
|
+
api = _useContext.api;
|
|
25
26
|
var _useState = useState(),
|
|
26
27
|
_useState2 = _slicedToArray(_useState, 2),
|
|
27
28
|
polygon = _useState2[0],
|
|
@@ -30,15 +31,15 @@ var Polygon = function Polygon(_ref) {
|
|
|
30
31
|
var newPolygon = new H.map.Polygon(createGeometry(points), {
|
|
31
32
|
style: style
|
|
32
33
|
});
|
|
33
|
-
|
|
34
|
+
api.map.addObject(newPolygon);
|
|
34
35
|
setPolygon(newPolygon);
|
|
35
36
|
return function () {
|
|
36
|
-
if (
|
|
37
|
-
|
|
37
|
+
if (api.map.getObjects().includes(newPolygon)) {
|
|
38
|
+
api.map.removeObject(newPolygon);
|
|
38
39
|
}
|
|
39
40
|
newPolygon.dispose();
|
|
40
41
|
};
|
|
41
|
-
}, []);
|
|
42
|
+
}, [api.map]);
|
|
42
43
|
useEffect(function () {
|
|
43
44
|
if (polygon) {
|
|
44
45
|
polygon.setGeometry(createGeometry(points));
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
1
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2
5
|
/* eslint-disable no-undef */
|
|
3
6
|
import { useState, useEffect, useContext } from 'react';
|
|
4
7
|
import PropTypes from 'prop-types';
|
|
@@ -15,7 +18,8 @@ var Polyline = function Polyline(_ref) {
|
|
|
15
18
|
_ref$style = _ref.style,
|
|
16
19
|
style = _ref$style === void 0 ? H.map.SpatialStyle.DEFAULT_STYLE : _ref$style,
|
|
17
20
|
eventListenerMap = _ref.eventListenerMap;
|
|
18
|
-
var
|
|
21
|
+
var _useContext = useContext(MapContext),
|
|
22
|
+
api = _useContext.api;
|
|
19
23
|
var _useState = useState(),
|
|
20
24
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
25
|
polyline = _useState2[0],
|
|
@@ -32,18 +36,39 @@ var Polyline = function Polyline(_ref) {
|
|
|
32
36
|
style: style
|
|
33
37
|
});
|
|
34
38
|
if (hasArrows) {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
var routeArrows;
|
|
40
|
+
if (api.settings.enableWebGL) {
|
|
41
|
+
// Create a patterned polyline
|
|
42
|
+
var arrowLineStyle = new H.map.SpatialStyle(_objectSpread(_objectSpread({}, arrowStyle), {}, {
|
|
43
|
+
lineWidth: 10,
|
|
44
|
+
strokeColor: 'rgba(0, 0, 0, 0.8)',
|
|
45
|
+
lineDash: [0, 3],
|
|
46
|
+
lineDashOffset: 1.6,
|
|
47
|
+
lineTailCap: 'arrow-tail',
|
|
48
|
+
lineHeadCap: 'arrow-head'
|
|
49
|
+
}));
|
|
50
|
+
routeArrows = new H.map.Polyline(geometry, {
|
|
51
|
+
style: arrowLineStyle
|
|
52
|
+
});
|
|
53
|
+
} else {
|
|
54
|
+
// Non WebGL way - Create a patterned polyline
|
|
55
|
+
var defaultArrowStyle = {
|
|
56
|
+
lineWidth: 2,
|
|
57
|
+
fillColor: 'rgba(42, 55, 64, 1)',
|
|
58
|
+
strokeColor: 'rgba(0, 0, 0, 0.8)',
|
|
59
|
+
lineDash: [0, 4],
|
|
60
|
+
lineTailCap: 'arrow-tail',
|
|
61
|
+
lineHeadCap: 'arrow-head'
|
|
62
|
+
};
|
|
63
|
+
var _arrowLineStyle = new H.map.SpatialStyle({
|
|
64
|
+
lineWidth: 10,
|
|
65
|
+
strokeColor: 'rgba(255, 255, 255, 0)'
|
|
66
|
+
});
|
|
67
|
+
routeArrows = new H.map.Polyline(geometry, {
|
|
68
|
+
style: _arrowLineStyle,
|
|
69
|
+
arrows: defaultArrowStyle
|
|
70
|
+
});
|
|
71
|
+
}
|
|
47
72
|
|
|
48
73
|
// create a group that represents the route line and contains
|
|
49
74
|
// outline and the pattern
|
|
@@ -51,43 +76,20 @@ var Polyline = function Polyline(_ref) {
|
|
|
51
76
|
} else {
|
|
52
77
|
lineGroup.addObjects([line]);
|
|
53
78
|
}
|
|
54
|
-
|
|
79
|
+
api.map.addObject(lineGroup);
|
|
55
80
|
setPolyline(lineGroup);
|
|
56
81
|
return function () {
|
|
57
|
-
// cleanup
|
|
58
|
-
//console.log('cleanup polyline');
|
|
59
|
-
|
|
60
82
|
removeEventListenerMap(lineGroup);
|
|
61
83
|
lineGroup.forEach(function (singleLine) {
|
|
62
84
|
lineGroup.removeObject(singleLine);
|
|
63
85
|
singleLine.dispose();
|
|
64
86
|
});
|
|
65
|
-
if (
|
|
66
|
-
|
|
87
|
+
if (api.map.getObjects().includes(lineGroup)) {
|
|
88
|
+
api.map.removeObject(lineGroup);
|
|
67
89
|
}
|
|
68
90
|
lineGroup.dispose();
|
|
69
91
|
};
|
|
70
|
-
}, [geometry, style, hasArrows, arrowStyle]);
|
|
71
|
-
|
|
72
|
-
/*useEffect(() => {
|
|
73
|
-
if (polyline) {
|
|
74
|
-
polyline.forEach((line, index) => {
|
|
75
|
-
if (index === 0) {
|
|
76
|
-
line.setStyle(style);
|
|
77
|
-
} else {
|
|
78
|
-
line.setStyle(arrowStyle);
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}, [style, arrowStyle]);*/
|
|
83
|
-
|
|
84
|
-
/*useEffect(() => {
|
|
85
|
-
if (polyline) {
|
|
86
|
-
polyline.forEach(line => line.setGeometry(geometry));
|
|
87
|
-
}
|
|
88
|
-
}, [geometry]);*/
|
|
89
|
-
|
|
90
|
-
//useUpdateProp(polyline, 'setStyle', style);
|
|
92
|
+
}, [api.map, geometry, style, hasArrows, arrowStyle]);
|
|
91
93
|
useUpdateEventListenerMap(polyline, eventListenerMap);
|
|
92
94
|
return null;
|
|
93
95
|
};
|
|
@@ -10,6 +10,12 @@ import React from 'react';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import mapProps from '../../../../utils/proptypes';
|
|
12
12
|
import { addEventListenerMap, removeEventListenerMap, checkAndUpdateEventListenerMap } from '../../../../utils/eventHandling';
|
|
13
|
+
|
|
14
|
+
// Should be deprecated...
|
|
15
|
+
// Here Documentation:
|
|
16
|
+
// It should be only used where small numbers of markers with dynamic style and/or scripted icons are to be displayed
|
|
17
|
+
// on the map (for example animated interactive SVG). Otherwise a H.map.Marker should be preferred for performance reasons.
|
|
18
|
+
//
|
|
13
19
|
var DomMarker = /*#__PURE__*/function (_React$Component) {
|
|
14
20
|
_inherits(DomMarker, _React$Component);
|
|
15
21
|
var _super = _createSuper(DomMarker);
|
|
@@ -21,7 +27,7 @@ var DomMarker = /*#__PURE__*/function (_React$Component) {
|
|
|
21
27
|
_this.marker = new H.map.DomMarker(_this.convertPosition(props.position), {
|
|
22
28
|
icon: icon
|
|
23
29
|
});
|
|
24
|
-
context.api.
|
|
30
|
+
context.api.map.addObject(_this.marker);
|
|
25
31
|
addEventListenerMap(_this.marker, props.eventListenerMap, _this.context.api.map);
|
|
26
32
|
return _this;
|
|
27
33
|
}
|
|
@@ -48,8 +54,8 @@ var DomMarker = /*#__PURE__*/function (_React$Component) {
|
|
|
48
54
|
key: "componentWillUnmount",
|
|
49
55
|
value: function componentWillUnmount() {
|
|
50
56
|
removeEventListenerMap(this.marker);
|
|
51
|
-
if (this.context.api.
|
|
52
|
-
this.context.api.
|
|
57
|
+
if (this.context.api.map.includes(this.marker)) {
|
|
58
|
+
this.context.api.map.removeObject(this.marker);
|
|
53
59
|
}
|
|
54
60
|
this.marker.dispose();
|
|
55
61
|
}
|