Ero sivun ”Widget:Ol3ObsYearMap” versioiden välillä
Järvi-meriwikistä
(Ak: Uusi sivu: <includeonly> <link rel="stylesheet" href="/scripts/ol3/ol.css" type="text/css"> <script src="//cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Elemen...) |
p (Tekstin korvaus – ”//cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL” muotoon ”https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js”) |
||
(9 välissä olevaa versiota samalta käyttäjältä ei näytetä) | |||
Rivi 1: | Rivi 1: | ||
<includeonly> | <includeonly> | ||
− | + | <link rel="stylesheet" href="/scripts/ol3/ol.css" type="text/css"><script src="https://cdnjs.cloudflare.com/polyfill/v3/polyfill.min.js"></script> | |
− | + | <script src="/scripts/ol3/ol.js"></script> | |
− | + | <link rel="stylesheet" href="/scripts/ol-ext/dist/ol-ext.min.css" type="text/css"> | |
− | + | <script src="/scripts/ol-ext/dist/ol-ext.min.js"></script> | |
− | + | <link rel="stylesheet" href="/scripts/ol-ext/overlay/popupoverlay.css" /> | |
− | + | <link rel="stylesheet" href="/scripts/ol-ext/overlay/popupoverlay.anim.css" /> | |
− | + | <script src="/scripts/proj4js/dist/proj4.js"></script> | |
− | + | <script src="/scripts/jwol3js/jwol3.js"></script><div class="jwMapContainer" style="height:<!--{$height|default:500|escape:'html'}-->px" > | |
− | + | <div style="height: 100%; width: 100%; position: relative;" id="<!--{$id|default:CommonObsMap|escape:'html'}-->_container"></div> | |
− | |||
− | |||
− | |||
− | <script src="/scripts/jwol3js/jwol3.js"></script> | ||
− | |||
− | |||
− | |||
</div> | </div> | ||
− | |||
<script type="text/javascript"> | <script type="text/javascript"> | ||
− | |||
//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 31: | Rivi 21: | ||
} | } | ||
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() { | ||
− | |||
//widget globals | //widget globals | ||
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 52: | Rivi 39: | ||
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', | ||
'name': 'Paikat ja havainnot', | 'name': 'Paikat ja havainnot', | ||
− | + | 'siteSearch': '', | |
− | 'obsSearch': obsQuery, | + | 'obsSearch': obsQuery, |
+ | 'order': 'greaterval', | ||
//'obsDays': days, | //'obsDays': days, | ||
//'attribution': 'Paikat ja havainnot: Järvi-meriwiki', | //'attribution': 'Paikat ja havainnot: Järvi-meriwiki', | ||
'opacitySlider': false, | 'opacitySlider': false, | ||
'selectable': true, | 'selectable': true, | ||
− | 'obstypebar': false, | + | 'obstypebar': false, |
− | 'clustered': | + | 'clustered': false, |
− | 'pointRadius': pointradius, | + | //'pointRadius': pointradius, |
− | 'simplepoints': | + | //'simplepoints': false, |
− | 'vesifi': | + | //'vesifi': false, |
− | 'zoomToExtent': | + | '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 85: | Rivi 69: | ||
}); | }); | ||
} | } | ||
− | |||
− | |||
</script> | </script> | ||
− | |||
</includeonly> | </includeonly> |