<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi,</p>
<p>since API v3.18.0 it's not longer possible to transform feature
coordinates with defaultDataProjection and featureProjection:<br>
<br>
source: new ol.source.Vector({<br>
format: new
ol.format.GeoJSON({defaultDataProjection:'EPSG:3857',featureProjection:'EPSG:25832'}),<br>
url: '<span class="str">file.geojson'</span><br>
})<br>
<br>
I can only transform with readFeatures():<br>
<br>
var e_bike = new ol.layer.Vector({<br>
source: new ol.source.Vector()<br>
});<br>
$.ajax(<span class="str">'file.geojson'</span><span class="pun"></span>).then(function(response)
{<br>
var geojsonFormat = new ol.format.GeoJSON();<br>
var features =
geojsonFormat.readFeatures(response,{dataProjection:'EPSG:25832',featureProjection:'EPSG:3857'});<br>
e_bike.getSource().addFeatures(features);<br>
});</p>
<p><span>Tested up to v3.20.0 API.<br>
</span></p>
<p>Thanks for your help!</p>
<p>Dietmar.
</p>
</body>
</html>