Project

General

Profile

WMJSService » History » Version 11

« Previous - Version 11/17 (diff) - Next » - Current version
Redmine Admin, 02/09/2017 03:16 PM


API/WMJSService

Example: Do GetCapabilities on a WMS Service URL

var serviceURL = 'http://geoservices.knmi.nl/cgi-bin/RADNL_OPER_R___25PCPRR_L3.cgi?';

var service = WMJSgetServiceFromStore(serviceURL);

var failed = function(msg){
  alert(msg);
};

var success = function(capabilitiesDoc){
  alert('GetCapabilitiesDoc obtained!');
  console.log(GetCapabilitiesDoc);
};

service.getCapabilities(success,failed);

Configuration

  • Use the global method WMJSgetServiceFromStore(serviceUrl) to create or get a service object for an URL.

Properties

  • service
  • title
  • getcapabilitiesDoc

Methods

  • getCapabilities(successCallback, failedCallback,forceReload) - Does getcapabilities for this service. Uses callback functions to indicate whether success or failure has happened.
  • getNodes(successCallback, failedCallback,forceReload) - Returns all layernames in a hierarchical way, the returned objects are nested by using the children property. A node has the following properties: name, text, leaf and children. The returned object can directly be used in an ExtJS4 tree component.
  • getLayerNames(successCallback, failedCallback) - Returns an array with all layernames.