![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Public Member Functions | |
bool | declareGetFeatureFormat (const char *mimeType, const char *format, const char *v1_0_0_Equivalent=0) |
void | dynamicCapabilities () |
void | dynamicCachedCapabilities (bool enable) |
Protected Member Functions | |
TSLWMSRegister () | |
~TSLWMSRegister () | |
|
protected |
|
protected |
bool TSLWMSRegister::declareGetFeatureFormat | ( | const char * | mimeType, |
const char * | format, | ||
const char * | v1_0_0_Equivalent = 0 ) |
This method should be used by a plugin when the getLayers method is called upon its data source. The getFeatureInfo output formats that it supports should be registered. If no loaded data sources declare any supported formats then the WMS will not advertise that it supports getFeatureInfo requests.
mimeType | The mime type string that it supports, eg "text/plain" |
format | The type that will appear in the WMS capabilities document for versions 1.1.0 - 1.3.0 of the WMS. This is often the same as the mimeType, but is not always. |
v1_0_0_Equivalent | Version 1.0.0 of the WMS specification does not directly use MIME types in the WMS Capabilities document. This parameter allows the string used in the WMS 1.0.0 capabilities document to be specified. If this parameter is null, then this GetFeatureInfo output format will not be declared in the WMS 1.0.0 version of the capabilities document. |
void TSLWMSRegister::dynamicCachedCapabilities | ( | bool | enable | ) |
void TSLWMSRegister::dynamicCapabilities | ( | ) |
Calling this method from a WMS plugin registers that this plugin's capabilities will vary over time and therefore should be re-requested each time a request is made. This has a significant impact on the performance of the WMS so should not be switched on unless necessary.
When the WMS service first starts up, it queries all of its plug-ins for their capabilities and passes in a TSLWMSRegister object. In normal circumstances, the returned layers are then cache for the lifetime of the service and used to respond to GetCapabilities requests. If this flag is turned on, then the response from that initial getLayers call is discarded and each time any type of request is received, the getLayers method will be called to regenerate the system capabilities. The capabilities are needed for GetMap and GetFeatureInfo requests too so that requests can be matched to the correct plugin instance.
If this option is enabled, during subsequence GetCapabilities requests to the service, a valid request parameter will be passed to the getLayers method of the plugin. This is the only case in which this argument will be non-null. The parameter can be used to determine if any additional service parameters were passed as part of the request.
The plugin must be able to handle the cases whereby the plugin's capabilities have changed between the time the getLayers call is made and the subsequent getMap method call is made during a single GetMap request.
Once enabled, this flag cannot be switch off later.