@vidro/map-handler 1.0.7 → 1.0.8
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 +87 -8
- package/dist/map-handler.js +1 -1
- package/doc/giswater.png +0 -0
- package/doc/giswaterInfo.png +0 -0
- package/doc/giswaterInfoApi.png +0 -0
- package/doc/giswatergeojson.png +0 -0
- package/doc/multiTile.png +0 -0
- package/doc/multiTileNoGutter.png +0 -0
- package/doc/togglelayergiswater.png +0 -0
- package/doc/vidromaps-basic.png +0 -0
- package/examples/full/apidemo.js +43 -1
- package/examples/full/cachedToken.dat +1 -1
- package/examples/full/cachedTokenData.dat +1 -1
- package/examples/full/index.php +32 -16
- package/examples/full/tester.js +122 -20
- package/examples/integration/tool/css/dist/home.css.min.css +0 -0
- package/examples/integration/tool/css/dist/home.min.css +1 -0
- package/examples/integration/tool/css/dist/home.min.css.map +10 -0
- package/examples/integration/tool/css/dist/style-login.css.min.css +0 -0
- package/examples/integration/tool/css/dist/style-login.min.css +1 -0
- package/examples/integration/tool/css/dist/style-login.min.css.map +10 -0
- package/examples/integration/tool/css/dist/style.css.min.css +0 -0
- package/examples/integration/tool/css/dist/style.min.css +1 -0
- package/examples/integration/tool/css/dist/style.min.css.map +23 -0
- package/examples/integration/tool/css/master/_bottom-sheet-2.scss +103 -0
- package/examples/integration/tool/css/master/_bottom-sheet.scss +142 -0
- package/examples/integration/tool/css/master/_colors.scss +35 -0
- package/examples/integration/tool/css/master/_dropdown-form.scss +167 -0
- package/examples/integration/tool/css/master/_forms.scss +416 -0
- package/examples/integration/tool/css/master/_header.scss +134 -0
- package/examples/integration/tool/css/master/_menu-toc.scss +135 -0
- package/examples/integration/tool/css/master/_menu-tools.scss +187 -0
- package/examples/integration/tool/css/master/_mixins.scss +42 -0
- package/examples/integration/tool/css/master/_notifyjs.scss +39 -0
- package/examples/integration/tool/css/master/_ol-map-controls.scss +117 -0
- package/examples/integration/tool/css/master/_simplelightbox.scss +287 -0
- package/examples/integration/tool/css/master/_toc-config.scss +28 -0
- package/examples/integration/tool/css/master/_toc-layouts.scss +173 -0
- package/examples/integration/tool/css/master/_tooltip.scss +34 -0
- package/examples/integration/tool/css/master/home.scss +266 -0
- package/examples/integration/tool/css/master/style-login.scss +240 -0
- package/examples/integration/tool/css/master/style.scss +166 -0
- package/examples/integration/tool/img/doc-gallery-placeholder.svg +3 -0
- package/examples/integration/tool/img/home/ic_calendar-clock.svg +1 -0
- package/examples/integration/tool/img/home/ic_caret-down.svg +1 -0
- package/examples/integration/tool/img/home/ic_cog.svg +1 -0
- package/examples/integration/tool/img/home/ic_marker.svg +1 -0
- package/examples/integration/tool/img/home/ic_play-circle.svg +1 -0
- package/examples/integration/tool/img/home/ic_power.svg +1 -0
- package/examples/integration/tool/img/home/ic_squares.svg +1 -0
- package/examples/integration/tool/img/home/ic_user-pointer.svg +1 -0
- package/examples/integration/tool/img/home/ic_user-square.svg +1 -0
- package/examples/integration/tool/img/home/logo_footer.svg +1 -0
- package/examples/integration/tool/img/ic/accessControl.svg +1 -0
- package/examples/integration/tool/img/ic/account-location.svg +1 -0
- package/examples/integration/tool/img/ic/actionDelete.svg +64 -0
- package/examples/integration/tool/img/ic/actionOpen.svg +64 -0
- package/examples/integration/tool/img/ic/addFile.svg +100 -0
- package/examples/integration/tool/img/ic/addFile_off.svg +102 -0
- package/examples/integration/tool/img/ic/arrow-left.svg +1 -0
- package/examples/integration/tool/img/ic/arrow-right-drop-circle-outline.svg +1 -0
- package/examples/integration/tool/img/ic/bt_add_photo.svg +3 -0
- package/examples/integration/tool/img/ic/bug.svg +1 -0
- package/examples/integration/tool/img/ic/caret-down-bottomsheet.svg +3 -0
- package/examples/integration/tool/img/ic/checkbox-blank-outline-grey.svg +8 -0
- package/examples/integration/tool/img/ic/checkbox-blank-outline-white.svg +8 -0
- package/examples/integration/tool/img/ic/checkbox-blank-outline.svg +1 -0
- package/examples/integration/tool/img/ic/checkbox-marked-outline-grey.svg +8 -0
- package/examples/integration/tool/img/ic/checkbox-marked-outline-white.svg +8 -0
- package/examples/integration/tool/img/ic/checkbox-marked-outline.svg +1 -0
- package/examples/integration/tool/img/ic/chevron-down-grey.svg +7 -0
- package/examples/integration/tool/img/ic/chevron-down-white.svg +7 -0
- package/examples/integration/tool/img/ic/chevron-down.svg +1 -0
- package/examples/integration/tool/img/ic/chevron-right-grey.svg +7 -0
- package/examples/integration/tool/img/ic/chevron-right-white.svg +7 -0
- package/examples/integration/tool/img/ic/chevron-right.svg +1 -0
- package/examples/integration/tool/img/ic/comment-text-outline.svg +1 -0
- package/examples/integration/tool/img/ic/cookie.svg +1 -0
- package/examples/integration/tool/img/ic/delete.svg +1 -0
- package/examples/integration/tool/img/ic/dot.svg +1 -0
- package/examples/integration/tool/img/ic/dump.svg +1 -0
- package/examples/integration/tool/img/ic/e.svg +9 -0
- package/examples/integration/tool/img/ic/eye-off.svg +1 -0
- package/examples/integration/tool/img/ic/eye.svg +1 -0
- package/examples/integration/tool/img/ic/forbidden.svg +1 -0
- package/examples/integration/tool/img/ic/form-title-1.svg +3 -0
- package/examples/integration/tool/img/ic/group.svg +1 -0
- package/examples/integration/tool/img/ic/hamburger.svg +1 -0
- package/examples/integration/tool/img/ic/ic-users.svg +1 -0
- package/examples/integration/tool/img/ic/ic_dropdown-form-close.svg +3 -0
- package/examples/integration/tool/img/ic/ic_dropdown-form-link.svg +3 -0
- package/examples/integration/tool/img/ic/ic_feature-edit-cancel.svg +14 -0
- package/examples/integration/tool/img/ic/ic_feature-edit-save.svg +14 -0
- package/examples/integration/tool/img/ic/ic_gallery-item-delete.svg +3 -0
- package/examples/integration/tool/img/ic/ic_gallery-item-view.svg +3 -0
- package/examples/integration/tool/img/ic/ic_gps.svg +3 -0
- package/examples/integration/tool/img/ic/ic_search.svg +5 -0
- package/examples/integration/tool/img/ic/ic_selector_fechas.svg +63 -0
- package/examples/integration/tool/img/ic/ic_zoom-to-extent.svg +3 -0
- package/examples/integration/tool/img/ic/icon_reminder.png +0 -0
- package/examples/integration/tool/img/ic/image-gallery-placeholder.svg +55 -0
- package/examples/integration/tool/img/ic/imaqua.svg +87 -0
- package/examples/integration/tool/img/ic/incidencia.svg +77 -0
- package/examples/integration/tool/img/ic/info_multi_selection.svg +230 -0
- package/examples/integration/tool/img/ic/layers.svg +1 -0
- package/examples/integration/tool/img/ic/map-marker.svg +3 -0
- package/examples/integration/tool/img/ic/map.svg +1 -0
- package/examples/integration/tool/img/ic/measure_area.svg +111 -0
- package/examples/integration/tool/img/ic/minus.svg +7 -0
- package/examples/integration/tool/img/ic/notification.svg +1 -0
- package/examples/integration/tool/img/ic/offline.svg +3 -0
- package/examples/integration/tool/img/ic/online.svg +1 -0
- package/examples/integration/tool/img/ic/pencil.svg +3 -0
- package/examples/integration/tool/img/ic/plus.svg +1 -0
- package/examples/integration/tool/img/ic/polygon_selection.svg +68 -0
- package/examples/integration/tool/img/ic/power.svg +1 -0
- package/examples/integration/tool/img/ic/remoteLocalized.svg +4 -0
- package/examples/integration/tool/img/ic/remoteStartLocalize.svg +4 -0
- package/examples/integration/tool/img/ic/ruler.svg +125 -0
- package/examples/integration/tool/img/ic/selection-plus.svg +10 -0
- package/examples/integration/tool/img/ic/selection.svg +1 -0
- package/examples/integration/tool/img/ic/settings.svg +1 -0
- package/examples/integration/tool/img/ic/sort.svg +1 -0
- package/examples/integration/tool/img/ic/sort_asc.svg +1 -0
- package/examples/integration/tool/img/ic/sort_desc.svg +1 -0
- package/examples/integration/tool/img/ic/spreadsheet.svg +3 -0
- package/examples/integration/tool/img/ic/times.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/AB3.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/AB4.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/IC1.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/TB1.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/TB11.svg +5 -0
- package/examples/integration/tool/img/ic/toolbar/TB2.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/TB20.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/TB21.svg +54 -0
- package/examples/integration/tool/img/ic/toolbar/TB3.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/TB31.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/TB32.svg +57 -0
- package/examples/integration/tool/img/ic/toolbar/TB4.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/TB5.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/TB6.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/TB7.svg +1 -0
- package/examples/integration/tool/img/ic/toolbar/TB8.svg +1 -0
- package/examples/integration/tool/img/ic/tools.svg +28 -0
- package/examples/integration/tool/img/ic/user.svg +1 -0
- package/examples/integration/tool/img/ic/vector-polygon.svg +1 -0
- package/examples/integration/tool/img/ic/visit_manager.svg +135 -0
- package/examples/integration/tool/img/logo-footer-login.png +0 -0
- package/examples/integration/tool/img/logo-footer.png +0 -0
- package/examples/integration/tool/img/logo-header-login.png +0 -0
- package/examples/integration/tool/img/logo-header-login@2x.png +0 -0
- package/examples/integration/tool/img/logo-header-login@3x.png +0 -0
- package/examples/integration/tool/img/logo-header.png +0 -0
- package/examples/integration/tool/img/logo-header@2x.png +0 -0
- package/examples/integration/tool/img/logo-header@3x.png +0 -0
- package/examples/integration/tool/img/logo_project.png +0 -0
- package/examples/integration/tool/img/photo-gallery-placeholder.svg +3 -0
- package/examples/integration/tool/img/pixel.png +0 -0
- package/examples/integration/tool/index.html +228 -0
- package/examples/integration/tool/js/demo.js +238 -0
- package/examples/integration/tool/js/interface.js +147 -0
- package/examples/integration/tool/js/jquery.js +4 -0
- package/examples/integration/vanguardia.html +6636 -0
- package/examples/simple/index.html +1 -1
- package/examples/vidromap/index.js +2 -2
- package/examples/vidromap/index.php +18 -3
- package/flows.md +73 -0
- package/package.json +1 -1
- package/src/index.js +75 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Map Handler
|
|
2
2
|
|
|
3
|
-
#### Version 1.0.
|
|
3
|
+
#### Version 1.0.8 - January 2022
|
|
4
4
|
|
|
5
5
|
Tool to achieve the easiest way of communication with the map iframe.
|
|
6
6
|
|
|
@@ -8,6 +8,8 @@ Tool to achieve the easiest way of communication with the map iframe.
|
|
|
8
8
|
- [Events](#Events)
|
|
9
9
|
- [Methods](#Methods)
|
|
10
10
|
|
|
11
|
+
Some of the multiple use case flows are documented in [flows.md](flows.md)
|
|
12
|
+
|
|
11
13
|
## TL;DR
|
|
12
14
|
|
|
13
15
|
```
|
|
@@ -149,6 +151,10 @@ Notifies an array of displayed GeoJSON layers
|
|
|
149
151
|
|
|
150
152
|
Notifies wich layer is marked as active
|
|
151
153
|
|
|
154
|
+
##### WMSInfoAvailable
|
|
155
|
+
|
|
156
|
+
Notifies when WMS is available for this map
|
|
157
|
+
|
|
152
158
|
##### availableWMSLayers
|
|
153
159
|
|
|
154
160
|
List of available layers from WMS server
|
|
@@ -241,13 +247,14 @@ Zooms to given coordinates
|
|
|
241
247
|
|
|
242
248
|
> Params
|
|
243
249
|
|
|
244
|
-
-
|
|
250
|
+
- lat (x) `<integer>`
|
|
251
|
+
- long (y) `<integer>`
|
|
245
252
|
- zoomLevel `<integer>` - zoom level
|
|
246
253
|
|
|
247
254
|
> E.G.
|
|
248
255
|
|
|
249
256
|
```
|
|
250
|
-
zoomToCoordinates(
|
|
257
|
+
zoomToCoordinates(419006.12985785044, 4576698.8136144625,18);
|
|
251
258
|
|
|
252
259
|
```
|
|
253
260
|
|
|
@@ -282,13 +289,33 @@ Shows/hides a layer
|
|
|
282
289
|
> Params
|
|
283
290
|
|
|
284
291
|
- layerName `<string>` - layer name
|
|
292
|
+
- properties `<object>` - _optional_ layer properties
|
|
293
|
+
- gutter `<integer>` - The size in pixels of the gutter around image tiles to ignore, only applies for multitile layer
|
|
294
|
+
- singletile `<boolean>` - SingleTile Layer
|
|
295
|
+
- transparent `<boolean>` - Transparent Layer
|
|
296
|
+
|
|
297
|
+
By default, layer properties will be:
|
|
298
|
+
|
|
299
|
+
`gutter: 0`
|
|
300
|
+
|
|
301
|
+
`singletile: false` - will render a multitile layer
|
|
302
|
+
|
|
303
|
+
`transparent: true`
|
|
285
304
|
|
|
286
305
|
> E.G.
|
|
287
306
|
|
|
307
|
+
With no properties
|
|
308
|
+
|
|
288
309
|
```
|
|
289
310
|
toggleLayer('somelayer_name');
|
|
290
311
|
```
|
|
291
312
|
|
|
313
|
+
With properties
|
|
314
|
+
|
|
315
|
+
```
|
|
316
|
+
toggleLayer('somelayer_name', {gutter: 10, transparent: false, singletile: false);
|
|
317
|
+
```
|
|
318
|
+
|
|
292
319
|
##### setActiveLayer()
|
|
293
320
|
|
|
294
321
|
Sets a layer as acticve layer, used for infos
|
|
@@ -397,8 +424,10 @@ Params
|
|
|
397
424
|
|
|
398
425
|
let options = {
|
|
399
426
|
'geom': 'MULTILINESTRING((418596.62555076234 4577083.383681167,419026.2319996517 4577216.795306675))',
|
|
400
|
-
'
|
|
401
|
-
|
|
427
|
+
'zoom':{
|
|
428
|
+
'type':'level',
|
|
429
|
+
'zoomLevel':6
|
|
430
|
+
}
|
|
402
431
|
}
|
|
403
432
|
|
|
404
433
|
Highlight(options);
|
|
@@ -407,7 +436,9 @@ Highlight(options);
|
|
|
407
436
|
|
|
408
437
|
let options = {
|
|
409
438
|
'geom': 'MULTILINESTRING((418596.62555076234 4577083.383681167,419026.2319996517 4577216.795306675))',
|
|
410
|
-
'
|
|
439
|
+
'zoom':{
|
|
440
|
+
'type':'element'
|
|
441
|
+
}
|
|
411
442
|
}
|
|
412
443
|
|
|
413
444
|
Highlight(options);
|
|
@@ -510,6 +541,43 @@ getGiswaterLayerAvailableFilters(layername);
|
|
|
510
541
|
getGiswaterLayerAvailableFilters("Arc");
|
|
511
542
|
```
|
|
512
543
|
|
|
544
|
+
##### setCustomColors
|
|
545
|
+
|
|
546
|
+
Sets colors and stroke width for added & highlight geometries.
|
|
547
|
+
|
|
548
|
+
Properties:
|
|
549
|
+
|
|
550
|
+
- `geom_stroke_color` - stroke color in RGB format
|
|
551
|
+
- `geom_fill_color` - fill color in RGB format
|
|
552
|
+
- `geom_stroke_width` - stroke width in pixels, default 1.
|
|
553
|
+
- `geom_shape` - shape por point, `circle`(default) or `square`
|
|
554
|
+
- `radius` - point radius or square side in pixels. Default 4.
|
|
555
|
+
|
|
556
|
+
```
|
|
557
|
+
setCustomColors({geom_stroke_color, geom_fill_color, geom_stroke_width,geom_shape});
|
|
558
|
+
```
|
|
559
|
+
|
|
560
|
+
> E.G.
|
|
561
|
+
|
|
562
|
+
```
|
|
563
|
+
setCustomColors({
|
|
564
|
+
geom_stroke_color: 'rgb(19, 39, 99,0.5)',
|
|
565
|
+
geom_fill_color: 'rgb(19, 39, 99,0.5)',
|
|
566
|
+
geom_stroke_width: 1,
|
|
567
|
+
geom_shape: 'circle',
|
|
568
|
+
radius: 2
|
|
569
|
+
});
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
On Bmaps projects, default values are taken from Backoffice:
|
|
573
|
+
|
|
574
|
+
```
|
|
575
|
+
geom_stroke_color -> Bmaps: geom_select_stroke_color
|
|
576
|
+
geom_fill_color -> Bmaps: geom_select_fill_color
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
|
|
580
|
+
|
|
513
581
|
### Multiple iframes
|
|
514
582
|
|
|
515
583
|
Is possible to use multiple iframe on a single page, follow this steps.
|
|
@@ -592,7 +660,6 @@ Multiple iframes integration
|
|
|
592
660
|
|
|
593
661
|
[https://www.vidrosoftware.com/examples/multipleiframes/]()
|
|
594
662
|
|
|
595
|
-
|
|
596
663
|
### Known issues
|
|
597
664
|
|
|
598
665
|
- **Custom logo is not displayed**
|
|
@@ -605,4 +672,16 @@ With Apache can be solved with and `.htaccess` file with this content:
|
|
|
605
672
|
Header set Access-Control-Allow-Origin "*"
|
|
606
673
|
Header add Cross-Origin-Resource-Policy: "cross-origin"
|
|
607
674
|
Header add Cross-Origin-Embedder-Policy: "require-corp"
|
|
608
|
-
```
|
|
675
|
+
```
|
|
676
|
+
|
|
677
|
+
- **QGIS Broken symbology**
|
|
678
|
+
|
|
679
|
+
QGIS multi tile layers could show broken symbology:
|
|
680
|
+
|
|
681
|
+

|
|
682
|
+
|
|
683
|
+
This can be solved using `singletile: true` or adding `gutter: value in pixels` if is a multitiule layer, on toggleLayer method.
|
|
684
|
+
|
|
685
|
+
Is if is a Giswwater project, you can set this options (`Render mode` and `Gutter`) on Bmaps backoffice.
|
|
686
|
+
|
|
687
|
+

|
package/dist/map-handler.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VidroMaps=t():e.VidroMaps=t()}(self,(function(){return(()=>{"use strict";var e={187:e=>{var t,n="object"==typeof Reflect?Reflect:null,o=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,o){function r(n){e.removeListener(t,s),o(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}v(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&v(e,"error",t,{once:!0})}(e,r)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var i=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function u(e,t,n,o){var r,s,i,u;if(a(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),i=s[t]),void 0===i)i=s[t]=n,++e._eventsCount;else if("function"==typeof i?i=s[t]=o?[n,i]:[i,n]:o?i.unshift(n):i.push(n),(r=c(e))>0&&i.length>r&&!i.warned){i.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=i.length,u=f,console&&console.warn&&console.warn(u)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var o={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=f.bind(o);return r.listener=n,o.wrapFn=r,r}function l(e,t,n){var o=e._events;if(void 0===o)return[];var r=o[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):m(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),o=0;o<t;++o)n[o]=e[o];return n}function v(e,t,n,o){if("function"==typeof e.on)o.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(s){o.once&&e.removeEventListener(t,r),n(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,s=this._events;if(void 0!==s)r=r&&void 0===s.error;else if(!r)return!1;if(r){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var c=s[e];if(void 0===c)return!1;if("function"==typeof c)o(c,this,t);else{var u=c.length,f=m(c,u);for(n=0;n<u;++n)o(f[n],this,t)}return!0},s.prototype.addListener=function(e,t){return u(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return u(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,o,r,s,i;if(a(t),void 0===(o=this._events))return this;if(void 0===(n=o[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete o[e],o.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){i=n[s].listener,r=s;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(o[e]=n[0]),void 0!==o.removeListener&&this.emit("removeListener",e,i||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,o;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,s=Object.keys(n);for(o=0;o<s.length;++o)"removeListener"!==(r=s[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(o=t.length-1;o>=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return l(this,e,!0)},s.prototype.rawListeners=function(e){return l(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{n.r(o),n.d(o,{Communicator:()=>d});var e=n(187),t="undefined"==typeof window,r=function e(n){var o,r,s=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=function(e){t||document.getElementById(s.domId)&&window.top.frames[s.domId].postMessage(e,"*")},(o="sendMessageToMap")in this?Object.defineProperty(this,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[o]=r,this.domId="map-frame","string"==typeof n.id&&(this.domId=n.id)};function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?c(e):t}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(d,e);var t,n,o=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=u(t);if(n){var r=u(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return a(this,e)});function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),f(c(t=o.call(this)),"onMessageReceived",(function(e){switch(e.data.type){case"onZoomChange":t.emitEvent("onZoomChange",e.data.zoom,e.data.domId);break;case"geomAdded":t.emitEvent("geomAdded",e.data.geom_astext,e.data.domId);break;case"layers":t.emitEvent("layers",e.data.layers,e.data.domId);break;case"geoJSONlayers":t.emitEvent("geoJSONlayers",e.data.layers,e.data.domId);break;case"info":t.emitEvent("info",e.data,e.data.domId);break;case"error":t.emitEvent("error",e.data,e.data.domId);break;case"coordinates":t.emitEvent("coordinates",e.data,e.data.domId);break;case"activeLayer":t.emitEvent("activeLayer",e.data,e.data.domId);break;case"geolocation":t.emitEvent("geolocation",e.data,e.data.domId);break;case"WMSInfoAvailable":t.emitEvent("WMSInfoAvailable",e.data,e.data.domId);break;case"giswaterTiledBackgroundDisplayed":t.emitEvent("giswaterTiledBackgroundDisplayed",e.data,e.data.domId);break;case"giswaterTiledBackgroundAvailable":t.emitEvent("giswaterTiledBackgroundAvailable",e.data,e.data.domId);break;case"GiswaterLayerAvailableFilters":t.emitEvent("GiswaterLayerAvailableFilters",e.data,e.data.domId);break;case"loaded":t.emitEvent("loaded",e.data,e.data.domId);break;case"availableWMSLayers":t.emitEvent("availableWMSLayers",e.data.layers,e.data.domId)}})),f(c(t),"emitEvent",(function(e,n,o){o===t.domId&&(delete n.domId,t.emit(e,n))})),f(c(t),"ZoomIn",(function(){t.com.sendMessageToMap({type:"zoomIn",sessionToken:t.sessionToken})})),f(c(t),"ZoomOut",(function(){t.com.sendMessageToMap({type:"zoomOut",sessionToken:t.sessionToken})})),f(c(t),"AddGeom",(function(e){t.com.sendMessageToMap({type:"AddGeom",geom:e,sessionToken:t.sessionToken})})),f(c(t),"toggleLayer",(function(e){t.com.sendMessageToMap({type:"toggleLayer",layer:e,sessionToken:t.sessionToken})})),f(c(t),"setActiveLayer",(function(e){t.com.sendMessageToMap({type:"setActiveLayer",layer:e,sessionToken:t.sessionToken})})),f(c(t),"getActiveLayer",(function(){t.com.sendMessageToMap({type:"getActiveLayer",sessionToken:t.sessionToken})})),f(c(t),"loadWMSAvailableLayers",(function(){t.com.sendMessageToMap({type:"loadWMSAvailableLayers",sessionToken:t.sessionToken})})),f(c(t),"clear",(function(){t.com.sendMessageToMap({type:"clear",sessionToken:t.sessionToken})})),f(c(t),"Highlight",(function(e){t.com.sendMessageToMap({type:"highlight",geom:e.geom,zoom:e.zoom,sessionToken:t.sessionToken})})),f(c(t),"zoomToExtent",(function(){t.com.sendMessageToMap({type:"zoomToExtent",sessionToken:t.sessionToken})})),f(c(t),"zoomToCoordinates",(function(e,n,o){isNaN(parseInt(o))||t.com.sendMessageToMap({type:"zoomToCoordinates",sessionToken:t.sessionToken,coordinates:[e,n],zoomLevel:o})})),f(c(t),"infoFromCoordinates",(function(e,n,o){var r=void 0===n?null:n;t.com.sendMessageToMap({type:"infoFromCoordinates",info:e,layer:r,hitTolerance:void 0!==o?parseInt(o):5,sessionToken:t.sessionToken})})),f(c(t),"Geolocalize",(function(e){t.com.sendMessageToMap({type:"Geolocalize",toggle:e,sessionToken:t.sessionToken})})),f(c(t),"toggleGiswaterTiled",(function(e){t.com.sendMessageToMap({type:"toggleGiswaterTiled",toggle:e,sessionToken:t.sessionToken})})),f(c(t),"reloadDisplayedLayers",(function(){return t.com.sendMessageToMap({type:"reloadDisplayedLayers",sessionToken:t.sessionToken})})),f(c(t),"addGeoJSON",(function(e,n,o){return e?t.com.sendMessageToMap({type:"addGeoJSON",geoJSON:e,options:void 0!==n?n:{fillcolor:null,strokecolor:null},name:o||Math.random().toString(36).substring(7),sessionToken:t.sessionToken}):void t.emit("error",{error:"No geoJSON data"})})),f(c(t),"clearGeoJSON",(function(){return t.com.sendMessageToMap({type:"clearGeoJSON",sessionToken:t.sessionToken})})),f(c(t),"removeGeoJSONLayer",(function(e){return e?t.com.sendMessageToMap({type:"removeGeoJSONLayer",name:e,sessionToken:t.sessionToken}):void t.emit("error",{error:"No geoJSON data"})})),f(c(t),"setGiswaterFilters",(function(e){var n=e;if(e){if("object"!=s(e)){e=(e=(e=e.trim()).replace(/^\s+|\s+$/g,"")).replace(/\\/g,"");try{n=JSON.parse(e)}catch(e){return void t.emit("error",{error:"Filters is not a valid JSON"})}}return t.com.sendMessageToMap({type:"setGiswaterFilters",filters:n,sessionToken:t.sessionToken})}t.emit("error",{error:"No filters"})})),f(c(t),"getGiswaterLayerAvailableFilters",(function(e){return e?t.com.sendMessageToMap({type:"getGiswaterLayerAvailableFilters",name:e,sessionToken:t.sessionToken}):void t.emit("error",{error:"No layer_name"})})),f(c(t),"setDebug",(function(e){console.log("setDebug culo",e),isNaN(parseInt(e))?console.error("Debug is not a integer"):t.com.sendMessageToMap({type:"setDebug",what:e,sessionToken:t.sessionToken})})),t.domId="map-frame","undefined"==typeof window?a(t):("string"==typeof e.id&&(t.domId=e.id),t.com=new r(e),window.addEventListener("message",(function(e){return t.onMessageReceived(e)})),t.sessionToken=e.sessionToken,t)}return d}(e.EventEmitter)})(),o})()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VidroMaps=t():e.VidroMaps=t()}(self,(function(){return(()=>{"use strict";var e={187:e=>{var t,n="object"==typeof Reflect?Reflect:null,o=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var r=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise((function(n,o){function r(n){e.removeListener(t,s),o(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}y(e,t,s,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,r)}))},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var i=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function u(e,t,n,o){var r,s,i,u;if(a(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),i=s[t]),void 0===i)i=s[t]=n,++e._eventsCount;else if("function"==typeof i?i=s[t]=o?[n,i]:[i,n]:o?i.unshift(n):i.push(n),(r=l(e))>0&&i.length>r&&!i.warned){i.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=i.length,u=c,console&&console.warn&&console.warn(u)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,n){var o={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=c.bind(o);return r.listener=n,o.wrapFn=r,r}function f(e,t,n){var o=e._events;if(void 0===o)return[];var r=o[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):m(r,r.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),o=0;o<t;++o)n[o]=e[o];return n}function y(e,t,n,o){if("function"==typeof e.on)o.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function r(s){o.once&&e.removeEventListener(t,r),n(s)}))}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");i=e}}),s.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,s=this._events;if(void 0!==s)r=r&&void 0===s.error;else if(!r)return!1;if(r){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var l=s[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var u=l.length,c=m(l,u);for(n=0;n<u;++n)o(c[n],this,t)}return!0},s.prototype.addListener=function(e,t){return u(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return u(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,o,r,s,i;if(a(t),void 0===(o=this._events))return this;if(void 0===(n=o[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete o[e],o.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){i=n[s].listener,r=s;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(o[e]=n[0]),void 0!==o.removeListener&&this.emit("removeListener",e,i||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,o;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,s=Object.keys(n);for(o=0;o<s.length;++o)"removeListener"!==(r=s[o])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(o=t.length-1;o>=0;o--)this.removeListener(e,t[o]);return this},s.prototype.listeners=function(e){return f(this,e,!0)},s.prototype.rawListeners=function(e){return f(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{n.r(o),n.d(o,{Communicator:()=>d});var e=n(187),t="undefined"==typeof window,r=function e(n){var o,r,s=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r=function(e){t||window.top.frames[s.domId].postMessage(e,"*")},(o="sendMessageToMap")in this?Object.defineProperty(this,o,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[o]=r,this.domId="map-frame","string"==typeof n.id&&(this.domId=n.id)};function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?l(e):t}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(d,e);var t,n,o=(t=d,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,o=u(t);if(n){var r=u(this).constructor;e=Reflect.construct(o,arguments,r)}else e=o.apply(this,arguments);return a(this,e)});function d(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),c(l(t=o.call(this)),"onMessageReceived",(function(e){switch(e.data.type){case"onZoomChange":t.emitEvent("onZoomChange",e.data.zoom,e.data.domId);break;case"geomAdded":t.emitEvent("geomAdded",e.data.geom_astext,e.data.domId);break;case"layers":t.emitEvent("layers",e.data.layers,e.data.domId);break;case"geoJSONlayers":t.emitEvent("geoJSONlayers",e.data.layers,e.data.domId);break;case"info":t.emitEvent("info",e.data,e.data.domId);break;case"error":t.emitEvent("error",e.data,e.data.domId);break;case"coordinates":t.emitEvent("coordinates",e.data,e.data.domId);break;case"activeLayer":t.emitEvent("activeLayer",e.data,e.data.domId);break;case"geolocation":t.emitEvent("geolocation",e.data,e.data.domId);break;case"WMSInfoAvailable":t.emitEvent("WMSInfoAvailable",e.data,e.data.domId);break;case"giswaterTiledBackgroundDisplayed":t.emitEvent("giswaterTiledBackgroundDisplayed",e.data,e.data.domId);break;case"giswaterTiledBackgroundAvailable":t.emitEvent("giswaterTiledBackgroundAvailable",e.data,e.data.domId);break;case"GiswaterLayerAvailableFilters":t.emitEvent("GiswaterLayerAvailableFilters",e.data,e.data.domId);break;case"loaded":t.emitEvent("loaded",e.data,e.data.domId);break;case"availableWMSLayers":t.emitEvent("availableWMSLayers",e.data.layers,e.data.domId)}})),c(l(t),"emitEvent",(function(e,n,o){o===t.domId&&(delete n.domId,t.emit(e,n))})),c(l(t),"ZoomIn",(function(){t.com.sendMessageToMap({type:"zoomIn",sessionToken:t.sessionToken})})),c(l(t),"ZoomOut",(function(){t.com.sendMessageToMap({type:"zoomOut",sessionToken:t.sessionToken})})),c(l(t),"AddGeom",(function(e){t.com.sendMessageToMap({type:"AddGeom",geom:e,sessionToken:t.sessionToken})})),c(l(t),"toggleLayer",(function(e,n){void 0===n&&(n={gutter:null,transparent:null,singletile:null}),null!==n.singletile&&"boolean"!=typeof n.singletile&&(n.singletile=null,t.emit("error",{error:"singleTile must be a Boolean"})),""!==n.gutter&&null!==n.gutter&&(isNaN(parseInt(n.gutter))&&(n.gutter=null,t.emit("error",{error:"Gutter must be a number"})),n.singletile&&(n.gutter=null,t.emit("error",{error:"Gutter can only be user with multitile layers; set singletile to false"}))),null!==n.transparent&&"boolean"!=typeof n.transparent&&(n.transparent=null,t.emit("error",{error:"transparent must be a Boolean"})),t.com.sendMessageToMap({type:"toggleLayer",layer:e,gutter:isNaN(parseInt(n.gutter))?null:parseInt(n.gutter),transparent:n.transparent,singletile:n.singletile,sessionToken:t.sessionToken})})),c(l(t),"setActiveLayer",(function(e){t.com.sendMessageToMap({type:"setActiveLayer",layer:e,sessionToken:t.sessionToken})})),c(l(t),"getActiveLayer",(function(){t.com.sendMessageToMap({type:"getActiveLayer",sessionToken:t.sessionToken})})),c(l(t),"loadWMSAvailableLayers",(function(){t.com.sendMessageToMap({type:"loadWMSAvailableLayers",sessionToken:t.sessionToken})})),c(l(t),"clear",(function(){t.com.sendMessageToMap({type:"clear",sessionToken:t.sessionToken})})),c(l(t),"Highlight",(function(e){t.com.sendMessageToMap({type:"highlight",geom:e.geom,zoom:e.zoom,sessionToken:t.sessionToken})})),c(l(t),"zoomToExtent",(function(){t.com.sendMessageToMap({type:"zoomToExtent",sessionToken:t.sessionToken})})),c(l(t),"zoomToCoordinates",(function(e,n,o){isNaN(parseInt(o))||t.com.sendMessageToMap({type:"zoomToCoordinates",sessionToken:t.sessionToken,coordinates:[e,n],zoomLevel:o})})),c(l(t),"infoFromCoordinates",(function(e,n,o){var r=void 0===n?null:n;t.com.sendMessageToMap({type:"infoFromCoordinates",info:e,layer:r,hitTolerance:void 0!==o?parseInt(o):5,sessionToken:t.sessionToken})})),c(l(t),"Geolocalize",(function(e){t.com.sendMessageToMap({type:"Geolocalize",toggle:e,sessionToken:t.sessionToken})})),c(l(t),"toggleGiswaterTiled",(function(e){t.com.sendMessageToMap({type:"toggleGiswaterTiled",toggle:e,sessionToken:t.sessionToken})})),c(l(t),"reloadDisplayedLayers",(function(){return t.com.sendMessageToMap({type:"reloadDisplayedLayers",sessionToken:t.sessionToken})})),c(l(t),"addGeoJSON",(function(e,n,o){return e?t.com.sendMessageToMap({type:"addGeoJSON",geoJSON:e,options:void 0!==n?n:{fillcolor:null,strokecolor:null},name:o||Math.random().toString(36).substring(7),sessionToken:t.sessionToken}):void t.emit("error",{error:"No geoJSON data"})})),c(l(t),"clearGeoJSON",(function(){return t.com.sendMessageToMap({type:"clearGeoJSON",sessionToken:t.sessionToken})})),c(l(t),"removeGeoJSONLayer",(function(e){return e?t.com.sendMessageToMap({type:"removeGeoJSONLayer",name:e,sessionToken:t.sessionToken}):void t.emit("error",{error:"No geoJSON data"})})),c(l(t),"setGiswaterFilters",(function(e){var n=e;if(e){if("object"!=s(e)){e=(e=(e=e.trim()).replace(/^\s+|\s+$/g,"")).replace(/\\/g,"");try{n=JSON.parse(e)}catch(e){return void t.emit("error",{error:"Filters is not a valid JSON"})}}return t.com.sendMessageToMap({type:"setGiswaterFilters",filters:n,sessionToken:t.sessionToken})}t.emit("error",{error:"No filters"})})),c(l(t),"getGiswaterLayerAvailableFilters",(function(e){return e?t.com.sendMessageToMap({type:"getGiswaterLayerAvailableFilters",name:e,sessionToken:t.sessionToken}):void t.emit("error",{error:"No layer_name"})})),c(l(t),"setDebug",(function(e){isNaN(parseInt(e))?console.error("Debug is not a integer"):t.com.sendMessageToMap({type:"setDebug",what:e,sessionToken:t.sessionToken})})),c(l(t),"setCustomColors",(function(e){if("object"===s(e)){if(e.hasOwnProperty("geom_stroke_width")){if(isNaN(parseInt(e.geom_stroke_width)))return void console.error("geom_stroke_width is not an number");e.geom_stroke_width=parseInt(e.geom_stroke_width)}else e.geom_stroke_width=1;if(e.hasOwnProperty("geom_radius")){if(isNaN(parseInt(e.geom_radius)))return void console.error("geom_stroke_width is not an number");e.geom_radius=parseInt(e.geom_radius)}else e.geom_radius=4;e.hasOwnProperty("geom_shape")&&"circle"!==e.geom_shape&&"square"!==e.geom_shape&&(e.geom_shape="circle",console.error("geom_shape must be either 'circle' or 'square'")),t.com.sendMessageToMap({type:"setCustomColors",properties:e,sessionToken:t.sessionToken})}else console.error("properties is not an object")})),t.domId="map-frame","undefined"==typeof window?a(t):("string"==typeof e.id&&(t.domId=e.id),t.com=new r(e),window.addEventListener("message",(function(e){return t.onMessageReceived(e)})),t.sessionToken=e.sessionToken,t)}return d}(e.EventEmitter)})(),o})()}));
|
package/doc/giswater.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/examples/full/apidemo.js
CHANGED
|
@@ -19,7 +19,7 @@ var btLoadMap = document.querySelector("#btLoadMap");
|
|
|
19
19
|
var btLoadProjectLayers = document.querySelector("#btLoadProjectLayers");
|
|
20
20
|
var projectlayers = document.getElementById("projectlayers");
|
|
21
21
|
var userData = document.querySelector("#userData");
|
|
22
|
-
|
|
22
|
+
var btAddGeoJSONFromGiswater = document.querySelector("#btAddGeoJSONFromGiswater");
|
|
23
23
|
|
|
24
24
|
var btLogin = document.querySelector("#btLogin");
|
|
25
25
|
|
|
@@ -272,6 +272,7 @@ btLoadProjectLayers.addEventListener("click", function (evt) {
|
|
|
272
272
|
oReq.send();
|
|
273
273
|
console.log("Attempt to load project layers", uri);
|
|
274
274
|
});
|
|
275
|
+
|
|
275
276
|
function layersListener() {
|
|
276
277
|
if (this.status === 200) {
|
|
277
278
|
console.log("layersListener response", this.responseText);
|
|
@@ -303,3 +304,44 @@ function fillLayersSelect(options){
|
|
|
303
304
|
//empty previous options
|
|
304
305
|
|
|
305
306
|
}
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
if(btAddGeoJSONFromGiswater){
|
|
310
|
+
btAddGeoJSONFromGiswater.addEventListener("click", function(){
|
|
311
|
+
let lay = document.getElementById('currentActiveLayerForGeoJSON').innerHTML.trim();
|
|
312
|
+
console.log(`Requesting Giswater GeoJSON for layer ${lay}`)
|
|
313
|
+
if(lay && lay!==''){
|
|
314
|
+
apiUrl = document.querySelector("#apiurl").value;
|
|
315
|
+
//Build XMLHttpRequest
|
|
316
|
+
var selectedProjectId =
|
|
317
|
+
projects_select.options[projects_select.selectedIndex].value;
|
|
318
|
+
var uri = `${apiUrl}giswater/geojson/${selectedProjectId}/${lay}`;
|
|
319
|
+
var oReq = new XMLHttpRequest();
|
|
320
|
+
oReq.addEventListener("load", GeoJSONListener);
|
|
321
|
+
oReq.open("GET", uri, true);
|
|
322
|
+
oReq.setRequestHeader('Authorization',`Bearer ${usertoken.value}`);
|
|
323
|
+
oReq.setRequestHeader("Content-type", "application/json");
|
|
324
|
+
oReq.send();
|
|
325
|
+
}
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function GeoJSONListener(){
|
|
330
|
+
if (this.status === 200) {
|
|
331
|
+
try{
|
|
332
|
+
var res = JSON.parse(this.responseText);
|
|
333
|
+
console.log("GeoJSONListener response", res.message);
|
|
334
|
+
if(document.getElementById('geojsondata')){
|
|
335
|
+
document.getElementById('geojsondata').value = JSON.stringify(res.message);
|
|
336
|
+
var btAddGeoJSON = document.querySelector("#btAddGeoJSON");
|
|
337
|
+
if(btAddGeoJSON){
|
|
338
|
+
btAddGeoJSON.click();
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}catch(e){
|
|
342
|
+
console.error("Invalid API response")
|
|
343
|
+
}
|
|
344
|
+
} else {
|
|
345
|
+
console.error(this.status);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
170e6711fb6bc66563082bfc6237c548
|
|
@@ -1 +1 @@
|
|
|
1
|
-
129,130,131,132,126,128,117
|
|
1
|
+
129,130,131,132,126,128,117,162
|
package/examples/full/index.php
CHANGED
|
@@ -55,8 +55,6 @@
|
|
|
55
55
|
<div>
|
|
56
56
|
Use Giswater tiled: <input type="checkbox" name="use_giswater_tiled" id="use_giswater_tiled" size="5" value=""> <small>If tiled background available, load it with map render</small>
|
|
57
57
|
</div>
|
|
58
|
-
|
|
59
|
-
|
|
60
58
|
<div>
|
|
61
59
|
Override Capabitilites extent: <input type="text" name="extent" id="extent" size="55" value="" placeholder="397663,4615771,406392,4623596"> <small>Override project extent</small>
|
|
62
60
|
</div>
|
|
@@ -66,7 +64,7 @@
|
|
|
66
64
|
<hr>
|
|
67
65
|
<h5>Development parameters</h5>
|
|
68
66
|
<div>
|
|
69
|
-
Override iframe url: <input type="text" name="overrideHost" id="overrideHost" size="35" value="" placeholder="http://localhost:3000"> <small>Override map component url</small>
|
|
67
|
+
Override iframe url: <input type="text" name="overrideHost" id="overrideHost" size="35" value="http://localhost:3000" placeholder="http://localhost:3000"> <small>Override map component url</small>
|
|
70
68
|
</div>
|
|
71
69
|
<div>
|
|
72
70
|
Debug
|
|
@@ -92,6 +90,31 @@
|
|
|
92
90
|
<hr />
|
|
93
91
|
<pre id="Result_container"></pre>
|
|
94
92
|
<hr/>
|
|
93
|
+
<h2>Layers</h2>
|
|
94
|
+
Project Layers: <select id="projectlayers"></select> - <small>click on "Load Project Layers button</small> <button id="btToggleLayer">Add / Remove Layer</button><br><br>
|
|
95
|
+
Displayed Layers: <select id="layers"></select> -
|
|
96
|
+
<button id="btActiveLayer">Set Active Layer</button>
|
|
97
|
+
<button id="btGetActiveLayer">Get Active Layer</button>
|
|
98
|
+
<span id="currentActiveLayer"></span>
|
|
99
|
+
<button id="btReloadDisplayedLayers">Reload displayed layers</button>
|
|
100
|
+
<br><br>
|
|
101
|
+
Override layer properties (gutter, single/multi tile, transparent)
|
|
102
|
+
<input type="checkbox" name="overrideLayerProperties" id="overrideLayerProperties" value="">
|
|
103
|
+
<div id="containerOverride" style="display: none;">____________________________________________________<br><br>
|
|
104
|
+
Gutter: <input type="text" name="gutter" id="gutter" size="5" value="">
|
|
105
|
+
<br><br>
|
|
106
|
+
Transparent layer:
|
|
107
|
+
<input type="checkbox" name="toggleTransparentLayer" id="toggleTransparentLayer" checked value=""><br><br>
|
|
108
|
+
SingleTile layer:
|
|
109
|
+
<input type="checkbox" name="toggleSingleTile" id="toggleSingleTile" checked value=""><br>
|
|
110
|
+
____________________________________________________
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<h4>Tiled layer</h4>
|
|
114
|
+
<button id="btToggleGiswaterTiled" disabled="true">Show/hide tiled Giswater tiled background</button>
|
|
115
|
+
<input type="checkbox" name="toggleGiswaterTiledCheck" id="toggleGiswaterTiledCheck" size="5" value=""><br><br>
|
|
116
|
+
<small>only for giswater projects with tiled enabled</small>
|
|
117
|
+
</div>
|
|
95
118
|
<h2>Zoom</h2>
|
|
96
119
|
<button id="btZoomIn">Zoom In</button>
|
|
97
120
|
<button id="btZoomOut">Zoom Out</button>
|
|
@@ -107,18 +130,7 @@
|
|
|
107
130
|
<h2>Info</h2>
|
|
108
131
|
<button id="btWMSInfo" disabled="true">WMS Info</button>
|
|
109
132
|
<button id="btGiswaterInfo">Giswater Info</button>
|
|
110
|
-
|
|
111
|
-
Project Layers: <select id="projectlayers"></select> - <small>click on "Load Project Layers button</small> <button id="btToggleLayer">Add / Remove Layer</button><br><br>
|
|
112
|
-
Displayed Layers: <select id="layers"></select> -
|
|
113
|
-
<button id="btActiveLayer">Set Active Layer</button>
|
|
114
|
-
<button id="btGetActiveLayer">Get Active Layer</button>
|
|
115
|
-
<span id="currentActiveLayer"></span>
|
|
116
|
-
<button id="btReloadDisplayedLayers">Reload displayed layers</button>
|
|
117
|
-
<h4>Tiled layer</h4>
|
|
118
|
-
<button id="btToggleGiswaterTiled" disabled="true">Show/hide tiled Giswater tiled background</button>
|
|
119
|
-
<input type="checkbox" name="toggleGiswaterTiledCheck" id="toggleGiswaterTiledCheck" size="5" value=""><br><br>
|
|
120
|
-
<small>only for giswater projects with tiled enabled</small>
|
|
121
|
-
</div>
|
|
133
|
+
|
|
122
134
|
<h2>Geolocation</h2>
|
|
123
135
|
<button id="btGeolocalize">Geolocalize User</button>
|
|
124
136
|
<button id="btStopGeolocalize">Cancel Geolocalize</button>
|
|
@@ -133,15 +145,19 @@
|
|
|
133
145
|
<textarea name="giswaterFilters" id="giswaterFilters" rows="10" cols="20">{"expl_id":[1,2,3]}</textarea>
|
|
134
146
|
<h2>GeoJSON</h2>
|
|
135
147
|
<input type="file" id="geojsonfile" name="geojsonfile" accept="application/json"><small> Select geoJSON file</small><br><br>
|
|
148
|
+
<small>Load a geojson from a Giswater layer<b><span id="currentActiveLayerForGeoJSON"></span></b></span></small> <button id="btAddGeoJSONFromGiswater" disabled>Add GeoJSON from Giswater Layer </button>
|
|
149
|
+
<input type="hidden" name="geojsondata" id="geojsondata"/>
|
|
150
|
+
<br><br>
|
|
136
151
|
<b>Options</b><br><br>
|
|
137
152
|
Stroke color: <input type="text" name="strokecolor" id="strokecolor" size="10" value="#994d4d" placeholder="#000000"> <small>Override stroke color, desfault #ff0000</small><br>
|
|
138
153
|
Fill color: <input type="text" name="fillcolor" id="fillcolor" size="10" value="#4d995c" placeholder="#000000"> <small>Override fill color, desfault #ff0000</small><br><br>
|
|
139
154
|
<button id="btAddGeoJSON">Add GeoJSON Layer</button> <button id="btClearGeoJSON">Clear GeoJSON Layers</button><br><br>
|
|
140
155
|
<input type="text" name="hitTolerance" id="hitTolerance" size="5" value="" placeholder="5"> <small>Override hit tolerance</small><br><br>
|
|
156
|
+
|
|
141
157
|
Selected GeoJSON Layer: <select id="geojsonlayers"></select> - <button id="btGeoJSONInfo" disabled="true">GeoJSON Info</button> <button id="btRemoveGeoJSONLayer" disabled="true">Remove GeoJSON Layer</button><br><br>
|
|
142
158
|
|
|
143
159
|
|
|
144
|
-
<script src="https://unpkg.com/@vidro/map-handler@1.0.
|
|
160
|
+
<script src="https://unpkg.com/@vidro/map-handler@1.0.8/dist/map-handler.js"></script>
|
|
145
161
|
<script src="./tester.js"></script>
|
|
146
162
|
<script src="./apidemo.js"></script>
|
|
147
163
|
</body>
|
package/examples/full/tester.js
CHANGED
|
@@ -36,6 +36,21 @@ var btsetGiswaterFilters = document.querySelector("#btsetGiswaterFilters");
|
|
|
36
36
|
var btgetGiswaterFilters = document.querySelector("#btgetGiswaterFilters");
|
|
37
37
|
var btLoadWMSLayers = document.querySelector("#btLoadWMSLayers");
|
|
38
38
|
var btDebug = document.querySelector("#btDebug");
|
|
39
|
+
var btAddGeoJSONFromGiswater = document.querySelector("#btAddGeoJSONFromGiswater");
|
|
40
|
+
//override layer properties
|
|
41
|
+
var overrideLayerProperties = document.querySelector("#overrideLayerProperties");
|
|
42
|
+
var gutter = document.querySelector("#gutter");
|
|
43
|
+
var toggleTransparentLayer = document.querySelector("#toggleTransparentLayer");
|
|
44
|
+
var toggleSingleTile = document.querySelector("#toggleSingleTile");
|
|
45
|
+
var containerOverride = document.querySelector("#containerOverride");
|
|
46
|
+
//custom colores
|
|
47
|
+
var geom_stroke_color = document.querySelector("#geom_stroke_color");
|
|
48
|
+
var geom_stroke_width = document.querySelector("#geom_stroke_width");
|
|
49
|
+
var geom_fill_color = document.querySelector("#geom_fill_color");
|
|
50
|
+
var geom_shape = document.querySelector("#geom_shape");
|
|
51
|
+
var geom_radius = document.querySelector("#geom_radius");
|
|
52
|
+
|
|
53
|
+
var btSetColors = document.querySelector("#btSetColors");
|
|
39
54
|
|
|
40
55
|
var geoJSONName = null; //geoJSON file name
|
|
41
56
|
var geoJSONContent = null; // geojson file content
|
|
@@ -247,11 +262,72 @@ if(btStopGeolocalize){
|
|
|
247
262
|
communicator.Geolocalize(false);
|
|
248
263
|
});
|
|
249
264
|
}
|
|
265
|
+
//**********************************************************
|
|
266
|
+
//************** LAYERS ****************
|
|
267
|
+
//**********************************************************
|
|
250
268
|
if(btToggleLayer){
|
|
251
269
|
btToggleLayer.addEventListener("click", function(){
|
|
270
|
+
|
|
271
|
+
if(overrideLayerProperties){
|
|
272
|
+
if(overrideLayerProperties.checked){
|
|
273
|
+
var properties = {};
|
|
274
|
+
if(toggleTransparentLayer){
|
|
275
|
+
properties.transparent = toggleTransparentLayer.checked;
|
|
276
|
+
|
|
277
|
+
}
|
|
278
|
+
if(toggleSingleTile){
|
|
279
|
+
properties.singletile = toggleSingleTile.checked;
|
|
280
|
+
}
|
|
281
|
+
if(gutter) properties.gutter = gutter.value;
|
|
282
|
+
communicator.toggleLayer(document.getElementById('projectlayers').value,properties);
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
}
|
|
287
|
+
|
|
252
288
|
communicator.toggleLayer(document.getElementById('projectlayers').value);
|
|
253
289
|
});
|
|
254
290
|
}
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
if(btGetActiveLayer){
|
|
294
|
+
btGetActiveLayer.addEventListener("click", function(){
|
|
295
|
+
cleanContainers();
|
|
296
|
+
communicator.getActiveLayer();
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
if(btReloadDisplayedLayers){
|
|
300
|
+
btReloadDisplayedLayers.addEventListener("click", function(){
|
|
301
|
+
communicator.reloadDisplayedLayers();
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
if(btLoadWMSLayers){
|
|
305
|
+
btLoadWMSLayers.addEventListener("click", function (evt) {
|
|
306
|
+
console.log('btLoadWMSLayers')
|
|
307
|
+
communicator.loadWMSAvailableLayers();
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
//Override layer properties
|
|
312
|
+
if(overrideLayerProperties){
|
|
313
|
+
overrideLayerProperties.addEventListener("click", function(){
|
|
314
|
+
if(overrideLayerProperties.checked){
|
|
315
|
+
if(containerOverride) containerOverride.style.display = 'block';
|
|
316
|
+
}else{
|
|
317
|
+
if(containerOverride) containerOverride.style.display = 'none';
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
}
|
|
321
|
+
/*
|
|
322
|
+
overrideLayerProperties
|
|
323
|
+
gutter
|
|
324
|
+
toggleTransparentLayer
|
|
325
|
+
toggleSingleTile
|
|
326
|
+
containerOverride*/
|
|
327
|
+
|
|
328
|
+
//**********************************************************
|
|
329
|
+
//************** END LAYERS ****************
|
|
330
|
+
//**********************************************************
|
|
255
331
|
if(btClear){
|
|
256
332
|
btClear.addEventListener("click", function(){
|
|
257
333
|
cleanContainers();
|
|
@@ -282,25 +358,10 @@ if(btActiveLayer){
|
|
|
282
358
|
communicator.setActiveLayer(document.getElementById('layers').value);
|
|
283
359
|
currentActiveLayer = document.getElementById('layers').value;
|
|
284
360
|
document.getElementById('currentActiveLayer').innerHTML = `<b>Active layer</b>: ${currentActiveLayer}`;
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
cleanContainers();
|
|
290
|
-
communicator.getActiveLayer();
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
if(btReloadDisplayedLayers){
|
|
294
|
-
btReloadDisplayedLayers.addEventListener("click", function(){
|
|
295
|
-
communicator.reloadDisplayedLayers();
|
|
296
|
-
});
|
|
297
|
-
}
|
|
298
|
-
if(btLoadWMSLayers){
|
|
299
|
-
btLoadWMSLayers.addEventListener("click", function (evt) {
|
|
300
|
-
|
|
301
|
-
console.log('btLoadWMSLayers')
|
|
302
|
-
communicator.loadWMSAvailableLayers();
|
|
303
|
-
|
|
361
|
+
if(btAddGeoJSONFromGiswater){
|
|
362
|
+
btAddGeoJSONFromGiswater.disabled = false;
|
|
363
|
+
}
|
|
364
|
+
document.getElementById('currentActiveLayerForGeoJSON').innerHTML = ` ${currentActiveLayer}`;
|
|
304
365
|
});
|
|
305
366
|
}
|
|
306
367
|
|
|
@@ -420,10 +481,11 @@ if(btGeoJSONInfo){
|
|
|
420
481
|
if(btRemoveGeoJSONLayer){
|
|
421
482
|
btRemoveGeoJSONLayer.addEventListener("click", function(){
|
|
422
483
|
cleanContainers();
|
|
423
|
-
|
|
484
|
+
communicator.removeGeoJSONLayer(document.getElementById('geojsonlayers').value);
|
|
424
485
|
});
|
|
425
486
|
}
|
|
426
487
|
|
|
488
|
+
|
|
427
489
|
function fillGeoJSONLayersSelect(options){
|
|
428
490
|
var layers_select = document.getElementById("geojsonlayers");
|
|
429
491
|
if(layers_select){
|
|
@@ -477,3 +539,43 @@ if(btgetGiswaterFilters){
|
|
|
477
539
|
//**********************************************************
|
|
478
540
|
//************** END GISWATER FILTERS ****************
|
|
479
541
|
//**********************************************************
|
|
542
|
+
|
|
543
|
+
//**********************************************************
|
|
544
|
+
//************** CUSTOM COLORS ****************
|
|
545
|
+
//**********************************************************
|
|
546
|
+
|
|
547
|
+
if(btSetColors){
|
|
548
|
+
|
|
549
|
+
btSetColors.addEventListener("click", function(){
|
|
550
|
+
var properties = {
|
|
551
|
+
geom_stroke_color: 'rgb(19, 39, 99,0.5)',
|
|
552
|
+
geom_fill_color: 'rgb(19, 39, 99,0.5)',
|
|
553
|
+
geom_stroke_width: 1,
|
|
554
|
+
geom_shape: 'circle',
|
|
555
|
+
geom_radius: 4,
|
|
556
|
+
}
|
|
557
|
+
if(geom_stroke_color){
|
|
558
|
+
properties.geom_stroke_color = geom_stroke_color.value;
|
|
559
|
+
}
|
|
560
|
+
if(geom_stroke_width){
|
|
561
|
+
properties.geom_stroke_width = geom_stroke_width.value;
|
|
562
|
+
}
|
|
563
|
+
if(geom_fill_color){
|
|
564
|
+
properties.geom_fill_color = geom_fill_color.value;
|
|
565
|
+
}
|
|
566
|
+
if(geom_shape){
|
|
567
|
+
properties.geom_shape = geom_shape.value;
|
|
568
|
+
}
|
|
569
|
+
if(geom_radius){
|
|
570
|
+
properties.geom_radius = geom_radius.value;
|
|
571
|
+
}
|
|
572
|
+
communicator.setCustomColors(properties);
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
//**********************************************************
|
|
580
|
+
//************** CUSTOM COLORS ****************
|
|
581
|
+
//**********************************************************
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#fff;font-family:'Open Sans',sans-serif;color:#1c1c1b}[v-cloak]{display:none}header{background-color:#dadad9;margin-bottom:70px}header .flex{display:flex}header .flex .col-1 img{padding:4px 0}header .flex .col-2{flex-grow:1;flex-shrink:1;align-self:center;margin-left:15px}header .flex .col-2 .text-1{font-size:17px;font-weight:700;line-height:1}header .flex .col-2 .text-2{font-size:14px;font-weight:700;line-height:1;margin:0}@media (max-width:991px){header .flex .col-2 .text-1,header .flex .col-2 .text-2{display:none}}header .flex .col-3{text-align:right;position:relative}header .flex .col-3 a{display:inline-block;padding:25px 1em;font-size:15px;font-weight:700}header .flex .col-3 a svg{vertical-align:middle;margin:0 .5em}header .flex .col-3 a svg path{fill:#1c1c1b}header .flex .col-3 a:active,header .flex .col-3 a:hover{background-color:#f5f5f5;color:#fff}header .flex .col-3 a:active svg path,header .flex .col-3 a:hover svg path{fill:#fff}header .flex .col-3 ul{position:absolute;z-index:1;background-color:#f5f5f5;box-shadow:0 2px 4px 0 rgba(0,0,0,.5);width:100%;text-align:left;display:none}a.block,header .flex .col-3.menu-visible>ul{display:block}header .flex .col-3 ul a{width:100%;padding:1em 1.2em;font-size:13px;color:#1c1c1b}header .flex .col-3 ul a:active,header .flex .col-3 ul a:hover{color:#1c1c1b;background-color:#dadad9}header .flex .col-3 ul a:active svg path,header .flex .col-3 ul a:hover svg path{fill:#1c1c1b}header .flex .col-3.menu-visible>a{background-color:#f5f5f5;color:#fff}header .flex .col-3.menu-visible>a svg path{fill:#fff}table{width:100%;border-spacing:3px;border-collapse:separate}table td,table th{padding:7px 8px;font-size:15px}table td svg,table th svg{vertical-align:middle}table thead td{font-weight:700;background-color:#f5f5f5}table thead th{font-weight:400;background-color:#dadad9}table tbody td{background-color:#f5f5f5;font-weight:600}a{color:inherit}a svg path{fill:#1c1c1b}a:active,a:focus,a:hover{color:#005DB4;text-decoration:none}a:active svg path,a:focus svg path,a:hover svg path{fill:#005DB4}footer{display:flex;width:100%;align-items:center;justify-content:space-between;margin:50px 0}footer .divider{width:1px;height:54px;background-color:#434448}footer .col-1,footer .col-2,footer .col-3{margin:0 15px}footer .col-1{margin-left:0}footer .col-2{text-align:left}footer .col-3{text-align:left;margin-right:0}footer h4{font-size:17px;font-weight:700;color:#56565c}footer p{color:#58585e}@media (max-width:991px){footer{display:block}footer .divider{display:none}footer .col-1,footer .col-2,footer .col-3{text-align:center;margin:0 15px}footer .col-1 .img-responsive,footer .col-2 .img-responsive,footer .col-3 .img-responsive{margin-left:auto;margin-right:auto}}.row.equal{display:flex;flex-wrap:wrap}.thumbnail{width:260px;height:100%}.greenDot{fill:#00cd15}.redDot{fill:#950000}.rolesCaption{margin:20px}.roleChooser{background-color:#eee;padding-top:25px}.roleChooser img{padding-bottom:25px}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"file": "home.min.css",
|
|
4
|
+
"sources": [
|
|
5
|
+
"../master/home.scss",
|
|
6
|
+
"../master/_colors.scss"
|
|
7
|
+
],
|
|
8
|
+
"names": [],
|
|
9
|
+
"mappings": "AAOA,AAAA,IAAI,AAAA,CACA,sBAAsB,CAAE,WAAW,CACnC,uBAAuB,CAAE,SAAS,CAClC,gBAAgB,CAAE,KAAK,CACvB,WAAW,CAAE,uBAAuB,CACpC,KAAK,CAAE,OAAO,CACjB,CACD,AAAA,AAAA,OAAC,AAAA,CAAS,CAAE,OAAO,CAAE,IAAI,CAAI,AAC7B,AAAA,MAAM,AAAA,CACF,gBAAgB,CCdE,OAAO,CDezB,aAAa,CAAE,IAAI,CA0GtB,AA5GD,AAII,MAJE,CAIF,KAAK,AAAA,CACD,OAAO,CAAE,IAAI,CAsGhB,AA3GL,AAQY,MARN,CAIF,KAAK,CAGD,MAAM,CACF,GAAG,AAAA,CACC,OAAO,CAAE,KAAK,CACjB,AAVb,AAaQ,MAbF,CAIF,KAAK,CASD,MAAM,AAAA,CACF,SAAS,CAAE,CAA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AS,EAAE,KAAK,EAxC5B,AAAA,MAAM,AAAA,CAyCE,OAAO,CAAE,KAAK,CAgBrB,AAzDD,AA0CQ,MA1CF,CA0CE,QAAQ,AAAA,CACJ,OAAO,CAAE,IAAI,CAChB,AA5CT,AA6CQ,MA7CF,CA6CE,MAAM,CA7Cd,MAAM,CA6CU,MAAM,CA7CtB,MAAM,CA6CkB,MAAM,AAAA,CAClB,UAAU,CAAE,MAAM,CAClB,MAAM,CAAE,MAAM,CAMjB,AArDT,AAiDY,MAjDN,CA6CE,MAAM,CAIF,eAAe,CAjD3B,MAAM,CA6CU,MAAM,CAIV,eAAe,CAjD3B,MAAM,CA6CkB,MAAM,CAIlB,eAAe,AAAA,CACX,WAAW,CAAE,IAAI,CACjB,YAAY,CAAE,IAAI,CACrB,CAOb,AAAA,IAAI,AAAA,MAAM,AAAC,CACP,OAAO,CAAE,IAAI,CACb,SAAS,CAAE,IAAI,CACjB,AACF,AAAA,UAAU,AAAC,CACP,KAAK,CAAE,KAAK,CACZ,MAAM,CAAE,IAAI,CACf,AACD,AAAA,SAAS,AAAA,CACP,IAAI,CAAE,OAAO,CACd,AACD,AAAA,OAAO,AAAA,CACL,IAAI,CAAE,OAAO,CACd,AACD,AAAA,aAAa,AAAA,CACX,MAAM,CAAE,IAAI,CACb,AACD,AAAA,YAAY,AAAC,CACX,gBAAgB,CAAE,IAAI,CACtB,WAAW,CAAE,IAAI,CAClB,AACD,AAAA,YAAY,CAAC,GAAG,AAAC,CACf,cAAc,CAAE,IAAI,CACrB"
|
|
10
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.footer .title,.header div.text div.a{font-size:17px}.container,.form-title{width:100%;box-sizing:border-box}.footer .title,.form-title,form button{text-transform:uppercase;font-weight:700}.footer .title,.form-title,.header div.text,.login-error,form button,form label{font-weight:700}body{margin:0;padding:0;font-family:'Open Sans',sans-serif;color:#1c1c1b;background-color:#fff;letter-spacing:-.5px}body a{color:inherit;text-decoration:none}.container{max-width:700px;padding:0 15px;margin:0 auto}.header{background:#dadad9;padding:5px 0;margin-bottom:60px}.header .container{max-width:500px}.header img.logo{display:inline-block;margin-right:5px;vertical-align:middle}.header div.text{display:inline-block;vertical-align:middle;max-width:100%}.header div.text div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}.header div.text div.b{font-size:14px}@media (max-width:620px){.header{text-align:center}.header img.logo{display:block;margin:20px auto}.header div.text{display:block}}.form-title{max-width:450px;margin:0 auto 3px;background-color:#dadad9;font-size:13px;padding:6px 10px}.form-title img,.form-title span{display:inline-block;vertical-align:middle}.form-title img{margin:0 6px 0 7px;width:23px;height:24px}form,form input[type=password].block,form input[type=text].block,form textarea.block{width:100%;box-sizing:border-box}form{font-size:13px;background-color:#f5f5f5;max-width:450px;margin:0 auto 100px;padding:12px 48px 1px}form .form-control,form .form-group{margin:8px 0}form .form-control.form-control-double,form .form-control.form-group-double,form .form-group.form-control-double,form .form-group.form-group-double{margin:2em 0}form label{display:block;font-size:13px;line-height:18px;margin-bottom:5px}form input[type=password],form input[type=text],form textarea{border:none;background-color:#fff;border-radius:3px;padding:8px 16px;font-size:14px}form input[type=password]:active,form input[type=password]:focus,form input[type=text]:active,form input[type=text]:focus,form textarea:active,form textarea:focus{outline:0!important}form button{color:#005cb8;background:0 0;border:none;padding:0;margin:0;font-size:13px;vertical-align:middle}form button img{vertical-align:middle;margin-left:.1em;margin-top:-3px;width:23px;height:24px}.footer{width:100%;max-width:1000px;margin:25px auto}@media (min-width:850px){.footer{display:flex;flex-wrap:nowrap;justify-content:space-between;align-items:center}}.footer .title{color:#58585e}.footer .col{padding:1em;color:#808089;text-align:center;font-size:14px;letter-spacing:0}.footer .col.col-1{flex-basis:33%}.footer .col.col-2{width:420px;border-left:3px solid #6f6f6e;border-right:3px solid #6f6f6e;flex-shrink:0}@media (max-width:849px){.footer{text-align:center}.footer .col.col-2{width:inherit;border:none;box-sizing:border-box}}.footer .col.col-3{flex-basis:33%}.footer .separator{height:50px;background-color:#6f6f6e;width:3px;display:none}@media (max-width:700px){.footer .separator{display:none}}.login-error{color:red;text-align:center}#loginError{display:none}#networkIndicatorOffline,#networkIndicatorOnline{float:right;display:none}
|