Ei muokkausyhteenvetoa |
p (Tekstin korvaus – ”SYKE” muotoon ”Syke”) |
||
| (18 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
| Rivi 1: | Rivi 1: | ||
<includeonly> | <includeonly> | ||
<link rel="stylesheet" href=" | <link rel="stylesheet" href="/scripts/ol-10/ol.css" type="text/css"> | ||
<script src="/scripts/ol-10/ol.js"></script> | |||
<script src=" | |||
< | <link rel="stylesheet" href="/scripts/ol-ext-10/dist/ol-ext.min.css" type="text/css"> | ||
<script src="/scripts/ol-ext-10/dist/ol-ext.min.js"></script> | |||
<script src="/scripts/proj4js/dist/proj4.js"></script> | |||
<script src=" | |||
<div class="jwMapContainer" style="height:<!--{$height|default: | <script src="/scripts/jwol10js/jwol10.js"></script> | ||
<div class="jwMapContainer" style="height:<!--{$height|default:500px|escape:'html'}-->" > | |||
<div style="height: 100%; width: 100%; position: relative;" id="<!--{$id|default:CommonObsMap|escape:'html'}-->_container"></div> | <div style="height: 100%; width: 100%; position: relative;" id="<!--{$id|default:CommonObsMap|escape:'html'}-->_container"></div> | ||
</div> | </div> | ||
| Rivi 21: | Rivi 19: | ||
var <!--{$id|default:CommonObsMap|escape:'html'}-->_memo = { 'SitesO': {}, 'TypesO': {}, 'obsTypeToShow': '' }; | var <!--{$id|default:CommonObsMap|escape:'html'}-->_memo = { 'SitesO': {}, 'TypesO': {}, 'obsTypeToShow': '' }; | ||
function <!--{$id|default:CommonObsMap|escape:'html'}-->_jQueryTest() { | |||
if ( typeof window.jQuery == 'undefined' ) { | |||
setTimeout( function(){ <!--{$id|default:CommonObsMap|escape:'html'}-->_jQueryTest() }, 300); | |||
} else { | |||
<!--{$id|default:CommonObsMap|escape:'html'}-->_func(); | |||
} | |||
} | |||
setTimeout( function(){ <!--{$id|default:CommonObsMap|escape:'html'}-->_jQueryTest() }, 300); | |||
function <!--{$id|default:CommonObsMap|escape:'html'}-->_func() { | function <!--{$id|default:CommonObsMap|escape:'html'}-->_func() { | ||
| Rivi 33: | Rivi 38: | ||
var zoom = parseInt('<!--{$zoom|default:4|escape:'html'}-->'); | var zoom = parseInt('<!--{$zoom|default:4|escape:'html'}-->'); | ||
var vha = '<!--{$vha|escape:'html'}-->'; | var vha = '<!--{$vha|escape:'html'}-->'; | ||
var short = vha. | var short = vha.replace( 'kansainvälinen vesienhoitoalue', 'kansainvälisen vesienhoitoalueen Suomen osuus' ).replace( 'Tornionjoen', 'Torniojoen' ); | ||
var base = '<!--{$base|default:mmlTausta|escape:'html'}-->'; | var base = '<!--{$base|default:mmlTausta|escape:'html'}-->'; | ||
| Rivi 51: | Rivi 57: | ||
var basinSearch = basinArr.join(' OR '); | var basinSearch = basinArr.join(' OR '); | ||
console.log( short ); | |||
layersArr.push( { | layersArr.push( { | ||
'id': 'vha', | 'id': 'vha', | ||
'type': ' | 'type': 'anygeo', | ||
'name': 'Vesienhoitoalue', | 'name': 'Vesienhoitoalue', | ||
'restUrl': '// | 'restUrl': '//paikkatiedot.ymparisto.fi/geoserver/inspire_am1/wfs', | ||
' | 'layer': 'inspire_am1:AM.RiverBasinDistrict', | ||
'cql_filter': "inspire_am1:nimi = '" + short + "'", | |||
'selectable': false, | 'selectable': false, | ||
'zoomToExtent': true, | 'zoomToExtent': true, | ||
| Rivi 69: | Rivi 75: | ||
'type': 'basin', | 'type': 'basin', | ||
'name': 'Päävesistöt', | 'name': 'Päävesistöt', | ||
'restUrl': '//paikkatieto.ymparisto.fi/arcgis/rest/services/INSPIRE/ | 'restUrl': '//paikkatieto.ymparisto.fi/arcgis/rest/services/INSPIRE/Syke_Hydrografia/MapServer/5/query', | ||
'search': basinSearch, | 'search': basinSearch, | ||
'selectable': true, | 'selectable': true, | ||
| Rivi 81: | Rivi 87: | ||
'attribution': '<a href="//wwwp2.ymparisto.fi/kayttoehdot.html">Ympäristöhallinnon paikkatietoaineistot</a>', | 'attribution': '<a href="//wwwp2.ymparisto.fi/kayttoehdot.html">Ympäristöhallinnon paikkatietoaineistot</a>', | ||
}); | }); | ||
// do the base map with these settings | // do the base map with these settings | ||
var map = | var map = jwMakeMap({ | ||
'container': '<!--{$id|default:CommonObsMap|escape:'html'}-->_container', | 'container': '<!--{$id|default:CommonObsMap|escape:'html'}-->_container', | ||
'base': base, | 'base': base, | ||
| Rivi 118: | Rivi 95: | ||
'lat': lat, | 'lat': lat, | ||
'zoom': zoom, | 'zoom': zoom, | ||
'geolocation': true, | |||
'layers': layersArr, | 'layers': layersArr, | ||
'memo': memo | 'memo': memo | ||


