Ei muokkausyhteenvetoa |
Ei muokkausyhteenvetoa |
||
| (19 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 38: | Rivi 43: | ||
var layersArr = []; | var layersArr = []; | ||
var container = '<!--{$id|default:CommonObsMap|escape:'html'}-->_container'; | |||
if ( '<!--{$hero|default:false|escape:'html'}-->' == 'true' ) { | |||
memo.hero = true; | |||
container = jQuery( '.hero-container' ).attr( 'id' ); | |||
jQuery( '.hero-container' ).addClass( 'hero-map' ); | |||
jQuery( '.hero-container' ).removeClass( 'hero-empty' ); | |||
jQuery ( '#' + container ).css( 'border-bottom', '1px solid #e4e3de' ); | |||
} else { | |||
memo.hero = false; | |||
} | |||
function gotLakes(req) { | function gotLakes(req) { | ||
var lakesArr = []; | var lakesArr = []; | ||
| Rivi 57: | Rivi 71: | ||
var lakelayer = { | |||
'id': 'lakes', | 'id': 'lakes', | ||
'type': 'lake', | 'type': 'lake', | ||
'name': 'Järvet', | 'name': 'Järvet', | ||
//'restUrl': '//paikkatieto.ymparisto.fi/arcgis/rest/services/INSPIRE/ | //'restUrl': '//paikkatieto.ymparisto.fi/arcgis/rest/services/INSPIRE/Syke_Hydrografia/MapServer/5/query', | ||
'search': lakesSearch, | 'search': lakesSearch, | ||
'selectable': true, | 'selectable': true, | ||
'fillColor': 'rgba( 0, 96, 133, 0.5 )', | |||
'strokeColor': 'rgba( 0, 96, 133, 1 )', | |||
'strokeWidth': 10, | |||
//'showLabels': true, | //'showLabels': true, | ||
//'labelField': 'JarviTunnus', | //'labelField': 'JarviTunnus', | ||
| Rivi 72: | Rivi 87: | ||
'bbox': false, | 'bbox': false, | ||
'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>', | ||
} | }; | ||
if ( memo.hero ) { lakelayer.padding = [ 50, 50, 100, 50 ]; } | |||
layersArr.push( lakelayer ); | |||
// do the base map with these settings | // do the base map with these settings | ||
var map = | jQuery ( '#' + container ).animate( { height: <!--{$height|default:500|escape:'html'}--> }, 100, function() { | ||
var map = jwMakeMap({ | |||
'container': container, //'<!--{$id|default:CommonObsMap|escape:'html'}-->_container', | |||
'base': base, | |||
'lon': lon, | |||
'lat': lat, | |||
'zoom': zoom, | |||
'geolocation': true, | |||
}); | 'layers': layersArr, | ||
'memo': memo | |||
}); | |||
} ); | |||


