Fit map to projection extent in full screen example
This commit is contained in:
@@ -22,6 +22,8 @@ var map = new ol.Map({
|
|||||||
zoom: 0
|
zoom: 0
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
var view2d = map.getView().getView2D();
|
||||||
|
view2d.fitExtent(view2d.getProjection().getExtent(), map.getSize());
|
||||||
|
|
||||||
var geolocation = new ol.Geolocation();
|
var geolocation = new ol.Geolocation();
|
||||||
geolocation.bindTo('projection', map.getView());
|
geolocation.bindTo('projection', map.getView());
|
||||||
|
|||||||
Reference in New Issue
Block a user