HSLayers.MapViewer (class)

HSLayers.MapViewer

class HSLayers.MapViewer(config)

MapViewer consists of {@link HSLayers.MapPanel}, {@link HSLayers.Printer}, {@link HSLayers.OWSPanel} and other tools. It is derived from Ext.Panel with border layout. By default, the central panel will contain the map, east panel is going to be used for other tools, such as LayerSwitcher, InfoPanel, OWSPanel and other tools.

param Object config:
 
param String config.layout:
 

(optional, default: “border”)

param Object config.mapPanelCfg:
 

(optional)

configuration of the HSLayers.MapPanel() object

param Object config.infoPanelCfg:
 

(optional)

configuration for HSLayers.InfoPanel() object

param Object config.layerSwitcherCfg:
 

(optional)

configuration for HSLayers.LayerSwitcher() object

param Object config.owsCfg:
 

(optional)

configuration for HSLayers.OWSPanel() object

param Object config.wmcManagerCfg:
 

(optional)

configuration for HSLayers.WMCManager() object

Example usage:

var mapViewer = new HSLayers.MapViewer({
        region:"center",
        switchPanels: false
    });
    var map = new OpenLayers.Map(mapViewer.mapPanel.body.dom.id);
    mapViewer.setMap(map);
see:http://docs.sencha.com/ext-js/3-4/#!/api/Ext.Panel

Properties

object with following keys
  • newLayers – add new layers to map
  • oldLayers – set attributes of existing layers (visibility, transparency, ...)
  • extent – zoom context extent
  • title – set map title
  • context – set this context as opend file
  • removeLayers – remove added layers
  • mapProjection – set projection of the map
  • all – all above
HSLayers.MapViewer.infoPanel
Type :HSLayers.InfoPanel (static)

HSLayers.MapViewer

Information panel

HSLayers.MapViewer.items
Type :array (static)

HSLayers.MapViewer

List of items

HSLayers.MapViewer.layerSwitcher
Type :HSLayers.Control.LayerSwitcher (static)

HSLayers.MapViewer

LayerSwitcher object

HSLayers.MapViewer.map

HSLayers.MapViewer

The map object use the {setMap} method for setting this attribute

See:

HSLayers.MapViewer.mapPanel
Type :HSLayers.MapPanel (static)

HSLayers.MapViewer

Panel with the map

HSLayers.MapViewer.overwriteLocalMapContext

HSLayers.MapViewer

overwrite local map context with new WMC object with following keys - newLayers – add new layers to map - oldLayers – set attributes of existing layers (visibility, transparency, ...) - extent – zoom context extent - title – set map title - context – set this context as opend file - removeLayers – remove added layers - mapProjection – set projection of the map - all – all above

HSLayers.MapViewer.owsPanel
Type :HSLayers.OWSPanel (static)

HSLayers.MapViewer

Panel for Open Web Services (OWS), like WMS, WFS and others

HSLayers.MapViewer.params

HSLayers.MapViewer

URL Parameters

HSLayers.MapViewer.printerPanel
Type :HSLayers.Printer (static)

HSLayers.MapViewer

Panel printer manager

HSLayers.MapViewer.resetLayers
Type :[{OpenLayers.Layer}] (static)

HSLayers.MapViewer

New added layers

HSLayers.MapViewer.switchPanels
Type :Boolean (static)

HSLayers.MapViewer

Can we switch to layerswitcher and other panels automatically?

Default Value:
true
HSLayers.MapViewer.title

HSLayers.MapViewer

Panel title

HSLayers.MapViewer.titleItem
Type :HSLayers.Control.titleItem (static)

HSLayers.MapViewer

context title text item in the toolbar

HSLayers.MapViewer.toolsPanel

HSLayers.MapViewer

Panel for map tools, like LayerSwitcher, InfoBox, WMS clients and so on

See:

HSLayers.MapViewer.wmcaction
Type :String (static)

HSLayers.MapViewer

Default action, when WMC arrives via URL

Default Value:
dialog
HSLayers.MapViewer.wmcFileDialog
Type :HSLayers.FileDialog (static)

HSLayers.MapViewer

WMC file dialog

Methods

HSLayers.MapViewer.openWMCFromURL(url, action)

open wmc

Arguments:
  • url (String) – url where to get the WMC from
  • action (String) – one of “dialog”,”owerwrite”,”add” default: wmcaction
HSLayers.MapViewer.setMap()

set this map object

:param OpenLayers.Map :

HSLayers.MapViewer.newContext()

Restart map project, create new map context

HSLayers.MapViewer.openWMCManager()

Open HSLayers.WMCManager window

HSLayers.MapViewer.mapInitialized()

Call this method, after the map is fully initilalized

HSLayers.MapViewer.parseWMC()

parse WMC context

HSLayers.MapViewer.setTitle(title)

Set title of this project

Arguments:

Main Menu


Table Of Contents

Previous topic

HSLayers.MapPortal (class)

Next topic

HSLayers.MapViewer.ToolsPanel (class)

This Page