Skip to content

Commit ec16212

Browse files
committed
CD 15417204052: Update GCWeb compiled demos files
1 parent 44816d5 commit ec16212

23 files changed

+1904
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* @title WET-BOEW Data InView example
3+
* @overview Handles the Data InView view state change events and updates the status on the page.
4+
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
5+
* @author WET Community
6+
*/
7+
( function( $, wb ) {
8+
"use strict";
9+
10+
wb.doc.on( "all.wb-inview partial.wb-inview none.wb-inview", function( event ) {
11+
if ( event.namespace === "wb-inview" ) {
12+
$( event.target ).find( ".view-state-status" ).html( event.type );
13+
}
14+
} );
15+
16+
} )( jQuery, wb );
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* @title WET-BOEW Geomap client functions
3+
* @overview OpenLayers popup loader for Geomap
4+
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
5+
* @author @pjackson28
6+
*/
7+
/*global ol: false*/
8+
( function( $, wb ) {
9+
"use strict";
10+
11+
var $document = wb.doc,
12+
mapSample;
13+
14+
$document.on( "wb-ready.wb-geomap", "#sample_map", function( event, map ) {
15+
16+
// Get the sample_map to use in zoomFeature function
17+
mapSample = map;
18+
var $aoiExtent = $( "#geomap-aoi-extent-" + mapSample.id ),
19+
$aoiExtentLonLat = $( "#geomap-aoi-extent-lonlat-" + mapSample.id );
20+
21+
if ( $aoiExtent ) {
22+
23+
$aoiExtent.on( "change", function() {
24+
25+
//console.log( "BBox: " + $( this ).val() );
26+
} );
27+
28+
$aoiExtentLonLat.on( "change", function() {
29+
30+
//console.log( "BBox LonLat: " + $( this ).val() );
31+
} );
32+
}
33+
} );
34+
35+
$document.on( "wb-ready.wb-geomap", "#location_map", function( event, map ) {
36+
37+
// Zoom to location on location_map
38+
map.getView().setCenter( ol.proj.transform( [ -75.70535, 45.3995 ], "EPSG:4326", "EPSG:3978" ) );
39+
map.getView().setZoom( 5 );
40+
} );
41+
42+
} )( jQuery, wb );

_wetboew-demos/geomap/demo/config-en.js

Lines changed: 335 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* @title WET-BOEW Geomap English config file
3+
* @overview Example English configuration file for Geomap with ESRI REST basemap
4+
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
5+
* @author @jsmoreau
6+
*/
7+
/*jshint unused:false*/
8+
var wet_boew_geomap = {
9+
basemap: {
10+
title: "Basic Map",
11+
type: "esri",
12+
url: "//geoappext.nrcan.gc.ca/arcgis/rest/services/BaseMaps/provinces1c/MapServer/export",
13+
options: { singleTile: false, ratio: 1.0, projection: "EPSG:3978", fractionalZoom: true },
14+
mapOptions: {
15+
maxExtent: "-3000000.0, -800000.0, 4000000.0, 3900000.0",
16+
maxResolution: "auto",
17+
projection: "EPSG:3978",
18+
restrictedExtent: "-3000000.0, -800000.0, 4000000.0, 3900000.0",
19+
units: "m",
20+
displayProjection: "EPSG:4269",
21+
numZoomLevels: 2
22+
}
23+
}
24+
};
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* @title WET-BOEW Geomap English config file
3+
* @overview Exemple d'un fichier de configuration français pour Géocarte avec basemap ESRI REST
4+
* @license wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html
5+
* @author @jsmoreau
6+
*/
7+
/*jshint unused:false*/
8+
var wet_boew_geomap = {
9+
basemap: {
10+
title: "Basic Map",
11+
type: "esri",
12+
url: "//geoappext.nrcan.gc.ca/arcgis/rest/services/BaseMaps/provinces1c/MapServer/export",
13+
options: { singleTile: false, ratio: 1.0, projection: "EPSG:3978", fractionalZoom: true },
14+
mapOptions: {
15+
maxExtent: "-3000000.0, -800000.0, 4000000.0, 3900000.0",
16+
maxResolution: "auto",
17+
projection: "EPSG:3978",
18+
restrictedExtent: "-3000000.0, -800000.0, 4000000.0, 3900000.0",
19+
units: "m",
20+
displayProjection: "EPSG:4269",
21+
numZoomLevels: 2
22+
}
23+
}
24+
};

0 commit comments

Comments
 (0)