WMSClientCore

warning This project is no longer maintained! warning

Introduction

The WMSClientCore provides a simple API to access http://www.opengeospatial.org/ OGC WebMapServices (WMS). The API is tested within different projects and was originally developed within the Balance Project (see 02-Ostlaender.pdf for some background information) as a basis for a browser enabled Web Client using Jakarta Struts, and the WMSAdapter of the OX-Framework. The API includes the following functionalities:
  • Accessing WMS supporting version 1.0.0, 1.1.0, 1.1.1
  • Overlaying of different layers of different WMS.
  • Some common functionality for panning and zooming
  • Support of GetFeatureInfo
  • Support of WebMap context documents
  • Support of caching of requested images and capabilities
  • Support of a special overview map for providing some orientation in a WMSClient
  • Generated maps and context documents will be accessed through servlets.
Planned functionality:
  • Support of a multi-thread model to retrieve maps of different services simultaniously

Installation

Download the source code in the following archives: To compile the original sources you will need the libraries contained in the lib folder of the module.

Also you need following external libraries: Place the compiled sources into the WEB-INF/classes of your Tomcat webapplication.

Configuration

In the basic configuration the core uses the file org/n52/wmsclientcore/defaultContext.xml. This file can be edited according to the current Web Map Context Document specification (http://www.opengeospatial.org/specs/?page=specs click here to get the specification). If you want to use a seperate context document you can specifiy one in the web.xml. Please look at the sample web.xml posted here:

* web.xml: Sample web.xml to get the wmsclientcore running with a seperate map context file

Building lib using Ant

Ant is a open source make tool provided by the Apache Software Foundation. For further information please visit the ANT website.

Building a library out of the WMSClientCore is also an easy task. Just use the build.xml which is placed in the root of the project. Some extra properties must be set:
  • destPath - the location you want to place the jar at. (e.g c:\)
  • log4JLocation - the location you want to write logging to.(e.g ${catalina.home}/logs/wmsclientcore.log)
  • resourceExcluded - enable flag if you want to (disable?) the wmsclientCore.properties (this is very experimental and should only be used, if the classes folder of your WEB-INF contains a wmsclientCore.properties)

Extended configuration

The WmsClientCore can be configured through a properties file which is placed in src/resources/wmsclientcore.properties. There are several parameters which can be edited:
  • imageCacheSize - the cache size for images
  • imageCaching - if image caching is enabled [true/false]
  • errorImageNoLayer - location of the image, which will be rendered if no layer is enabled
  • errorImageBlank - location of the image, which will be rendered if an error occured
  • capabilitiesCacheSize - the number of capability documents which will be stored in cache
  • capabilitiesCaching - if capabilities caching is enabled [true/false]
  • errorImageNoWms - location of the image, which will be rendered if no WMS is added to the WMSClientCore
  • imageFormat - the supported image format (will not be used actually)
  • generalMapCollectionUrl - a URL which points to a context collection document, which itself points to different overview maps.
  • initialCtxID - the ID of the context, which will be rendered in the overview at startup.

Development Hints

To get used to the WMSClientCore you have to explore the code starting at the org.n52.wmsclientcore.ClientModelController. This is the central class.

In the case of a web application the ClientModelController should be a session object which should be changed through user interaction. The ClientModelController has to be set as a session object under the name "controller". If you choose a different name for it in the session you cannot use the servlets because the servlets (e.g. org.n52.wmsclientcore.ImageStreamingServlet) access the ClientModelController instance in the session via the name controller.

JavaDoc

Please generate the JavaDoc Documentation by your own, which is a simple task using Eclipse or ANT.

Metadata

Originally written by Theodor Foerster, updated by Main.DanielNuest.
Topic attachments
I AttachmentSorted ascending Action Size Date Who Comment
02-Ostlaender.pdfpdf 02-Ostlaender.pdf manage 958 K 05 Jan 2012 - 14:34 DanielNuest  
web.xmlxml web.xml manage 3 K 16 Sep 2005 - 14:00 UnknownUser Sample web.xml to get the wmsclientcore running with a seperate map context file
wmsClientCore-2012.zipzip wmsClientCore-2012.zip manage 4 MB 05 Jan 2012 - 15:50 DanielNuest  
wmsClientCore.zipzip wmsClientCore.zip manage 4 MB 05 Jan 2012 - 14:27 DanielNuest  
Topic revision: r13 - 20 Aug 2012, EikeJuerrens
Legal Notice | Privacy Statement


This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback