Ero sivun ”Widget:Ol3ObsYearMap” versioiden välillä
Järvi-meriwikistä
Rivi 9: | Rivi 9: | ||
<link rel="stylesheet" href="/scripts/ol-ext/overlay/popupoverlay.css" /> | <link rel="stylesheet" href="/scripts/ol-ext/overlay/popupoverlay.css" /> | ||
<link rel="stylesheet" href="/scripts/ol-ext/overlay/popupoverlay.anim.css" /> | <link rel="stylesheet" href="/scripts/ol-ext/overlay/popupoverlay.anim.css" /> | ||
− | |||
<script src="/scripts/proj4js/dist/proj4.js"></script> | <script src="/scripts/proj4js/dist/proj4.js"></script> | ||
− | |||
<script src="/scripts/jwol3js/jwol3.js"></script> | <script src="/scripts/jwol3js/jwol3.js"></script> | ||
<div class="jwMapContainer" style="height:<!--{$height|default:500|escape:'html'}-->px" > | <div class="jwMapContainer" style="height:<!--{$height|default:500|escape:'html'}-->px" > | ||
Rivi 20: | Rivi 18: | ||
//global memory for widget instance | //global memory for widget instance | ||
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() { | function <!--{$id|default:CommonObsMap|escape:'html'}-->_jQueryTest() { | ||
if ( typeof window.jQuery == 'undefined' ) { | if ( typeof window.jQuery == 'undefined' ) { | ||
Rivi 29: | Rivi 26: | ||
} | } | ||
setTimeout( function(){ <!--{$id|default:CommonObsMap|escape:'html'}-->_jQueryTest() }, 300); | setTimeout( function(){ <!--{$id|default:CommonObsMap|escape:'html'}-->_jQueryTest() }, 300); | ||
− | |||
function <!--{$id|default:CommonObsMap|escape:'html'}-->_func() { | function <!--{$id|default:CommonObsMap|escape:'html'}-->_func() { | ||
Rivi 35: | Rivi 31: | ||
var memo = <!--{$id|default:CommonObsMap|escape:'html'}-->_memo; | var memo = <!--{$id|default:CommonObsMap|escape:'html'}-->_memo; | ||
memo.g = { 'sizeFactor': 1.5, 'lang': "<!--{$lang|default:fi|escape:'html'}-->" }; | memo.g = { 'sizeFactor': 1.5, 'lang': "<!--{$lang|default:fi|escape:'html'}-->" }; | ||
− | |||
var lon = parseFloat('<!--{$lon|default:25|escape:'html'}-->'); | var lon = parseFloat('<!--{$lon|default:25|escape:'html'}-->'); | ||
var lat = parseFloat('<!--{$lat|default:65|escape:'html'}-->'); | var lat = parseFloat('<!--{$lat|default:65|escape:'html'}-->'); | ||
Rivi 50: | Rivi 45: | ||
var cluster = ( "<!--{$cluster|default:yes|escape:'html'}-->" == "yes" ); | var cluster = ( "<!--{$cluster|default:yes|escape:'html'}-->" == "yes" ); | ||
var vesifi = ( "<!--{$vesifi|default:yes|escape:'html'}-->" == "yes" ); | var vesifi = ( "<!--{$vesifi|default:yes|escape:'html'}-->" == "yes" ); | ||
− | |||
var layersArr = []; | var layersArr = []; | ||
− | |||
layersArr.push({ | layersArr.push({ | ||
'type': 'sitesNobses', | 'type': 'sitesNobses', | ||
Rivi 70: | Rivi 63: | ||
'zoomToExtent': false | 'zoomToExtent': false | ||
}); | }); | ||
− | |||
//layersArr.push({ 'type': 'geoloc', 'name': 'Sijaintisi', 'show': true, 'center': false, 'zoom': 12, 'track': false }); | //layersArr.push({ 'type': 'geoloc', 'name': 'Sijaintisi', 'show': true, 'center': false, 'zoom': 12, 'track': false }); | ||
− | |||
// do the base map with these settings | // do the base map with these settings | ||
var map = ol3_jwMakeMap({ | var map = ol3_jwMakeMap({ | ||
Rivi 84: | Rivi 75: | ||
}); | }); | ||
} | } | ||
− | |||
− | |||
</script> | </script> | ||
− | |||
</includeonly> | </includeonly> |