COM / Plugin reference
The Demis WMS engine consists of several COM objects, which are accessed by the IIS web server through simple ASP scripts.
We recommend that you build your web applications based on the OpenGIS specifications and retrieve information about a map through the capabilities XML. On most cases this will allow you to avoid depending on the Demis specific COM interfaces described in this section.
There are some exceptions, like where maps need to be loaded dynamically instead of from the windows control panel, or where you develop a “Plugin” to draw your own graphics on top of the map.
The WMS.ASP script
ASP is not the only scripting language you can use, but the minimal ASP script you need is already provided by the software installation. This will interface the COM objects to IIS properly so binary images and other outputs can be passed on to the HTTP stream using a single script, WMS.ASP
The contents of WMS.ASP are listed here for reference:
What the script basically does is parse the WMS parameter from the url to determine which map you are addressing, then it connects to this map and passes on the request. Then finally, it wil return the binary or text format output.
If you do for some specific reason need to address the COM objects directly from your own ASP scripts, we provide a summary of the objects involved here, DemisWMSConnect.Service and DemisWMSMap.Server
If you need more information or have a specific problem, you can contact us for support, preferably using our user support forum.
This object represents the collection of maps you have setup using the WMS configuration in Windows control panel.
This object represents a single map, and does the actual processing of all WMS requests.
This provides a standard COM interface for developers to connect a plug-in DLL which can render customized graphics on top of the map. Typically this is used to draw a dynamic layer of information on top of the map, by example for a tracking application where moving objects are plotted at their current position.
We can provide a sample “WMSSQL” plugin to demonstrate this including the visual basic source code. The WMSSQL plugin can plot point symbols at a location given by X Y coordinates resulting from a standard SQL query to a SQL server or MS-Acess database.
The way a plugin works is very flexible, after drawing the map in a standard fashion, the DemisWMSMap.Server engine will call your plugin providing a standard “Device Context” (hDC) which you can address to use standard Windows GDI functions to draw additional graphics on top of the map. Once your plugin completes it’s rendering, it returns control to the WMS server which will compress the image into PNG/GIF/JPEG format and send this to the client as usual.
The Plugin DLL needs to implement the following properties and methods:
For more information on the Plugin method arguments and usage, we suggest you download the sample plugin from our downloads page for a working example. Also we have a separate topic related to plugins in our user support forum
This function provides a way to define a thematic dataset by linking an array of numeric data to the objects in a particular (polygon) layer based on the object ID’s. Any number of ranges can be specified by their maximum value and color. This type of thematic map is called a Chloropleth map where each polygon is rendered in a color depending on the range of its data value.
object . SetThematicData ( Layer, VcID , VcData , vLimits , vLabels , vColors )
By providing a layer name, two arrays of ID and thematic Data values and omitting the other arguments, an automatically generated “classification” will be generated, with a max value, color and label for each. To customize this classification you can provide one of your own using three additional arrays. An example script demonstrating this will be provided on request.