Oskari API Documentation

Select bundle

admindown-arrow
cataloguedown-arrow
  • metadata
    Generic functionality to display metadata from a CSW-service
  • metadatasearch
    Provides metadata catalogue search user-interface for an application.
frameworkdown-arrow
  • announcements
    Bundle for displaying announcements made with admin-announcements.
  • Core services
    Provided by the framework
  • layeranalytics
    Map layer problem tracker
  • layerlist
    A layer listing functionality for the geoportal.
  • mydata
    Provides generic container for listing user data and offers other functionalities a way to present user-specific information.
  • Map Publisher 2
    Allows creation of embedded maps
  • RPC
  • Search
    Provides basic search functionality without any UI
  • Selected-featuredata
    Allows infobox opening in new flyout
  • statehandler
    History functionality and state saving.
  • usagetracker
    Pings the server when any of the configured events occur.
mappingdown-arrow
statisticsdown-arrow
  • statsgrid2016
    Statistics data display. This will replace the statsgrid bundle specification when the implementation has the comparable functionalities as the current one. The bundle depends on mapstats-bundle that provides support for statslayer layertype.
uidown-arrow

myplaces

Description

My places functionality.

External graphic can be activated by changing OpenLayers bundle version to openlayers-graphic-fill and giving new style as additional parameter to the Drawin plugin. Adding external graphics in DrawPlugin.js:

        var newStyle = '<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>\
        <sld:StyledLayerDescriptor version="1.0.0" xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/sld ./Sld/StyledLayerDescriptor.xsd">\
            <sld:NamedLayer>\
                <sld:Name>Polygon</sld:Name>\
                <sld:UserStyle>\
                    <sld:Name>Polygon</sld:Name>\
                    <sld:FeatureTypeStyle>\
                        <sld:FeatureTypeName>Polygon</sld:FeatureTypeName>\
                        <sld:Rule>\
                            <sld:Name>Polygon</sld:Name>\
                            <sld:Title>Polygon</sld:Title>\
                            <sld:PolygonSymbolizer>\
                                <sld:Fill>\
                                    <sld:GraphicFill>\
                                        <sld:Graphic>\
                                            <sld:ExternalGraphic>\
                                                <sld:OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://www.paikkatietoikkuna.fi/mml-2.0-theme/images/logo.png"/>\
                                                <sld:Format>image/jpg</sld:Format>\
                                                </sld:ExternalGraphic>\
                                            <sld:Size>20</sld:Size>\
                                        </sld:Graphic>\
                                    </sld:GraphicFill>\
                                </sld:Fill>\
                                <sld:Stroke>\
                                    <sld:CssParameter name="stroke">#006666</sld:CssParameter>\
                                    <sld:CssParameter name="stroke-width">2</sld:CssParameter>\
                                    <sld:CssParameter name="stroke-opacity">1</sld:CssParameter>\
                                    <sld:CssParameter name="stroke-dasharray">4 4</sld:CssParameter>\
                                </sld:Stroke>\
                            </sld:PolygonSymbolizer>\
                        </sld:Rule>\
                    </sld:FeatureTypeStyle>\
                </sld:UserStyle>\
            </sld:NamedLayer>\
        </sld:StyledLayerDescriptor>';


        // rewrite creation of drawPlugin in the start-function
        // register plugin for map (drawing for my places)
        var drawPlugin = Oskari.clazz.create('Oskari.mapframework.ui.module.common.mapmodule.DrawPlugin', newStyle);

TODO

  • ''Save external graphic patterns to the backend''

Bundle configuration

{
    "queryUrl" : "[REPLACED BY HANDLER(url for wfst operations)]",
    "featureNS" : "http://www.oskari.org",
    "layerDefaults" : {
      "wmsName" : "oskari:my_places_categories"
    },
    "wmsUrl" : "/maptiles/myplaces?myCat="
}
  • queryUrl is the url for WFST operations, if you are using oskari-server it will be resolved by the server
  • featureNS is the namespace defined for geoserver for myplaces
  • layerDefaults is an optional configuration that can be used to override some or all myplaces-layer defaults in code:
{
    wmsName: 'ows:my_places_categories',
    type: "wmslayer",
    isQueryable: true,
    opacity: 90,
    metaType: this.instance.idPrefix,
    orgName: catLoc.organization,
    inspire: catLoc.inspire
}

Note! Changing metaType may result in unexpected behavior

  • wmsUrl is the base url which returns images (myplaces category id is added to the end automatically/layer)

Requests the bundle handles

RequestHow does the bundle react
DrawPlugin.StartDrawingRequestReturns drawing as a callback parameter
DrawPlugin.StartDrawingRequestTells drawing plugin to start listening
DrawPlugin.StopDrawingRequestTells drawing plugin to stop listening
MyPlaces.EditCategoriesRequestEdit category
MyPlaces.DeleteCategoryRequestShows the corfirm delete -functionality
MyPlaces.PublishCategoryRequestShows the corfirm publish -functionality
MyPlaces.EditPlacesRequestShows place form

Requests the bundle sends out

RequestWhy/when
MapModulePlugin.GetFeatureInfoActivationRequest

Events the bundle listens to

This bundle doesn't listen to any events.

Events the bundle sends out

Event When it is triggered/what it tells other components
DrawPlugin.AddedFeatureEvent Sent when a feature has been added
DrawPlugin.FinishedDrawingEvent Sent when a drawing has been finished

Dependencies

DependencyLinked fromPurpose
Library namesrc where its linked from*why/where we need this dependency*

OR

This bundle doesn't have any dependencies.