This example shows a map viewer and the OverviewMap plugin configured with a OSM layer.
The js is not minified so it is readable. See viewer-overviewmap-osm.js.