This demo illustrates how to change the map’s viewport from code. Choose a continent using the drop-down menu under the map. In response to that, the map changes the visible area so that the chosen continent is displayed optimally. This is performed in code by calling the viewport(viewportCoordinates) method. After that, callback functions assigned to the centerChanged and zoomFactorChanged properties are triggered. These functions place the current values of the map’s center and zoom factor in the text boxes under the map.