The
Map.show function displays the
Map object named
map_name. The function call replaces the active view (generally either a question or a different map) and displays the map. The map will continue to be displayed until the user taps on the back button or the
Map.hide function is called from within a callback function.
The
Map.show function will not finish execution until the user has finished interacting with the map. For this reason, you should do all initial map setup (adding markers, buttons, base map, etc.)
before calling
Map.show. If any map functions are given after the call to
Map.show, they will not be executed until after the map has been hidden. You can, however, make modifications to the map while it is showing from logic in a callback function supplied to one of the map functions such as
Map.setOnClick,
Map.addTextButton,
Map.addImageButton,
Map.setMarkerOnClick,
Map.setMarkerOnClickInfoWindow, or
Map.setMarkerOnDrag.
The function returns a logical value of 1 (true) if the map was shown successfully and 0 (false) if there was an error.