I generated this geojson data in my server:


in ol3 I did:

// data above the client via ajax
$.each(data , function (k,v) {

      var g1=JSON.parse(v);

      var vectorFeature = new ol.Feature({                    
                geometry: g1 ,                                       



var vectorSource = new ol.source.Vector();


var yol2=new ol.layer.Vector({               
            projection: 'EPSG:3857',
            source: [vectorSource]

if( yol2 instanceof ol.layer.Vector) {
                  // alert("yol2");
                  olTrMap.addLayer( yol2);


Then nothing is displayed.

Do you have any idea?

1 Answer 1


See this question Add feature manually to a vector layer.

coordinates should be transform. check your coordinate system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.