i got problem to show geojson from geoserver with openlayers

المشرف العام

Administrator
طاقم الإدارة
i'm just try openlayers3 and i want to show GeoJSON from geoserver,i try this code

var vectorSource = new ol.source.Vector({ format: new ol.format.GeoJSON(), url: function(extent, resolution, projection) { return 'http://localhost:8080/geoserver/GIS/ows?service=WFS&'+ 'version=1.0.0&request=GetFeature&typeName=GIS:KECAMATAN&'+ 'outputFormat=application/json&srsname=EPSG:32748&' + 'bbox=' + extent.join(',') + ',EPSG:32748'; }, strategy: ol.loadingstrategy.tile(ol.tilegrid.createXYZ({ maxZoom: 19 }))});var vector = new ol.layer.Vector({ source: vectorSource, style: new ol.style.Style({ stroke: new ol.style.Stroke({ color: 'rgba(0, 0, 255, 1.0)', width: 2 }) })});and i just got blank map and error about header cors from code above, please help me



أكثر...
 
أعلى