@vidro/map-handler 1.1.0-b → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -83,7 +83,8 @@
83
83
  <button id="btLoadMap">Load Map</button> -
84
84
  <button id="btLoadProjectLayers">Load Project layers</button>
85
85
  </div>
86
-
86
+ <div><button id="btMeasureDistance">Measure distance</button> <button id="btMeasureArea">Measure area</button> - <button id="btCancelMeasure">Cancel measure</button></div>
87
+
87
88
  </div>
88
89
 
89
90
  <hr />
@@ -153,9 +154,7 @@
153
154
  <br>Id: <input type="text" name="uuid" id="uuid" size="10" value="" placeholder="element unique ID">
154
155
  <br>Layer to draw: <input type="text" name="layerToDraw" id="layerToDraw" size="5" value="">
155
156
  <br><br><button id="btDrawGeometryInLayer">Draw</button> <button id="btRemoveGeometryInLayer">Remove element</button>
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
-
157
+
159
158
  <h2>Info</h2>
160
159
  <button id="btWMSInfo" disabled="true">WMS Info</button>
161
160
  <button id="btGiswaterInfo">Giswater Info</button>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vidro/map-handler",
3
- "version": "1.1.0b",
3
+ "version": "1.1.0",
4
4
  "description": "Tool to achieve the easiest way of communication with the map",
5
5
  "homepage": "https://github.com/Vidro-Software-SL/maphandler",
6
6
  "repository": {
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 !== "wms" &&
137
- properties.layerType !== "vector"
136
+ properties.layerType.toLowerCase() !== "wms" &&
137
+ properties.layerType.toLowerCase() !== "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 !== "vector"
146
+ properties.layerType.toLowerCase() !== "vector"
147
147
  ) {
148
148
  if (typeof properties.singletile !== "boolean") {
149
149
  properties.singletile = null;