How to load GML to OL3?

المشرف العام

Administrator
طاقم الإدارة
I'm trying to load gml into openlayers3 there is the code:

Vector layer example html, body, #map { margin: 0; width: 100%; height: 100%; }



var vectorLayer = new ol.layer.Vector({ source: new ol.source.Vector({ url: 'dzialka3.gml', format: new ol.format.GML3() }) }); var projection = new ol.proj.Projection({ code: 'EPSG:2176', units: 'm' }); var map = new ol.Map({ layers: [ vectorLayer ], target: 'map', view: new ol.View({ center: [5573761.4, 6567993.69], projection: projection, zoom: 19 }) }); and GML:

5573761.4 6567993.695573808.23 6568026.86 5573761.4 6567993.695573808.23 6568026.86 5573776.07 6567993.69 5573761.4 6568002.08 5573775.12 6568026.86 5573808.23 6568010.37 5573801.43 6568001.69 5573786.43 6568011.87 5573776.07 6567993.69 4.5-3256/219 false 7 2014-06-27T00:06:52 2014-06-27T00:06:52 In developer console I'm getting error:Uncaught TypeError: Cannot read property 'closure_uid_381150694' of null

what is the problem?



أكثر...
 
أعلى