====== Map Modes ====== The map mode related functions allow you to set the **Active mode**, read the currently active mode and listen for mode changes. The active mode defines how OFM interacts with the user. * Use the ''setActiveMode()'' and ''getActiveMode()'' functions to set and retrieve the active mode. * You can also use the ''addActiveModeChangeListener()'' functions to add a function that's notified whenever the active mode changes. ===== Mode grid ===== These are the available modes : ^ Mode name ^ Comment ^ | pan | Allows the user to pan around by clicking the map (which centers the clicked coordinate) or dragging the map. | | zoomin | Allows the user to zoom into a certain area, marked by a bounding box created by dragging the map. | | zoomout | Allows the user to zoom out of a certain area by clicking on the map (centering on the clicked location) | | zoomsmart | Allows the user to zoom in and out by respectively dragging the map down or up. | | query | Allows the user to select objects by clicking or dragging on the map. This triggers a //new selection// event. | | subquery | Allows the user to //activate// a selected object, by clicking on the map. Doing this triggers a //new attribute rows// event. | | hyperlink | Allows the user to click on the map and open a hyperlink (if there's a hyperlink at the clicked location). | | measure | Allows the user to draw a polyline on top of the map, and read its length and defined area. | ===== Startup mode ===== Which mode OFM starts up with is defined by the ''StartupMode'' setting of the UI configuration file. Calling ''setActiveMode()'' doesn't work if the provided mode is not available in the current toolbar. \\ If OFM is running in decorationless mode, the modes should be available if the toolbar were visible.\\ See [[flashmap:configuration|UI configuration]] to learn more about configuring OFM's toolbar&buttons.