blob

Documentation

4 Application troubleshootingdown-arrow

2 Application functionality

This documentation section contains this and that.

2.1 Core and sandbox

2.2 Features

2.3 Bundles

2.4 Requests

2.5 Events

2.6 Remote procedure call (RPC)

2.1 Core and sandbox

2.1.1 Core

The Oskari core functionality is located in /sources/framework/. The core is a normal Oskari class that is initiated in the mapfull bundle. The core is responsible for keeping references to selected map layers and other common functionality. It also provides handlers for common requests. The core is usually not accessed directly from bundles but through Oskari sandbox. An exception is made with request handlers which get reference to the core directly.

2.1.2 Sandbox

Sandbox offers access to the core methods. It can be used to register modules, send requests and events etc. Sandbox can also be used to get references to registered bundles, available map layers and much more. Currently bundle instances get reference to it through a global variable in start method with:

// the getSandbox method takes an optional sandbox name as an argument
var sandbox = Oskari.getSandbox();

Bundles should take the reference at start and pass it along to functionalities and not reference it through the global variable after that since it can change at some point.

IMAGE CANNOT CONTAIN TEXT!

sandbox.png

2.2 Functionalities

Features are...

2.2.1 Multiple language support

Oskari fully supports English, Finnish and Swedish languages, and partially languages listed below.

  • Estonian
  • German
  • French
  • Italian
  • Spanish
  • Dutch
  • Nynorsk
  • Norsk bokmål
  • Slovenian
  • Slovakian
  • Icelandic

2.2.2 Browser support

Oskari works with browsers listed below.

  • Microsoft Edge
  • Firefox
  • Chrome
  • Safari

2.2.3 Multiple screen support

Oskari interface works with tablets and mobile, but there's currently no separate mobile or tablet optimized version of Oskari. Embedded map tools are gradually developed into responsive tools which work well with smaller screens and are touch-friendly

2.2.4 Role based user management

Some Oskari modules can make use of role-based user management. Users belonging to different roles can be given access to specific functionality.

2.2.5 SSO authentication support

Authentication and SSO is supported via SAML 2.0.

2.2.6 Map window

  • Supported layer types:
  • WMS
  • WMTS
  • WFS (requires backend)
  • ArcGIS Cache layers
  • ArcGIS REST feature layers
  • Tile size and image format parameters are configurable
  • Coordinate system is configurable
  • Coordinate display adapts according to configured coordinate system
  • Zoom bar with a configurable number of zoom levels
  • Pan map view
  • Restore initial map state
  • Scale bar

2.2.7 GetFeatureInfo

  • Always active, starts by a single click / tap on the map
  • All GFI enabled map layers are queried on the single click
  • Response is shown in a popup dialog
  • Response can be styled using XSLT transformation (requires backend)
  • Multiple response types are supported

2.2.8 Mouse click functions

Panning by dragging Zoom in by double clicking on the map GetFeatureInfo action with a single click on all map layers with GFI enabled Feature information is returned also from WFS layers

2.2.9 Menu bar

  • Menu entries can be configured individually
  • Menu can be hidden (together with the toolbar)
  • One-field search which can return search results from multiple sources, such as placename, address, cadastral parcel or similar services
  • Service access parameters are configurable in the backend
  • Search for metadata from a CSW backend
  • Advanced search options
  • Display resulting layers on the map

2.2.12 Map layer selector

  • List of available map layers, grouped either by theme or by data provider
  • Add map layer to map view
  • Filter layers function
  • Show metadata for layers (link to the metadata display module, which accesses CSW interface)
  • Supported layer types are:
  • map layer
  • map layer stack,
  • background map layer
  • WFS layer
  • thematic map layer
  • analysis results layer
  • own data layer
  • time-enabled WMS layer (WMS-T)
  • New map layer types can be added programmatically

