Project

General

Profile

API/WMJSLayer

   var layer = new WMJSLayer({
     service:'http://geoservices.knmi.nl/cgi-bin/RADNL_OPER_R___25PCPRR_L3.cgi?',
     name:'RADNL_OPER_R___25PCPRR_L3_COLOR'
   });

Configuration:

  • enabled
  • format
  • keepOnTop
  • onReady
  • opacity
  • service
  • style
  • title
  • transparent

Properties:

  • onReady - Assign a function to this attribute and it will be called with the layer as argument when the layer is ready
  • hasError - Is set to true when this layer has an error
  • lastError - The message when hasError is true

Methods:

  • cloneLayer()
  • display(displayornot)
  • draw()
  • getDimension(name) - Get the dimension with corresponding name for this layer, see WMJSDimension
  • getProjection(srsName)
  • getStyle()
  • moveDown()
  • moveUp()
  • parseLayer(callback,forcereload) - Parses this layer, e.g. all its properties are set based on the description of its service. When forcereload is set to true, the layer is parsed again. The callback function is always called with the layer object as argument, whether there is an error or not, see the hasError and lastError properties to determine what went wrong.
  • remove()
  • setDimension(name,value)
  • setOpacity(opacity)
  • setService(service)
  • setStyle(style)
  • WMJSLayer(config)
  • zoomToLayer()