Documentation33ChangeLog » History » Version 11

« Previous - Version 11/12 (diff) - Next » - Current version
Anonymous, 06/04/2012 03:33 PM

HSLayers 3.3.0

  • New release of HSLayers.

HSLayers 3.3 ChangeLog - Differences from 3.2

  • OWS Client restructuralization
  • Added InitBus
  • Added Permalink
  • Embeded
  • MapPortal initialization
  • OpenLayers 2.11 (currently rc3)
  • WCS, WFS layers added (using Proxy4OWS)

MapPortal Initialization

before 3.3 Version
 geoportal = new HSLayers.MapPortal({renderTo: Ext.get("map"),

map = geoportal.initMap(mapOptions,projections,undefined,{..... });

So basically, there where 2 steps: create geoportal object and initilialize Map object

Since 3.3 (trunk) version

SInce 3.3, you have to do only one step, rest will be done automatically. All options are used by the constructor of HSLayers.MapPortal

            geoportal = new HSLayers.MapPortal({renderTo: Ext.get("map"),
                    layout: "fit",height: Ext.get("map").dom.clientHeight,
                    mapOptions: mapOptions,
                    panels:["layerSwitcher", "infoPanel",
                    "owsPanel", "wmsPanel","printerPanel"],
                    stateUrl: "/php/statusmanager/index.php",
                    panZoomBar: { dummyScales: [
                                    {scale: 200000,label:"Města"},
                                    {scale: 5000,label:"Obec"},
                                    {scale: 500,label:"Katastr"}

       map =;

AfterInit function

afterInit funciton is replaced with mapInitialized()



HSLayers.Control.InitBus is new control, which enables to call step-by-step and one-after-another processes during map Initialization

HSLayers.MapPortal has allready 3 processes registred to InitBus:

  1. State of the map (from statusmanager)
  2. WMC Parsing
  3. OWS parsing as URL parameter

User can add new processes using register method of InitBus. There are two ways, how to register process to InitBus - as simple function (next process can be run immidietly after function end) and as object fireing some event, on which the initBus can call next process.

Simple function can be registered as follows:

             this._parseOWS, // function to be called
                scope:this, // scope for the function call
                title: OpenLayers.i18n("Parsing OGC OWS services") // title of the process to be displayed in the future

More complicated example of the call, next step is waiting on particular event. The event can be one fired by OpenLayers or one fired by ExtJS.

                         geoportal.readStateControl.getState,   // function to be called
                              object: geoportal.readStateControl, // object, which will call the event, when everything is done
                              "event": "read",            // name of the event, which initBus should observe. The event will be fired by the "object" specified in the configuration
                              scope: geoportal.readStateControl, // scope for the function call
                              title: OpenLayers.i18n("Restoring map state") // title of the process to be displayed in the future

Now, when all events are registered, and geoportal.mapInitialized() is called, can be called as well



  • LegendURL has different namespace. There was bug in HSL 3.2, see #2188
  • Two new elements were added to WMC for each layer: path and title because of new HSLayers.LayerSwitcher


  • HSLayers.LayerSwitcher is two-panel layerswitcher, no longer child of OpenLayers.Control, but child of Ext.TabPanel


  • HSLayers.WMS, WCS and WFS layer types, as well as MapServer


  • All panels are now (un)dockable