diff --git a/docs/_pages/en/dsra_scenario_map.md b/docs/_pages/en/dsra_scenario_map.md index 1025441..75f2b17 100644 --- a/docs/_pages/en/dsra_scenario_map.md +++ b/docs/_pages/en/dsra_scenario_map.md @@ -23,21 +23,14 @@ breadcrumbs: - title: "Earthquake Scenario Map" --- - - - + + - + - + @@ -446,283 +439,329 @@ crossorigin=""> function setBounds() { - if ( lcScenario == "acm7p0_georgiastraitfault" ) { - southWest = L.latLng( 48.30891568684188, -129.0949439967106 ); - northEast = L.latLng( 53.53110877480622, -117.3589501128889 ); - bounds = L.latLngBounds( southWest, northEast ); - epicenter = L.circleMarker( [ 49.243365, -123.62296 ], circleStyle() ).addTo( map ); - map.setView(new L.LatLng( 49.243365, -123.62296 ), 7); - } - else if ( lcScenario == "acm7p3_leechriverfullfault" ) { - southWest = L.latLng( 48.30891568624434, -129.0949439967106 ); - northEast = L.latLng( 53.30903267135562, -117.4908738038378 ); - bounds = L.latLngBounds( southWest, northEast ); - epicenter = L.circleMarker( [ 48.407017, -123.412134 ], circleStyle() ).addTo( map ); - map.setView(new L.LatLng( 48.407017, -123.412134 ), 7); - } - else if ( lcScenario == "sim9p0_cascadiainterfacebestfault" ) { - southWest = L.latLng( 48.30891568684188, -139.0522010412872 ); - northEast = L.latLng( 60.00006153221153, -114.05375826483 ); - bounds = L.latLngBounds( southWest, northEast ); - epicenter = L.circleMarker( [ 48.251246, -125.215269 ], circleStyle() ).addTo( map ); - map.setView(new L.LatLng( 48.251246, -125.215269 ), 7); - } - else if ( lcScenario == "scm7p5_valdesbois" ) { - southWest = L.latLng( 42.47260780141163, -86.54942531485392 ); - northEast = L.latLng( 55.00064603767294, -67.44787497495167 ); - bounds = L.latLngBounds( southWest, northEast ); - epicenter = L.circleMarker( [ 45.905377, -75.494669 ], circleStyle() ).addTo( map ); - map.setView(new L.LatLng( 45.905377, -75.494669 ), 7); - } - else if ( lcScenario == "idm7p1_sidney" ) { - southWest = L.latLng( 48.30891568684188, -129.0949439967106 ); - northEast = L.latLng( 53.30903267135562, -117.3589501128889 ); - bounds = L.latLngBounds( southWest, northEast ); - epicenter = L.circleMarker( [ 48.618961, -123.299385 ], circleStyle() ).addTo( map ); - map.setView(new L.LatLng( 48.618961, -123.299385 ), 7); - } - else if ( lcScenario == "acm4p9_georgiastraitfault" ) { - southWest = L.latLng( 48.30891568684188, -129.0949439967106 ); - northEast = L.latLng( 53.53110877480622, -117.3589501128889 ); - bounds = L.latLngBounds( southWest, northEast ); - epicenter = L.circleMarker( [ 49.280, -123.340 ], circleStyle() ).addTo( map ); - map.setView(new L.LatLng( 49.280, -123.340 ), 7); - } - else if ( lcScenario == "acm7p4_denalifault" ) { - southWest = L.latLng( 60.00000000710405, -141.0180731580253 ); - northEast = L.latLng( 69.64745530351352, -123.7893248352215 ); - bounds = L.latLngBounds( southWest, northEast ); - epicenter = L.circleMarker( [ 61.200 , -138.780 ], circleStyle() ).addTo( map ); - map.setView(new L.LatLng( 61.200 , -138.780 ), 7); - } - else if ( lcScenario == "scm5p0_montreal" ) { - southWest = L.latLng( 42.53884243059241, -86.54942531485392 ); - northEast = L.latLng( 55.00064603767294, -65.94908207524423 ); - bounds = L.latLngBounds( southWest, northEast ); - epicenter = L.circleMarker( [ 45.500 , -73.600 ], circleStyle() ).addTo( map ); - map.setView(new L.LatLng( 45.500 , -73.600 ), 7); - } - else if ( lcScenario == "scm5p5_constancebay" ) { - southWest = L.latLng( 42.06164244999297, -86.54942531485392 ); - northEast = L.latLng( 55.00064603767294, -68.38243594858385 ); - bounds = L.latLngBounds( southWest, northEast ); - epicenter = L.circleMarker( [ 45.500 , -76.060 ], circleStyle() ).addTo( map ); - map.setView(new L.LatLng( 45.500 , -76.060 ), 7); + switch (lcScenario) { + case "acm7p0_georgiastraitfault": + southWest = L.latLng( 48.30891568684188, -129.0949439967106 ); + northEast = L.latLng( 53.53110877480622, -117.3589501128889 ); + bounds = L.latLngBounds( southWest, northEast ); + epicenter = L.circleMarker( [ 49.243365, -123.62296 ], circleStyle() ).addTo( map ); + map.setView(new L.LatLng( 49.243365, -123.62296 ), 7); + break; + case "acm7p3_leechriverfullfault": + southWest = L.latLng( 48.30891568624434, -129.0949439967106 ); + northEast = L.latLng( 53.30903267135562, -117.4908738038378 ); + bounds = L.latLngBounds( southWest, northEast ); + epicenter = L.circleMarker( [ 48.407017, -123.412134 ], circleStyle() ).addTo( map ); + map.setView(new L.LatLng( 48.407017, -123.412134 ), 7); + break; + case "sim9p0_cascadiainterfacebestfault": + southWest = L.latLng( 48.30891568684188, -139.0522010412872 ); + northEast = L.latLng( 60.00006153221153, -114.05375826483 ); + bounds = L.latLngBounds( southWest, northEast ); + epicenter = L.circleMarker( [ 48.251246, -125.215269 ], circleStyle() ).addTo( map ); + map.setView(new L.LatLng( 48.251246, -125.215269 ), 7); + break; + case "scm7p5_valdesbois": + southWest = L.latLng( 42.47260780141163, -86.54942531485392 ); + northEast = L.latLng( 55.00064603767294, -67.44787497495167 ); + bounds = L.latLngBounds( southWest, northEast ); + epicenter = L.circleMarker( [ 45.905377, -75.494669 ], circleStyle() ).addTo( map ); + map.setView(new L.LatLng( 45.905377, -75.494669 ), 7); + break; + case "idm7p1_sidney": + southWest = L.latLng( 48.30891568684188, -129.0949439967106 ); + northEast = L.latLng( 53.30903267135562, -117.3589501128889 ); + bounds = L.latLngBounds( southWest, northEast ); + epicenter = L.circleMarker( [ 48.618961, -123.299385 ], circleStyle() ).addTo( map ); + map.setView(new L.LatLng( 48.618961, -123.299385 ), 7); + break; + case "acm4p9_georgiastraitfault": + southWest = L.latLng( 48.30891568684188, -129.0949439967106 ); + northEast = L.latLng( 53.53110877480622, -117.3589501128889 ); + bounds = L.latLngBounds( southWest, northEast ); + epicenter = L.circleMarker( [ 49.280, -123.340 ], circleStyle() ).addTo( map ); + map.setView(new L.LatLng( 49.280, -123.340 ), 7); + break; + case "acm7p4_denalifault": + southWest = L.latLng( 60.00000000710405, -141.0180731580253 ); + northEast = L.latLng( 69.64745530351352, -123.7893248352215 ); + bounds = L.latLngBounds( southWest, northEast ); + epicenter = L.circleMarker( [ 61.200 , -138.780 ], circleStyle() ).addTo( map ); + map.setView(new L.LatLng( 61.200 , -138.780 ), 7); + break; + case "scm5p0_montreal": + southWest = L.latLng( 42.53884243059241, -86.54942531485392 ); + northEast = L.latLng( 55.00064603767294, -65.94908207524423 ); + bounds = L.latLngBounds( southWest, northEast ); + epicenter = L.circleMarker( [ 45.500 , -73.600 ], circleStyle() ).addTo( map ); + map.setView(new L.LatLng( 45.500 , -73.600 ), 7); + break; + case "scm5p5_constancebay": + southWest = L.latLng( 42.06164244999297, -86.54942531485392 ); + northEast = L.latLng( 55.00064603767294, -68.38243594858385 ); + bounds = L.latLngBounds( southWest, northEast ); + epicenter = L.circleMarker( [ 45.500 , -76.060 ], circleStyle() ).addTo( map ); + map.setView(new L.LatLng( 45.500 , -76.060 ), 7); + break; + + // afok test 2024-02-12 + // Fetch the extents (CSD Extents) from https://github.com/OpenDRR/riskprofiler/wiki/RiskProfiler-Datasets + // Fetch the epicentre from OpenDRR/earthquake-scenarios/FINISHED/FinishedScenarios.md + // After editing, wait for Jekyll to finish generating the new pages (up to 5 seconds) and then check again. + // The epicentre (red round dot) should show. + case "acm4p9_vedderfault": + southWest = L.latLng( 48.30891418, -127.9421387 ); + northEast = L.latLng( 53.53110886, -116.2564392 ); + bounds = L.latLngBounds( southWest, northEast ); + epicenter = L.circleMarker( [ 49.04, -122.08 ], circleStyle() ).addTo( map ); + map.setView(new L.LatLng( 49.04, -122.08 ), 7); + break; + + + } } function setTileLayerStyles() { - if ( lcScenario == "acm7p0_georgiastraitfault" ) { - return { - dsra_acm7p0_georgiastraitfault_indicators_s: function ( properties ) { - return tileStyle( properties ); + switch (lcScenario) { + case "acm7p0_georgiastraitfault": + return { + dsra_acm7p0_georgiastraitfault_indicators_s: function ( properties ) { + return tileStyle( properties ); + } } - } - } - else if ( lcScenario == "acm7p3_leechriverfullfault" ) { - return { - dsra_acm7p3_leechriverfullfault_indicators_s: function ( properties ) { - return tileStyle( properties ); + break; + case "acm7p3_leechriverfullfault": + return { + dsra_acm7p3_leechriverfullfault_indicators_s: function ( properties ) { + return tileStyle( properties ); + } } - } - } - else if ( lcScenario == "sim9p0_cascadiainterfacebestfault" ) { - return { - dsra_sim9p0_cascadiainterfacebestfault_indicators_s: function ( properties ) { - return tileStyle( properties ); + break; + case "sim9p0_cascadiainterfacebestfault": + return { + dsra_sim9p0_cascadiainterfacebestfault_indicators_s: function ( properties ) { + return tileStyle( properties ); + } } - } - } - else if ( lcScenario == "scm7p5_valdesbois" ) { - return { - dsra_scm7p5_valdesbois_indicators_s: function ( properties ) { - return tileStyle( properties ); + break; + case "scm7p5_valdesbois": + return { + dsra_scm7p5_valdesbois_indicators_s: function ( properties ) { + return tileStyle( properties ); + } } - } - } - else if ( lcScenario == "idm7p1_sidney" ) { - return { - dsra_idm7p1_sidney_indicators_s: function ( properties ) { - return tileStyle( properties ); + break; + case "idm7p1_sidney": + return { + dsra_idm7p1_sidney_indicators_s: function ( properties ) { + return tileStyle( properties ); + } } - } - } - else if ( lcScenario == "acm4p9_capilano5" ) { - return { - dsra_acm4p9_capilano5_indicators_s: function ( properties ) { - return tileStyle( properties ); + break; + case "acm4p9_capilano5": + return { + dsra_acm4p9_capilano5_indicators_s: function ( properties ) { + return tileStyle( properties ); + } } - } - } - else if ( lcScenario == "acm7p4_burwashlanding" ) { - return { - dsra_acm7p4_burwashlanding_indicators_s: function ( properties ) { - return tileStyle( properties ); + break; + case "acm7p4_burwashlanding": + return { + dsra_acm7p4_burwashlanding_indicators_s: function ( properties ) { + return tileStyle( properties ); + } } - } - } - else if ( lcScenario == "scm5p0_montreal" ) { - return { - dsra_scm5p0_montreal_indicators_s: function ( properties ) { - return tileStyle( properties ); + break; + case "scm5p0_montreal": + return { + dsra_scm5p0_montreal_indicators_s: function ( properties ) { + return tileStyle( properties ); + } } - } - } - else if ( lcScenario == "scm5p5_ottawa" ) { - return { - dsra_scm5p5_ottawa_indicators_s: function ( properties ) { - return tileStyle( properties ); + break; + case "scm5p5_ottawa": + return { + dsra_scm5p5_ottawa_indicators_s: function ( properties ) { + return tileStyle( properties ); + } } - } + break; + // afok 2024-02-12 + case "acm4p9_vedderfault": + return { + dsra_acm4p9_vedderfault_indicators_s: function ( properties ) { + return tileStyle( properties ); + } + } + break; } } function setShakeLayerStyles( z ) { - if ( lcScenario == "acm7p0_georgiastraitfault" ) { - if ( z == 1 ) { - return { - dsra_acm7p0_georgiastraitfault_shakemap_hexgrid_1km: function ( properties ) { - return shakeStyle( properties ); + switch (lcScenario) { + case "acm7p0_georgiastraitfault": + if ( z == 1 ) { + return { + dsra_acm7p0_georgiastraitfault_shakemap_hexgrid_1km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - else { - return { - dsra_acm7p0_georgiastraitfault_shakemap_hexgrid_5km: function ( properties ) { - return shakeStyle( properties ); + else { + return { + dsra_acm7p0_georgiastraitfault_shakemap_hexgrid_5km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - } - else if ( lcScenario == "acm7p3_leechriverfullfault" ) { - if ( z == 1 ) { - return { - dsra_acm7p3_leechriverfullfault_shakemap_hexgrid_1km: function ( properties ) { - return shakeStyle( properties ); + break; + case "acm7p3_leechriverfullfault": + if ( z == 1 ) { + return { + dsra_acm7p3_leechriverfullfault_shakemap_hexgrid_1km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - else { - return { - dsra_acm7p3_leechriverfullfault_shakemap_hexgrid_5km: function ( properties ) { - return shakeStyle( properties ); + else { + return { + dsra_acm7p3_leechriverfullfault_shakemap_hexgrid_5km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - } - else if ( lcScenario == "sim9p0_cascadiainterfacebestfault" ) { - if ( z == 1 ) { - return { - dsra_sim9p0_cascadiainterfacebestfault_shakemap_hexgrid_1km: function ( properties ) { - return shakeStyle( properties ); + break; + case "sim9p0_cascadiainterfacebestfault": + if ( z == 1 ) { + return { + dsra_sim9p0_cascadiainterfacebestfault_shakemap_hexgrid_1km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - else { - return { - dsra_sim9p0_cascadiainterfacebestfault_shakemap_hexgrid_5km: function ( properties ) { - return shakeStyle( properties ); + else { + return { + dsra_sim9p0_cascadiainterfacebestfault_shakemap_hexgrid_5km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - } - else if ( lcScenario == "scm7p5_valdesbois" ) { - if ( z == 1 ) { - return { - dsra_scm7p5_valdesbois_shakemap_hexgrid_1km: function ( properties ) { - return shakeStyle( properties ); + break; + case "scm7p5_valdesbois": + if ( z == 1 ) { + return { + dsra_scm7p5_valdesbois_shakemap_hexgrid_1km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - else { - return { - dsra_scm7p5_valdesbois_shakemap_hexgrid_5km: function ( properties ) { - return shakeStyle( properties ); + else { + return { + dsra_scm7p5_valdesbois_shakemap_hexgrid_5km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - } - else if ( lcScenario == "idm7p1_sidney" ) { - if ( z == 1 ) { - return { - dsra_idm7p1_sidney_shakemap_hexgrid_1km: function ( properties ) { - return shakeStyle( properties ); + break; + case "idm7p1_sidney": + if ( z == 1 ) { + return { + dsra_idm7p1_sidney_shakemap_hexgrid_1km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - else { - return { - dsra_idm7p1_sidney_shakemap_hexgrid_5km: function ( properties ) { - return shakeStyle( properties ); + else { + return { + dsra_idm7p1_sidney_shakemap_hexgrid_5km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - } - else if ( lcScenario == "acm4p9_capilano5" ) { - if ( z == 1 ) { - return { - dsra_acm4p9_capilano5_shakemap_hexgrid_1km: function ( properties ) { - return shakeStyle( properties ); + break; + case "acm4p9_capilano5": + if ( z == 1 ) { + return { + dsra_acm4p9_capilano5_shakemap_hexgrid_1km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - else { - return { - dsra_acm4p9_capilano5_shakemap_hexgrid_5km: function ( properties ) { - return shakeStyle( properties ); + else { + return { + dsra_acm4p9_capilano5_shakemap_hexgrid_5km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - } - else if ( lcScenario == "acm7p4_burwashlanding" ) { - if ( z == 1 ) { - return { - dsra_acm7p4_burwashlanding_shakemap_hexgrid_1km: function ( properties ) { - return shakeStyle( properties ); + break; + case "acm7p4_burwashlanding": + if ( z == 1 ) { + return { + dsra_acm7p4_burwashlanding_shakemap_hexgrid_1km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - else { - return { - dsra_acm7p4_burwashlanding_shakemap_hexgrid_5km: function ( properties ) { - return shakeStyle( properties ); + else { + return { + dsra_acm7p4_burwashlanding_shakemap_hexgrid_5km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - } - else if ( lcScenario == "scm5p0_montreal" ) { - if ( z == 1 ) { - return { - dsra_scm5p0_montreal_shakemap_hexgrid_1km: function ( properties ) { - return shakeStyle( properties ); + break; + case "scm5p0_montreal": + if ( z == 1 ) { + return { + dsra_scm5p0_montreal_shakemap_hexgrid_1km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - else { - return { - dsra_scm5p0_montreal_shakemap_hexgrid_5km: function ( properties ) { - return shakeStyle( properties ); + else { + return { + dsra_scm5p0_montreal_shakemap_hexgrid_5km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - } - else if ( lcScenario == "scm5p5_ottawa" ) { - if ( z == 1 ) { - return { - dsra_scm5p5_ottawa_shakemap_hexgrid_1km: function ( properties ) { - return shakeStyle( properties ); + break; + case "scm5p5_ottawa": + if ( z == 1 ) { + return { + dsra_scm5p5_ottawa_shakemap_hexgrid_1km: function ( properties ) { + return shakeStyle( properties ); + } } } - } - else { - return { - dsra_scm5p5_ottawa_shakemap_hexgrid_5km: function ( properties ) { - return shakeStyle( properties ); + else { + return { + dsra_scm5p5_ottawa_shakemap_hexgrid_5km: function ( properties ) { + return shakeStyle( properties ); + } } } - } + break; + case "acm4p9_vedderfault": + if ( z == 1 ) { + return { + dsra_acm4p9_vedderfault_shakemap_hexgrid_1km: function ( properties ) { + return shakeStyle( properties ); + } + } + } + else { + return { + dsra_acm4p9_vedderfault_shakemap_hexgrid_5km: function ( properties ) { + return shakeStyle( properties ); + } + } + } + break; } }