@vidro/map-handler 1.1.0 → 1.1.1
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/examples/full/index.php +4 -3
- package/package.json +1 -1
- package/src/index.js +4 -4
package/examples/full/index.php
CHANGED
@@ -83,8 +83,7 @@
|
|
83
83
|
<button id="btLoadMap">Load Map</button> -
|
84
84
|
<button id="btLoadProjectLayers">Load Project layers</button>
|
85
85
|
</div>
|
86
|
-
|
87
|
-
|
86
|
+
|
88
87
|
</div>
|
89
88
|
|
90
89
|
<hr />
|
@@ -154,7 +153,9 @@
|
|
154
153
|
<br>Id: <input type="text" name="uuid" id="uuid" size="10" value="" placeholder="element unique ID">
|
155
154
|
<br>Layer to draw: <input type="text" name="layerToDraw" id="layerToDraw" size="5" value="">
|
156
155
|
<br><br><button id="btDrawGeometryInLayer">Draw</button> <button id="btRemoveGeometryInLayer">Remove element</button>
|
157
|
-
|
156
|
+
<h3>Measure</h3>
|
157
|
+
<div><button id="btMeasureDistance">Measure distance</button> <button id="btMeasureArea">Measure area</button> - <button id="btCancelMeasure">Cancel measure</button></div>
|
158
|
+
|
158
159
|
<h2>Info</h2>
|
159
160
|
<button id="btWMSInfo" disabled="true">WMS Info</button>
|
160
161
|
<button id="btGiswaterInfo">Giswater Info</button>
|
package/package.json
CHANGED
package/src/index.js
CHANGED
@@ -133,8 +133,8 @@ class Communicator extends EventEmitter {
|
|
133
133
|
|
134
134
|
if (properties.layerType !== null) {
|
135
135
|
if (
|
136
|
-
properties.layerType
|
137
|
-
properties.layerType
|
136
|
+
properties.layerType !== "wms" &&
|
137
|
+
properties.layerType !== "vector"
|
138
138
|
) {
|
139
139
|
this.emit("error", { error: "layerType must be 'wms' or 'vector'" });
|
140
140
|
return;
|
@@ -143,7 +143,7 @@ class Communicator extends EventEmitter {
|
|
143
143
|
|
144
144
|
if (
|
145
145
|
properties.singletile !== null &&
|
146
|
-
properties.layerType
|
146
|
+
properties.layerType !== "vector"
|
147
147
|
) {
|
148
148
|
if (typeof properties.singletile !== "boolean") {
|
149
149
|
properties.singletile = null;
|
@@ -179,7 +179,7 @@ class Communicator extends EventEmitter {
|
|
179
179
|
: null,
|
180
180
|
transparent: properties.transparent,
|
181
181
|
singletile: properties.singletile,
|
182
|
-
layerType: properties.layerType
|
182
|
+
layerType: properties.layerType,
|
183
183
|
sessionToken: this.sessionToken,
|
184
184
|
});
|
185
185
|
};
|