HSLayers.MapPortal ================== `HSLayers.MapPortal `_ is MapViewer, extended with several `HSlayers.Control` controls. It is also placed into `Ext.Viewport`, means it is rendered to entire content of the web page. The `OpenLayers.Map` object is created automatically, and you only can give it some parameters using ``mapOptions`` parameter while initializing. Example: http://dev.bnhelp.cz/wwwlibs/hslayers/branches/editace/examples/MapPortal.html .. literalinclude:: ../../../../branches/hslayers-3.0/examples/MapPortal.html :language: html :linenos: :lines: 17-44 You see, now it's getting to be hard. How to make this shorter? Again, use the one-file shortcut:: Once javascripts are set, it's going to be easy. Create the MapPortal object and pass the configuration for OpenLayers.Map object along it: .. literalinclude:: ../../../../branches/hslayers-3.0/examples/MapPortal.html :language: javascript :linenos: :lines: 57-64 Create some map layer and add it to map .. literalinclude:: ../../../../branches/hslayers-3.0/examples/MapPortal.html :language: javascript :linenos: :lines: 82-92 Some notes to the MapPortal --------------------------- MapPortal is lying on the top of HSLayers. It uses all it's components and bunch of server scripts. It has (among others) following functionalities: * Can remember your last state and restore the application in the form, you left it * Printing of hardcopy maps * WMS and WFS manager * Advaced LayerSwitcher * Advanced Query tool (both WMS and MapServer) * Accepts ``ows=http://foo/bar`` parameter in the url and calls the OWS manager immediately * Area and line measurements * There is one *base* layer already defined in the portal, it is 1x1 pixel big transparent image. All your layers should be *overlays* and if you want to indicate them in the layerswitcher to be at the bottom, use ``isBaseGroup`` instead (more on this in the LayerSwitcher description). * There is already :attr:`HSLayers.MapPortal.vlayer` and :attr:`HSLayers.MapPortal.mlayer` layers defined in the portal, so you can use them for rendering of temporary vector or marker features in the map. Features are removed, when the :guilabel:`Clear` button in the :class:`HSLayers.Control.InfoPanel` is clicked. ____ * Vector editing In next sections, we will be talking about several HSLayers.Controls and HSLayers.Layer components more detaily.