@progress/kendo-react-map 5.6.0-dev.202208040930 → 5.6.0-dev.202208090813

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/Map.d.ts CHANGED
@@ -5,6 +5,8 @@ import './defaults';
5
5
  import { MapProps } from './MapProps';
6
6
  import { MapContextType } from './MapContext';
7
7
  import { DomEvent } from './events/dom-event';
8
+ import { geometry } from '@progress/kendo-drawing';
9
+ import { Extent, Location, MapLayer } from './common/map-types';
8
10
  /**
9
11
  * Represents the [KendoReact Map component]({% slug overview_map %}).
10
12
  */
@@ -55,6 +57,94 @@ export declare class Map extends React.Component<MapProps, {}> {
55
57
  * @hidden
56
58
  */
57
59
  getMapOptions(): any;
60
+ /**
61
+ * The marker layers instances.
62
+ */
63
+ get layers(): MapLayer[];
64
+ /**
65
+ * Gets the extent (visible area) of the map.
66
+ */
67
+ get extent(): Extent | undefined;
68
+ /**
69
+ * Sets the extent (visible area) of the map.
70
+ */
71
+ set extent(extent: Extent | undefined);
72
+ /**
73
+ * Detects the size of the container and redraws the Map.
74
+ * Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
75
+ */
76
+ resize(): void;
77
+ /**
78
+ * Retrieves the size of the visible portion of the map.
79
+ *
80
+ * @returns The size (width and height) of the visible portion of the map.
81
+ */
82
+ viewSize(): {
83
+ width: number;
84
+ height: number;
85
+ };
86
+ /**
87
+ * Returns the event coordinates relative to the map element. Offset coordinates are not synchronized to a particular location on the map.
88
+ *
89
+ * @param e The mouse event.
90
+ * @returns The event coordinates relative to the map element.
91
+ */
92
+ eventOffset(e: any): geometry.Point | undefined;
93
+ /**
94
+ * Retrieves projected (layer) coordinates that correspond to this mouse event.
95
+ * Layer coordinates are absolute and change only when the zoom level is changed.
96
+ *
97
+ * @param e The mouse event.
98
+ * @returns The projected (layer) coordinates that correspond to this event.
99
+ */
100
+ eventToLayer(e: any): geometry.Point | undefined;
101
+ /**
102
+ * Retrieves the geographic location that correspond to this mouse event.
103
+ *
104
+ * @param e The mouse event.
105
+ * @returns The geographic location that correspond to this mouse event.
106
+ */
107
+ eventToLocation(e: any): geometry.Point | undefined;
108
+ /**
109
+ * Retrieves relative (view) coordinates that correspond to this mouse event.
110
+ * Layer elements positioned on these coordinates will appear under the mouse cursor.
111
+ * View coordinates are no longer valid after a map reset.
112
+ *
113
+ * @param e The mouse event.
114
+ * @returns The relative (view) coordinates that correspond to this mouse event.
115
+ */
116
+ eventToView(e: any): geometry.Point | undefined;
117
+ /**
118
+ * Transforms layer (projected) coordinates to geographical location.
119
+ *
120
+ * @param point The layer (projected) coordinates. An array argument is assumed to be in x, y order.
121
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
122
+ * @returns The geographic location that corresponds to the layer coordinates.
123
+ */
124
+ layerToLocation(point: geometry.Point | number[], zoom?: number): Location | undefined;
125
+ /**
126
+ * Returns the layer (projected) coordinates that correspond to a geographical location.
127
+ *
128
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
129
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
130
+ * @returns The layer (projected) coordinates.
131
+ */
132
+ locationToLayer(location: Location | number[], zoom?: number): geometry.Point | undefined;
133
+ /**
134
+ * Returns the view (relative) coordinates that correspond to a geographical location.
135
+ *
136
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
137
+ * @returns The view coordinates that correspond to a geographical location.
138
+ */
139
+ locationToView(location: Location | number[]): geometry.Point | undefined;
140
+ /**
141
+ * Returns the geographical location that correspond to the view (relative) coordinates.
142
+ *
143
+ * @param point The view coordinates. An array argument is assumed to be in x, y order.
144
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
145
+ * @returns The geographic location that corresponds to the view coordinates.
146
+ */
147
+ viewToLocation(point: geometry.Point | number[], zoom?: number): Location | undefined;
58
148
  /**
59
149
  * @hidden
60
150
  */
@@ -78,13 +168,13 @@ export declare class Map extends React.Component<MapProps, {}> {
78
168
  /**
79
169
  * @hidden
80
170
  */
81
- onRender: (e: any) => void;
171
+ onInit: (e: any) => void;
82
172
  /**
83
173
  * @hidden
84
174
  */
85
- onMapMouseLeave: (e: React.MouseEvent<HTMLDivElement>) => void;
175
+ onRender: (e: any) => void;
86
176
  /**
87
177
  * @hidden
88
178
  */
89
- onWindowResize: () => void;
179
+ onMapMouseLeave: (e: React.MouseEvent<HTMLDivElement>) => void;
90
180
  }
package/dist/es/Map.js CHANGED
@@ -52,6 +52,12 @@ var Map = /** @class */ (function (_super) {
52
52
  _this.optionsUnsubscriber = Function.prototype;
53
53
  _this.observersStore = {};
54
54
  /* Map handlers */
55
+ /**
56
+ * @hidden
57
+ */
58
+ _this.onInit = function (e) {
59
+ _this.mapInstance = e.sender;
60
+ };
55
61
  /**
56
62
  * @hidden
57
63
  */
@@ -74,14 +80,6 @@ var Map = /** @class */ (function (_super) {
74
80
  _this.mapInstance.hideTooltip();
75
81
  }
76
82
  };
77
- /**
78
- * @hidden
79
- */
80
- _this.onWindowResize = function () {
81
- if (_this.mapInstance !== null) {
82
- // this.mapInstance.resize();
83
- }
84
- };
85
83
  validatePackage(packageMetadata);
86
84
  _this.optionsStore = createStore(optionsReducer);
87
85
  _this.observersStore = createStore(observersReducer);
@@ -92,7 +90,8 @@ var Map = /** @class */ (function (_super) {
92
90
  childrenObserver: _this.childrenObserver
93
91
  };
94
92
  _this.mapObserver = new InstanceObserver(_this, {
95
- // render: 'onRender',
93
+ // render: 'onRender',
94
+ init: 'onInit'
96
95
  });
97
96
  return _this;
98
97
  }
@@ -112,7 +111,6 @@ var Map = /** @class */ (function (_super) {
112
111
  Map.prototype.componentDidMount = function () {
113
112
  this.instantiateCoreMap();
114
113
  this.optionsUnsubscriber = this.optionsStore.subscribe(this.refresh.bind(this));
115
- window.addEventListener('resize', this.onWindowResize);
116
114
  };
117
115
  /**
118
116
  * @hidden
@@ -123,7 +121,6 @@ var Map = /** @class */ (function (_super) {
123
121
  this.mapInstance.destroy();
124
122
  this.mapInstance = null;
125
123
  }
126
- window.removeEventListener('resize', this.onWindowResize);
127
124
  };
128
125
  /**
129
126
  * @hidden
@@ -181,6 +178,137 @@ var Map = /** @class */ (function (_super) {
181
178
  mapOptions = Object.assign(mapOptions, this.optionsStore.getState());
182
179
  return mapOptions;
183
180
  };
181
+ Object.defineProperty(Map.prototype, "layers", {
182
+ /**
183
+ * The marker layers instances.
184
+ */
185
+ get: function () {
186
+ var _a;
187
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.layers;
188
+ },
189
+ enumerable: false,
190
+ configurable: true
191
+ });
192
+ Object.defineProperty(Map.prototype, "extent", {
193
+ /**
194
+ * Gets the extent (visible area) of the map.
195
+ */
196
+ get: function () {
197
+ var _a;
198
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.extent();
199
+ },
200
+ /**
201
+ * Sets the extent (visible area) of the map.
202
+ */
203
+ set: function (extent) {
204
+ var _a;
205
+ (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.extent(extent);
206
+ },
207
+ enumerable: false,
208
+ configurable: true
209
+ });
210
+ /**
211
+ * Detects the size of the container and redraws the Map.
212
+ * Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
213
+ */
214
+ Map.prototype.resize = function () {
215
+ // this.mapInstance?.resize();
216
+ };
217
+ /**
218
+ * Retrieves the size of the visible portion of the map.
219
+ *
220
+ * @returns The size (width and height) of the visible portion of the map.
221
+ */
222
+ Map.prototype.viewSize = function () {
223
+ var _a;
224
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.viewSize();
225
+ };
226
+ /**
227
+ * Returns the event coordinates relative to the map element. Offset coordinates are not synchronized to a particular location on the map.
228
+ *
229
+ * @param e The mouse event.
230
+ * @returns The event coordinates relative to the map element.
231
+ */
232
+ Map.prototype.eventOffset = function (e) {
233
+ var _a;
234
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventOffset(e);
235
+ };
236
+ /**
237
+ * Retrieves projected (layer) coordinates that correspond to this mouse event.
238
+ * Layer coordinates are absolute and change only when the zoom level is changed.
239
+ *
240
+ * @param e The mouse event.
241
+ * @returns The projected (layer) coordinates that correspond to this event.
242
+ */
243
+ Map.prototype.eventToLayer = function (e) {
244
+ var _a;
245
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventToLayer(e);
246
+ };
247
+ /**
248
+ * Retrieves the geographic location that correspond to this mouse event.
249
+ *
250
+ * @param e The mouse event.
251
+ * @returns The geographic location that correspond to this mouse event.
252
+ */
253
+ Map.prototype.eventToLocation = function (e) {
254
+ var _a;
255
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventToLocation(e);
256
+ };
257
+ /**
258
+ * Retrieves relative (view) coordinates that correspond to this mouse event.
259
+ * Layer elements positioned on these coordinates will appear under the mouse cursor.
260
+ * View coordinates are no longer valid after a map reset.
261
+ *
262
+ * @param e The mouse event.
263
+ * @returns The relative (view) coordinates that correspond to this mouse event.
264
+ */
265
+ Map.prototype.eventToView = function (e) {
266
+ var _a;
267
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventToView(e);
268
+ };
269
+ /**
270
+ * Transforms layer (projected) coordinates to geographical location.
271
+ *
272
+ * @param point The layer (projected) coordinates. An array argument is assumed to be in x, y order.
273
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
274
+ * @returns The geographic location that corresponds to the layer coordinates.
275
+ */
276
+ Map.prototype.layerToLocation = function (point, zoom) {
277
+ var _a;
278
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.layerToLocation(point, zoom);
279
+ };
280
+ /**
281
+ * Returns the layer (projected) coordinates that correspond to a geographical location.
282
+ *
283
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
284
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
285
+ * @returns The layer (projected) coordinates.
286
+ */
287
+ Map.prototype.locationToLayer = function (location, zoom) {
288
+ var _a;
289
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.locationToLayer(location, zoom);
290
+ };
291
+ /**
292
+ * Returns the view (relative) coordinates that correspond to a geographical location.
293
+ *
294
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
295
+ * @returns The view coordinates that correspond to a geographical location.
296
+ */
297
+ Map.prototype.locationToView = function (location) {
298
+ var _a;
299
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.locationToView(location);
300
+ };
301
+ /**
302
+ * Returns the geographical location that correspond to the view (relative) coordinates.
303
+ *
304
+ * @param point The view coordinates. An array argument is assumed to be in x, y order.
305
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
306
+ * @returns The geographic location that corresponds to the view coordinates.
307
+ */
308
+ Map.prototype.viewToLocation = function (point, zoom) {
309
+ var _a;
310
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.viewToLocation(point, zoom);
311
+ };
184
312
  /**
185
313
  * @hidden
186
314
  */
@@ -5,7 +5,7 @@ export var packageMetadata = {
5
5
  name: '@progress/kendo-react-map',
6
6
  productName: 'KendoReact',
7
7
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
8
- publishDate: 1659604841,
8
+ publishDate: 1660032211,
9
9
  version: '',
10
10
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
11
11
  };
package/dist/npm/Map.d.ts CHANGED
@@ -5,6 +5,8 @@ import './defaults';
5
5
  import { MapProps } from './MapProps';
6
6
  import { MapContextType } from './MapContext';
7
7
  import { DomEvent } from './events/dom-event';
8
+ import { geometry } from '@progress/kendo-drawing';
9
+ import { Extent, Location, MapLayer } from './common/map-types';
8
10
  /**
9
11
  * Represents the [KendoReact Map component]({% slug overview_map %}).
10
12
  */
@@ -55,6 +57,94 @@ export declare class Map extends React.Component<MapProps, {}> {
55
57
  * @hidden
56
58
  */
57
59
  getMapOptions(): any;
60
+ /**
61
+ * The marker layers instances.
62
+ */
63
+ get layers(): MapLayer[];
64
+ /**
65
+ * Gets the extent (visible area) of the map.
66
+ */
67
+ get extent(): Extent | undefined;
68
+ /**
69
+ * Sets the extent (visible area) of the map.
70
+ */
71
+ set extent(extent: Extent | undefined);
72
+ /**
73
+ * Detects the size of the container and redraws the Map.
74
+ * Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
75
+ */
76
+ resize(): void;
77
+ /**
78
+ * Retrieves the size of the visible portion of the map.
79
+ *
80
+ * @returns The size (width and height) of the visible portion of the map.
81
+ */
82
+ viewSize(): {
83
+ width: number;
84
+ height: number;
85
+ };
86
+ /**
87
+ * Returns the event coordinates relative to the map element. Offset coordinates are not synchronized to a particular location on the map.
88
+ *
89
+ * @param e The mouse event.
90
+ * @returns The event coordinates relative to the map element.
91
+ */
92
+ eventOffset(e: any): geometry.Point | undefined;
93
+ /**
94
+ * Retrieves projected (layer) coordinates that correspond to this mouse event.
95
+ * Layer coordinates are absolute and change only when the zoom level is changed.
96
+ *
97
+ * @param e The mouse event.
98
+ * @returns The projected (layer) coordinates that correspond to this event.
99
+ */
100
+ eventToLayer(e: any): geometry.Point | undefined;
101
+ /**
102
+ * Retrieves the geographic location that correspond to this mouse event.
103
+ *
104
+ * @param e The mouse event.
105
+ * @returns The geographic location that correspond to this mouse event.
106
+ */
107
+ eventToLocation(e: any): geometry.Point | undefined;
108
+ /**
109
+ * Retrieves relative (view) coordinates that correspond to this mouse event.
110
+ * Layer elements positioned on these coordinates will appear under the mouse cursor.
111
+ * View coordinates are no longer valid after a map reset.
112
+ *
113
+ * @param e The mouse event.
114
+ * @returns The relative (view) coordinates that correspond to this mouse event.
115
+ */
116
+ eventToView(e: any): geometry.Point | undefined;
117
+ /**
118
+ * Transforms layer (projected) coordinates to geographical location.
119
+ *
120
+ * @param point The layer (projected) coordinates. An array argument is assumed to be in x, y order.
121
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
122
+ * @returns The geographic location that corresponds to the layer coordinates.
123
+ */
124
+ layerToLocation(point: geometry.Point | number[], zoom?: number): Location | undefined;
125
+ /**
126
+ * Returns the layer (projected) coordinates that correspond to a geographical location.
127
+ *
128
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
129
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
130
+ * @returns The layer (projected) coordinates.
131
+ */
132
+ locationToLayer(location: Location | number[], zoom?: number): geometry.Point | undefined;
133
+ /**
134
+ * Returns the view (relative) coordinates that correspond to a geographical location.
135
+ *
136
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
137
+ * @returns The view coordinates that correspond to a geographical location.
138
+ */
139
+ locationToView(location: Location | number[]): geometry.Point | undefined;
140
+ /**
141
+ * Returns the geographical location that correspond to the view (relative) coordinates.
142
+ *
143
+ * @param point The view coordinates. An array argument is assumed to be in x, y order.
144
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
145
+ * @returns The geographic location that corresponds to the view coordinates.
146
+ */
147
+ viewToLocation(point: geometry.Point | number[], zoom?: number): Location | undefined;
58
148
  /**
59
149
  * @hidden
60
150
  */
@@ -78,13 +168,13 @@ export declare class Map extends React.Component<MapProps, {}> {
78
168
  /**
79
169
  * @hidden
80
170
  */
81
- onRender: (e: any) => void;
171
+ onInit: (e: any) => void;
82
172
  /**
83
173
  * @hidden
84
174
  */
85
- onMapMouseLeave: (e: React.MouseEvent<HTMLDivElement>) => void;
175
+ onRender: (e: any) => void;
86
176
  /**
87
177
  * @hidden
88
178
  */
89
- onWindowResize: () => void;
179
+ onMapMouseLeave: (e: React.MouseEvent<HTMLDivElement>) => void;
90
180
  }
package/dist/npm/Map.js CHANGED
@@ -55,6 +55,12 @@ var Map = /** @class */ (function (_super) {
55
55
  _this.optionsUnsubscriber = Function.prototype;
56
56
  _this.observersStore = {};
57
57
  /* Map handlers */
58
+ /**
59
+ * @hidden
60
+ */
61
+ _this.onInit = function (e) {
62
+ _this.mapInstance = e.sender;
63
+ };
58
64
  /**
59
65
  * @hidden
60
66
  */
@@ -77,14 +83,6 @@ var Map = /** @class */ (function (_super) {
77
83
  _this.mapInstance.hideTooltip();
78
84
  }
79
85
  };
80
- /**
81
- * @hidden
82
- */
83
- _this.onWindowResize = function () {
84
- if (_this.mapInstance !== null) {
85
- // this.mapInstance.resize();
86
- }
87
- };
88
86
  (0, kendo_react_common_1.validatePackage)(package_metadata_1.packageMetadata);
89
87
  _this.optionsStore = (0, store_1.default)(reducer_1.optionsReducer);
90
88
  _this.observersStore = (0, store_1.default)(reducer_1.observersReducer);
@@ -95,7 +93,8 @@ var Map = /** @class */ (function (_super) {
95
93
  childrenObserver: _this.childrenObserver
96
94
  };
97
95
  _this.mapObserver = new kendo_charts_1.InstanceObserver(_this, {
98
- // render: 'onRender',
96
+ // render: 'onRender',
97
+ init: 'onInit'
99
98
  });
100
99
  return _this;
101
100
  }
@@ -115,7 +114,6 @@ var Map = /** @class */ (function (_super) {
115
114
  Map.prototype.componentDidMount = function () {
116
115
  this.instantiateCoreMap();
117
116
  this.optionsUnsubscriber = this.optionsStore.subscribe(this.refresh.bind(this));
118
- window.addEventListener('resize', this.onWindowResize);
119
117
  };
120
118
  /**
121
119
  * @hidden
@@ -126,7 +124,6 @@ var Map = /** @class */ (function (_super) {
126
124
  this.mapInstance.destroy();
127
125
  this.mapInstance = null;
128
126
  }
129
- window.removeEventListener('resize', this.onWindowResize);
130
127
  };
131
128
  /**
132
129
  * @hidden
@@ -184,6 +181,137 @@ var Map = /** @class */ (function (_super) {
184
181
  mapOptions = Object.assign(mapOptions, this.optionsStore.getState());
185
182
  return mapOptions;
186
183
  };
184
+ Object.defineProperty(Map.prototype, "layers", {
185
+ /**
186
+ * The marker layers instances.
187
+ */
188
+ get: function () {
189
+ var _a;
190
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.layers;
191
+ },
192
+ enumerable: false,
193
+ configurable: true
194
+ });
195
+ Object.defineProperty(Map.prototype, "extent", {
196
+ /**
197
+ * Gets the extent (visible area) of the map.
198
+ */
199
+ get: function () {
200
+ var _a;
201
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.extent();
202
+ },
203
+ /**
204
+ * Sets the extent (visible area) of the map.
205
+ */
206
+ set: function (extent) {
207
+ var _a;
208
+ (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.extent(extent);
209
+ },
210
+ enumerable: false,
211
+ configurable: true
212
+ });
213
+ /**
214
+ * Detects the size of the container and redraws the Map.
215
+ * Resizing is automatic unless you set the `resizeRateLimit` option to `0`.
216
+ */
217
+ Map.prototype.resize = function () {
218
+ // this.mapInstance?.resize();
219
+ };
220
+ /**
221
+ * Retrieves the size of the visible portion of the map.
222
+ *
223
+ * @returns The size (width and height) of the visible portion of the map.
224
+ */
225
+ Map.prototype.viewSize = function () {
226
+ var _a;
227
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.viewSize();
228
+ };
229
+ /**
230
+ * Returns the event coordinates relative to the map element. Offset coordinates are not synchronized to a particular location on the map.
231
+ *
232
+ * @param e The mouse event.
233
+ * @returns The event coordinates relative to the map element.
234
+ */
235
+ Map.prototype.eventOffset = function (e) {
236
+ var _a;
237
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventOffset(e);
238
+ };
239
+ /**
240
+ * Retrieves projected (layer) coordinates that correspond to this mouse event.
241
+ * Layer coordinates are absolute and change only when the zoom level is changed.
242
+ *
243
+ * @param e The mouse event.
244
+ * @returns The projected (layer) coordinates that correspond to this event.
245
+ */
246
+ Map.prototype.eventToLayer = function (e) {
247
+ var _a;
248
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventToLayer(e);
249
+ };
250
+ /**
251
+ * Retrieves the geographic location that correspond to this mouse event.
252
+ *
253
+ * @param e The mouse event.
254
+ * @returns The geographic location that correspond to this mouse event.
255
+ */
256
+ Map.prototype.eventToLocation = function (e) {
257
+ var _a;
258
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventToLocation(e);
259
+ };
260
+ /**
261
+ * Retrieves relative (view) coordinates that correspond to this mouse event.
262
+ * Layer elements positioned on these coordinates will appear under the mouse cursor.
263
+ * View coordinates are no longer valid after a map reset.
264
+ *
265
+ * @param e The mouse event.
266
+ * @returns The relative (view) coordinates that correspond to this mouse event.
267
+ */
268
+ Map.prototype.eventToView = function (e) {
269
+ var _a;
270
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.eventToView(e);
271
+ };
272
+ /**
273
+ * Transforms layer (projected) coordinates to geographical location.
274
+ *
275
+ * @param point The layer (projected) coordinates. An array argument is assumed to be in x, y order.
276
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
277
+ * @returns The geographic location that corresponds to the layer coordinates.
278
+ */
279
+ Map.prototype.layerToLocation = function (point, zoom) {
280
+ var _a;
281
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.layerToLocation(point, zoom);
282
+ };
283
+ /**
284
+ * Returns the layer (projected) coordinates that correspond to a geographical location.
285
+ *
286
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
287
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
288
+ * @returns The layer (projected) coordinates.
289
+ */
290
+ Map.prototype.locationToLayer = function (location, zoom) {
291
+ var _a;
292
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.locationToLayer(location, zoom);
293
+ };
294
+ /**
295
+ * Returns the view (relative) coordinates that correspond to a geographical location.
296
+ *
297
+ * @param location The geographic location. An array argument is assumed to be in [Latitude, Longitude] order.
298
+ * @returns The view coordinates that correspond to a geographical location.
299
+ */
300
+ Map.prototype.locationToView = function (location) {
301
+ var _a;
302
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.locationToView(location);
303
+ };
304
+ /**
305
+ * Returns the geographical location that correspond to the view (relative) coordinates.
306
+ *
307
+ * @param point The view coordinates. An array argument is assumed to be in x, y order.
308
+ * @param zoom Optional. Assumed zoom level. Defaults to the current zoom level.
309
+ * @returns The geographic location that corresponds to the view coordinates.
310
+ */
311
+ Map.prototype.viewToLocation = function (point, zoom) {
312
+ var _a;
313
+ return (_a = this.mapInstance) === null || _a === void 0 ? void 0 : _a.viewToLocation(point, zoom);
314
+ };
187
315
  /**
188
316
  * @hidden
189
317
  */
@@ -8,7 +8,7 @@ exports.packageMetadata = {
8
8
  name: '@progress/kendo-react-map',
9
9
  productName: 'KendoReact',
10
10
  productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
11
- publishDate: 1659604841,
11
+ publishDate: 1660032211,
12
12
  version: '',
13
13
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
14
14
  };