Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.17 KB | None | 0 0
  1. var PTLZ_A = L.geoJson(PTLZ_A,{style: styl_OT_PTLZ_A, onEachFeature:function onEachFeature(feature, layer) {
  2.         if (feature.properties && feature.properties.gml_id) {
  3.             layer.bindPopup('<b>GML ID:</b> ' + feature.properties.gml_id + '<br >' +
  4.                 '<b>rodzaj:</b> ' + feature.properties.rodzaj + '<br >' +
  5.                 '<b>kategoria:</b> ' + feature.properties.kategoria + '<br >' +
  6.                 '<b>gatunekDrz:</b> ' + feature.properties.gatunekDrz + '<br >' +
  7.                 '<b>x_kod:</b> ' + feature.properties.x_kod + '<br >' +
  8.                 '<b>x_zrodloDa:</b> ' + feature.properties.x_zrodloDa + '<br >' +
  9.                 '<b>x_kodKarto:</b> ' + feature.properties.x_kodKarto + '<br >' +
  10.                 '<b>x_informDo:</b> ' + feature.properties.x_informDo);
  11.         }}}).addTo(map); <!--Definiowanie warstwy i dodanie do mapy razem z popupem zasysającym kolumny z geojson--!>
  12.     function styl_OT_PTLZ_A (feature) {
  13.             if ("0010_703" == feature.properties.x_kodKarto) {
  14.             return {
  15.                 weight:2.267717,
  16.                 opacity: 0,
  17.                 color: '#C9FFA1',
  18.                 fill: 'url(./SVG/0010_703.svg)',
  19.                 fillOpacity: 1
  20.             };
  21.         }
  22.         else if ("0010_704" == feature.properties.x_kodKarto) {
  23.             return {
  24.                 weight:2.267717,
  25.                 opacity: 0,
  26.                 color: '#C9FFA1',
  27.                 fill: 'url(./SVG/0010_704.svg)',
  28.                 fillOpacity: 1
  29.             };
  30.         }
  31.         else  if("0010_705" == feature.properties.x_kodKarto){
  32.             return {
  33.                 weight:3.023622,
  34.                 opacity: 0,
  35.                 color: 'green',
  36.                 fill: 'url(./SVG/0010_705.svg)',
  37.                 fillOpacity: 1
  38.             };
  39.         }
  40.         else if ("0010_706" == feature.properties.x_kodKarto) {
  41.             return {
  42.                 weight:2.267717,
  43.                 opacity: 0,
  44.                 color: '#c9ffa1',
  45.                 fill: '#c9ffa1',
  46.                 fillOpacity: 1
  47.             };
  48.         }
  49.        
  50.         else if ("0010_709" == feature.properties.x_kodKarto) {
  51.             return {
  52.                 weight:2.267717,
  53.                 opacity:0,
  54.                 color: '#C9FFA1',
  55.                 fill: 'url(./SVG/0010_709.svg)',
  56.                 fillOpacity: 1
  57.             };
  58.         }
  59.         else if ("0010_710" == feature.properties.x_kodKarto) {
  60.             return {
  61.                 weight:2.267717,
  62.                 opacity: 0,
  63.                 color: '#C9FFA1',
  64.                 fill: 'url(./SVG/0010_710.svg)',
  65.                 fillOpacity: 1
  66.             };
  67.         }
  68.         else {
  69.             return {
  70.                 weight:3.779528,
  71.                 opacity: 1,
  72.                 color: 'transparent',
  73.                 fill: 'transparent',
  74.                 fillOpacity: 0.5
  75.             };
  76.         }
  77.     };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement