I try to reproject Geojson file in OpenLayers 3 from:
- Geojson link
- With these JS in head:
<link rel="stylesheet" href="http://openlayers.org/en/v3.15.1/css/ol.css" type="text/css">
<script src="http://openlayers.org/en/v3.15.1/build/ol.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/proj4js/2.2.1/proj4.js"></script>
- With this code to set the new ol.View with newProjCode:
var newProjCode = 'EPSG:27700'
proj4.defs(newProjCode, '+proj=utm +zone=31 +ellps=WGS84 +datum=WGS84 +units=m +no_defs');
var newProj = ol.proj.get(newProjCode);
var fromLonLat = ol.proj.getTransform('EPSG:4326', newProj);
var newView = new ol.View({
projection: newProj
});
map.setView(newView);
- But after setting that new ol.View i see only white screen.
Where is the problem?