@vidro/map-handler 1.2.165 → 1.2.166
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/README.md +15 -1
- package/package.json +1 -1
- package/src/index.js +19 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Map Handler
|
|
2
2
|
|
|
3
|
-
#### Version 1.2.
|
|
3
|
+
#### Version 1.2.164 - October 2024
|
|
4
4
|
|
|
5
5
|
Tool to achieve the easiest way of communication with the map iframe.
|
|
6
6
|
|
|
@@ -274,6 +274,20 @@ Notifies errors
|
|
|
274
274
|
|
|
275
275
|
Notifies map status, as tiled loaded, background visible, etc..
|
|
276
276
|
|
|
277
|
+
##### hover
|
|
278
|
+
|
|
279
|
+
When user puts mouse pointer over a feauture for more than 1 second, a `hover` event is dispatched.
|
|
280
|
+
|
|
281
|
+
If is no hover any feature event is dispatched with `feature:null`
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
> E.G
|
|
285
|
+
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
{type: "hover", feature: {'property':'somevalue',...}
|
|
289
|
+
```
|
|
290
|
+
|
|
277
291
|
## Methods
|
|
278
292
|
|
|
279
293
|
##### ZoomIn()
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -151,7 +151,7 @@ class Communicator extends EventEmitter {
|
|
|
151
151
|
layers: layers,
|
|
152
152
|
});
|
|
153
153
|
} else {
|
|
154
|
-
this.
|
|
154
|
+
this.emitEvent("error", { error: "no layers" }, this.domId);
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
157
|
|
|
@@ -175,7 +175,12 @@ class Communicator extends EventEmitter {
|
|
|
175
175
|
if (properties.singletile !== null) {
|
|
176
176
|
if (typeof properties.singletile !== "boolean") {
|
|
177
177
|
properties.singletile = null;
|
|
178
|
-
|
|
178
|
+
|
|
179
|
+
this.emitEvent(
|
|
180
|
+
"error",
|
|
181
|
+
{ error: "singletile must be a Boolean" },
|
|
182
|
+
this.domId
|
|
183
|
+
);
|
|
179
184
|
}
|
|
180
185
|
}
|
|
181
186
|
if (
|
|
@@ -185,7 +190,12 @@ class Communicator extends EventEmitter {
|
|
|
185
190
|
) {
|
|
186
191
|
if (isNaN(parseInt(properties.gutter))) {
|
|
187
192
|
properties.gutter = null;
|
|
188
|
-
|
|
193
|
+
|
|
194
|
+
this.emitEvent(
|
|
195
|
+
"error",
|
|
196
|
+
{ error: "Gutter must be a number" },
|
|
197
|
+
this.domId
|
|
198
|
+
);
|
|
189
199
|
}
|
|
190
200
|
if (properties.singletile) {
|
|
191
201
|
properties.gutter = null;
|
|
@@ -199,7 +209,12 @@ class Communicator extends EventEmitter {
|
|
|
199
209
|
if (properties.transparent !== null) {
|
|
200
210
|
if (typeof properties.transparent !== "boolean") {
|
|
201
211
|
properties.transparent = null;
|
|
202
|
-
|
|
212
|
+
|
|
213
|
+
this.emitEvent(
|
|
214
|
+
"error",
|
|
215
|
+
{ error: "transparent must be a Boolean" },
|
|
216
|
+
this.domId
|
|
217
|
+
);
|
|
203
218
|
}
|
|
204
219
|
}
|
|
205
220
|
this.com.sendMessageToMap({
|