I'm using Openlayers 4.6 API and the overviewMap function is not working.
I'm using Bingmap areial as basemap.
this.map = new ol.Map
({
controls: [new ol.control.OverviewMap()], //, attr
interactions: ol.interaction.defaults
({
doubleClickZoom: false
}),
layers: [Bing_layer],
target: 'map',
view: view
});
Best Answer
So.. I figured out the problem, the ol.control.overviewMap has a view property as well, you will need to make sure the ol.map and the overviewMap has the same view property. In my case, I forgot to set the ol.control.overviewMap's projection. My working sample code is shown below: