Ero sivun ”Widget:Ol3TagObsMap” 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...) |
|||
Rivi 52: | Rivi 52: | ||
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 mapbg = "<!--{$mapbg|default:-|escape:'html'}-->"; | ||
+ | var muni = "<!--{$muni|default:-|escape:'html'}-->"; | ||
var layersArr = []; | var layersArr = []; | ||
+ | |||
+ | if (mapbg == '-' ) { | ||
+ | |||
+ | layersArr.push( { | ||
+ | 'id': 'muni', | ||
+ | 'type': 'anyrest', | ||
+ | 'name': 'Kunta', | ||
+ | 'restUrl': '//paikkatieto.ymparisto.fi/arcgis/rest/services/sykemaps/GISAineistot2/MapServer/0/query', | ||
+ | 'search': "KuntaNimi = '" + muni + "'", | ||
+ | 'selectable': false, | ||
+ | 'zoomToExtent': true, | ||
+ | 'bbox': false, | ||
+ | 'fillColor': 'rgba( 0, 0, 0, 0 )', | ||
+ | 'strokeColor': 'rgba( 200, 100, 100, 0.5 )', | ||
+ | 'strokeWidth': 5 | ||
+ | //'attribution': '<a href="//wwwp2.ymparisto.fi/kayttoehdot.html">Ympäristöhallinnon paikkatietoaineistot</a>', | ||
+ | }); | ||
+ | } | ||
layersArr.push({ | layersArr.push({ |