2.2.13 Selected map layers

  • List of layers displayed in the map view
  • Layers have localized titles and subtitles (optional)
  • Layer opacity can be controlled using a slidebar or by entering opacity percentage
  • Layers can be temporarily hidden and shown
  • Show metadata for layer (link to the metadata display portlet, which accesses CSW interface)
  • Layers can be organized in the layer stack by dragging and dropping
  • WFS layers provide a link to attribute information table
  • WFS layer style can be changed on a temporary basis
  • GeoServer-backed WMS-layers can be visualized as heatmaps
  • For WMS-layers the available styles can be viewed and selected for use

2.2.14 Map Legends

  • Flyout shows map legends from all selected layers

2.2.15 Toolbar

  • Toolbar buttons can be disabled and enabled individually
  • Toolbar can be hidden
  • Restore initial map state button
  • Map view history manager: back and forward buttons
  • Rubber band zoom button
  • Drag & pan button (enabled by default)
  • Measurement tools: distance and area
  • Marker tool: markers with associated text can be created on the map and sent as link
  • Link map view: creates an url which opens the current map view
  • Print map view: starts the print mode
  • Save map view: Map view configurations can be saved by logged-in user
  • Find nearest place tool: Find the nearest placename by clicking on the map
  • Tools can be made to appear when a specific map layer is added to selected layers list

2.2.16 Flyout manager

  • Flyouts can be opened from the menu, moved around the map window and closed by the user or programmatically
  • Flyout size adapts to screen size
  • Some flyouts can be resized by the user

2.2.17 WFS layers and attribute data table (requires backend)

  • Attribute data from WFS layers can be displayed in an attribute table
  • Also complex schema WFS layers can be displayed
  • Table view is synchronized with the map view: attribute rows are shown only for the features visible on the map
  • Columns to be shown can be selected
  • Data can be sorted ascending/descending
  • Features can be highlighted by clicking either on the map or in the table rows
  • Shift / Ctrl can be used to select multiple rows

2.2.18 Create map mode (requires backend)

  • Tool for creating embedded map windows
  • The embeddable map window is shown in WYSIWYG mode
  • The embedded map has same basic functions as the main map
  • Embedded map parameters are name, website and language
  • Size can be configured
  • Tools available in the embedded map: scale bar, index map, zoom bar, search field
  • Map functions which can be enabled or disabled: panning by dragging, GetFeatureInfo
  • Created embedded maps are saved and can be later edited
  • Status of an embedded map can be either published or unpublished

2.2.19 My Data (requires backend)

  • Points, lines and areas can be created and saved
  • Multigeometries and creation of holes is supported
  • Multiple layers can be created
  • Symbology is separately configurable for each layer
  • Description of map view can be edited and may contain links to external resources

2.2.20 Print mode (requires backend)

  • Paper size and layout selection
  • Automatic Print preview window
  • Printout format selection: PNG or PDF, also PDF/A
  • Title, scalebar, date and a logo can be added, also text and markers of your choice

2.2.21 Import data (requires backend)

  • Supported format for importing data as zipped files
  • Shapefile
  • Mapinfo MID/MIF
  • GPX trace
  • KMX (zipped KML)

2.2.22 Embedded map features (requires backend)

  • Zooming and panning
  • Measure tools
  • GetFeatureInfo
  • WFS tabular data display
  • Map layer menu
  • Supported layer types
  • WMS
  • WMTS
  • WFS
  • My Data
  • Imported data
  • Thematic Maps and Tables
  • Analysis results
  • ArcGIS rest Feature Layer
  • Address, placename and real estate search
  • Customizable layout (colours and tool positioning)
  • Customizable size (preset size, fill space available)
  • Find my location
  • RPC API for interaction with the web site where the map is embedded
  • RPC API features are listed separately here: http://oskari.org/examples/rpc-api/rpc_example.html

2.2.23 Thematic Maps (requires backend)

  • Creation of thematic maps by joining statistical data and administrative units
  • Importing own statistical indicators
  • Downloading of indicator data into CSV/Excel formats

2.2.24 Spatial Analysis (requires backend)

