Test openlayer 2.13 polygon

by man___ol

HTML

<script src="http://openlayers.org/api/OpenLayers.js"></script>
<link rel="stylesheet" href="http://openlayers.org/en/v3.16.0/css/ol.css">
<div id="map" style="width:600px;height:600px;"></div>

JavaScript

map = new OpenLayers.Map("map");
map.addLayer(new OpenLayers.Layer.OSM());

var polyVectorLayer = new OpenLayers.Layer.Vector("Polygons");
map.addLayer(polyVectorLayer);

var coordinates = [
  [-135.87, -74.24],
  [-136.6, -74.37],
  [-143.71, -75.4],
  [-152.95, -76.28],
  [-163.14, -76.79],
  [-173.79, -76.87],
  [175.77, -76.53],
  [166.12, -75.78],
  [157.59, -74.7],
  [150.29, -73.34],
  [144.12, -71.77],
  [138.93, -70.04],
  [134.55, -68.18],
  [130.84, -66.22],
  [127.66, -64.2],
  [124.91, -62.11],
  [122.51, -59.98],
  [120.4, -57.81],
  [118.52, -55.61],
  [116.83, -53.38],
  [115.31, -51.14],
  [113.93, -48.87],
  [112.66, -46.6],
  [111.5, -44.3],
  [110.42, -42],
  [109.41, -39.69],
  [108.47, -37.37],
  [107.58, -35.04],
  [106.74, -32.7],
  [105.95, -30.36],
  [105.19, -28.01],
  [104.47, -25.66],
  [103.78, -23.3],
  [103.11, -20.94],
  [102.47, -18.58],
  [101.85, -16.21],
  [101.25, -13.84],
  [100.67, -11.47],
  [100.1, -9.09],
  [99.55, -6.72],
  [99.01, -4.34],
  [98.47, -1.96],
  [97.95, 0.42],
  [97.44, 2.8],
  [96.93, 5.18],
  [96.43, 7.57],
  [95.93, 9.95],
  [95.44, 12.33],
  [94.95, 14.71],
  [94.46, 17.09],
  [93.97, 19.48],
  [93.48, 21.86],
  [92.99, 24.24],
  [92.5, 26.62],
  [92, 29],
  [91.49, 31.37],
  [90.98, 33.75],
  [90.46, 36.12],
  [89.93, 38.5],
  [89.38, 40.87],
  [88.82, 43.24],
  [88.23, 45.61],
  [87.63, 47.97],
  [86.99, 50.34],
  [86.32, 52.7],
  [85.6, 55.06],
  [84.83, 57.41],
  [83.99, 59.77],
  [83.07, 62.11],
  [82.05, 64.46],
  [80.88, 66.8],
  [79.52, 69.13],
  [77.91, 71.45],
  [75.93, 73.76],
  [73.4, 76.05],
  [70.01, 78.31],
  [65.18, 80.53],
  [57.67, 82.64],
  [44.77, 84.55],
  [21.11, 85.96],
  [-14.400589786412102, 86.2430217309207],
  [-43.48, 85.17],
  [-32.628469881701534, 83.6059585840235],
  [-26.164735663623233, 81.90516571340909],
  [-21.96703876417152, 80.13812346236267],
  [-19.044979610391295, 78.33490081146593],
  [-16.9, 76.51],
  [-6.370830999755755, 76.87149126538708],
  [4.38, 76.79],
 ...