Documentation33ChangeLog » History » Version 10

Version 9 (Anonymous, 01/11/2012 11:29 AM) → Version 10/12 (Anonymous, 06/04/2012 03:13 PM)

h1. HSLayers 3.3.0

* New release of HSLayers.

h1. 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)

h2. MapPortal Initialization

h3. 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

h3. 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 =;

h2. AfterInit function

afterInit funciton is replaced with mapInitialized()

h2. InitBus

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:

# State of the map (from statusmanager)
# WMC Parsing
# 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


h2. WMC

* 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