Available analysis methods:

  • Buffer
  • Descriptive statistics
  • Union
  • Clip
  • Geometric filter
  • Analysis Layer Union
  • Buffers and sectors
  • Difference Computation
  • Spatial join
  • Draw your own feature to be used in analysis
  • Clip a feature
  • The analysis tool also provides functionality to use search channel results as input for analysis.

2.2.25 Authentication and user management (requires backend)

  • Bundle for user management
  • Bundle for management of layers privileges

2.2.26 Digiroad Feature selector

  • Adds a grid to display features fetched via WFS or some other protocol supported by OpenLayers
  • Users can view the features and edit their attributes
  • Features get added to the grid when the user clicks on the map. Alt and Ctrl keys can be used as modifiers
  • A proxy is needed in case features are fetched via WFS

2.3 Bundles

A bundle is a component in an Oskari application. A bundle is a selection of Oskari classes which form a component that offers additional functionality for an application. A bundle can offer multiple implementations for a functionality which can then be divided into smaller packages for different application setups. Packages can be used to offer a multiple views for the same functionality for example search functionality as a small on-map textfield or a window-like UI (see Tile/Flyout) for the same functionality.

2.3.1 Bundle architecture

Starting with 1.48.0 Oskari supports writing bundles in JavasScript ES6. This update allows many improvements to the way Oskari bundles are composed.

bundle.png

Service It's the Service's responsibility keep the state related to the bundle business logic consistent and updated. Possibly saving this state to the backend via action routes when needed. The Service exposes public methods to mutate the state and allows other components within the bundle to register for notifications about state changes.

View It's the View's responsibility to update the Flyout/Tile DOM accordingly when it receives notification from the Service that state has changed. It's also the View's responsibility to mutate the Service as a reaction to user input. Flyouts, Tiles, Popups etc. are parts of the View.

Map Plugin It's the Map Plugin's responsibility to update the map related presentation when it receives notification from the Service that state has changed. If the bundle does not have map related functionality, it doesn't need to implement a Map Plugin. Map layers, map controls, map interactions are implemented by Map Plugins.

Data flow User input -> View/Plugin mutates Service by calling a public method on the Service -> Service updates internal state (possibly saving to backend) -> Service notifies all interested components by triggering an event -> Listening components (Views & Map Plugins) update their presentation.

Communication between bundles If a bundle wants to allow other bundles to interact with itself, the bundle can register requests and publish events to Oskari sandbox.

A Service can also be exposed to other bundles with a call to sandbox.registerService(service). Afterwards other bundles can obtain a reference to the service by calling sandbox.getService(serviceName).

External dependencies If you bundle depends on external library code, the libary must be referenced to be included into the build.

If the library is a part of oskari-frontend repository (lodash, d3, etc.), or generally if the library is distributed a separate JS file you should reference it in your bundle.js.

If you want to use libraries distributes as NPM modules, you can npm install --save them and import as usual. But check first that the library isn't in use under oskari-frontend libraries/ to avoid duplication of library code.

2.3.2 Bundle manager/loader

  • loads Bundle Definitions
  • manages bundle state and lifecycle
  • loads Bundle JavaScript sources and CSS resources
  • instantiates Bundle Instances
  • manages Bundle Instance lifecycle

The code for Oskari class system/bundle manager/Oskari loader can be found in Oskari/src. The minified version of this is available in Oskari/bundles/bundle.js and a new version of this core-functionality can be built by running npm run core command in Oskari/tools folder.

2.3.3 Admin bundles

Admin

Description: Configuration: State: deprecated/not? Works in which versions? Dependencies: Requests:

Announcements

Hierarchical layerlist

Layer analytics

Layer editor

Layer selector

Publish transfer

Admin users

App setup

2.3.4 Framework/backend bundles

2.3.5 Map bundles

2.3.6 Statistic bundles

2.3.7 UI bundles

2.4 Bundle requests

2.5 Bundle events

2.6 Remote procedure call (RPC)