Hierarchy (View Summary)

Constructors

  • Constructor: OpenLayers.Renderer.SVG

    Parameters: container - {String}

    Parameters

    • container: string | Element
    • options: {}

    Returns SVG

Properties

locked: boolean
MAX_PIXEL: number
root: HTMLDivElement

Methods

  • Method: clear Clear all vectors from the renderer. virtual function.

    Returns void

  • Method: drawFeature Draw the feature. The optional style argument can be used to override the feature's own style. This method should only be called from layer.drawFeature().

    Parameters: feature - {<OpenLayers.Feature.Vector>} style - {}

    Returns: {Boolean} true if the feature has been drawn completely, false if not, undefined if the feature had no geometry

    Parameters

    Returns void

    • Method: eraseFeatures This is called by the layer to erase features

      Parameters: features - {Array(<OpenLayers.Feature.Vector>)}

      Parameters

      Returns void

    • Method: eraseGeometry Remove a geometry from the renderer (by id). virtual function.

      Parameters: geometry - {<OpenLayers.Geometry>} featureId - {String}

      Parameters

      Returns void

    • Method: getFeatureIdFromEvent Returns a feature id from an event on the renderer. How this happens is specific to the renderer. This should be called from layer.getFeatureFromEvent(). Virtual function.

      Parameters: evt - {<OpenLayers.Event>}

      Returns: {String} A feature id or undefined.

      Parameters

      Returns undefined | string

    • Method: getNodeType

      Parameters: geometry - {<OpenLayers.Geometry>} style - {Object}

      Returns: {String} The corresponding node type for the specified geometry

      Parameters

      Returns string

    • Method: getRenderLayerId Gets the layer that this renderer's output appears on. If moveRoot was used, this will be different from the id of the layer containing the features rendered by this renderer.

      Returns: {String} the id of the output layer.

      Returns string

    • Method: moveRoot moves this renderer's root to a (different) renderer. To be implemented by subclasses that require a common renderer root for feature selection.

      Parameters: renderer - {<OpenLayers.Renderer>} target renderer for the moved root

      Parameters

      Returns void

    • Method: removeText Function for removing text labels. This method is only called by the renderer itself.

      Parameters: featureId - {String}

      Parameters

      • featureId: string

      Returns void

    • Method: setExtent Set the visible part of the layer.

      Resolution has probably changed, so we nullify the resolution cache (this.resolution) -- this way it will be re-computed when next it is needed. We nullify the resolution cache (this.resolution) if resolutionChanged is set to true - this way it will be re-computed on the next getResolution() request.

      Parameters: extent - {<OpenLayers.Bounds>} resolutionChanged - {Boolean}

      Returns: {Boolean} true to notify the layer that the new extent does not exceed the coordinate range, and the features will not need to be redrawn. False otherwise.

      Parameters

      • extent: Bounds
      • resolutionChanged: boolean

      Returns boolean

    • Method: setStyle Use to set all the style attributes to a SVG node.

      Takes care to adjust stroke width and point radius to be resolution-relative

      Parameters: node - {SVGDomElement} An SVG element to decorate style - {Object} options - {Object} Currently supported options include 'isFilled' {Boolean} and 'isStroked' {Boolean}

      Parameters

      • node: SVGElement
      • style: {}
      • options: {}

      Returns SVGElement