Fit map to projection extent in full screen example

This commit is contained in:
Tom Payne
2013-03-05 16:49:36 +01:00
parent 985b4f57c1
commit 5b0af9152a

View File

@@ -22,6 +22,8 @@ var map = new ol.Map({
zoom: 0
})
});
var view2d = map.getView().getView2D();
view2d.fitExtent(view2d.getProjection().getExtent(), map.getSize());
var geolocation = new ol.Geolocation();
geolocation.bindTo('projection', map.getView());