Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     var crossPolandGeojson = {
  2.         "type": "FeatureCollection",
  3.         "features": [
  4.             {
  5.             "type": "Feature",
  6.             "properties": {},
  7.             "geometry": {
  8.                 "type": "LineString",
  9.                 "coordinates": [
  10.                     [
  11.                         14.326171874999998,
  12.                         54.059387886623576
  13.                     ],
  14.                     [
  15.                         23.1591796875,
  16.                         49.674737880665994
  17.                     ]
  18.                     ]
  19.                 }
  20.             },
  21.             {
  22.             "type": "Feature",
  23.             "properties": {},
  24.             "geometry": {
  25.                 "type": "LineString",
  26.                 "coordinates": [
  27.                     [
  28.                         22.939453125,
  29.                         54.39335222384589
  30.                     ],
  31.                     [
  32.                         15.00732421875,
  33.                         49.69606181911566
  34.                     ]
  35.                     ]
  36.                 }
  37.             }
  38.         ]
  39.     };
  40.     var crossPolandLayer = new OpenLayers.Layer.Vector("Krzyż na Polsce", {
  41.         ref: 'cpl'
  42.     });
  43.     var openlayerFeatures = crossPolandGeojson.features.map(function (f) {
  44.         var cf = geojsonFormat.parseFeature(f);
  45.         cf.geometry.transform(gg, mp);
  46.         return cf
  47.     });
  48.     crossPolandLayer.addFeatures(openlayerFeatures);
  49.     map.addLayer(crossPolandLayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement