dojox/geo/openlayers/_base.GfxLayer (version 1.10)

dojox/geo/openlayers/Layer

Summary

A layer dedicated to render dojox.geo.openlayers.GeometryFeature

A layer class for rendering geometries as dojox.gfx.Shape objects. This layer class accepts Features which encapsulates graphic objects to be added to the map. All objects should be added to this group.

Usage

var foo = new _base.GfxLayer(name,options);
dojox/geo/openlayers/GfxLayer
Parameter Type Description
name undefined
options undefined

See the dojox/geo/openlayers/_base.GfxLayer reference documentation for more information.

Property Summary

Method Summary

Event Summary

Properties

_viewport

Methods

_surfaceSize()

Recomputes the surface size when being resized.

added()

Called when added to a map.

addFeature(f)

Add a feature or an array of features to the layer.

Parameter Type Description
f Feature | Feature[]

The Feature or array of features to add.

clear()

Removes all the features from this layer.

getDataExtent()

Get data extent

Returns:undefined
getDojoMap()
Returns:undefined
getFeatureAt(i)

Returns the i-th feature of this layer.

Parameter Type Description
i Number

The index of the feature to return.

Returns:any | undefined

The i-th feature of this layer.

getFeatureCount()

Returns the number of the features contained by this layer.

Returns:any | number | undefined

The number of the features contained by this layer.

getFeatures()

Returns the feature hold by this layer.

Returns:any | undefined

The untouched array of features hold by this layer.

getSurface()

Get the underlying dojox.gfx.Surface

Returns:any | undefined

The dojox.gfx.Surface this layer uses to draw its GFX rendering.

getViewport()

Gets the viewport

Returns:undefined
moveTo(event)

Called when this layer is moved or zoomed.

Parameter Type Description
event undefined

The event

redraw()

Redraws this layer

removeFeature(f)

Removes a feature or an array of features from the layer.

Parameter Type Description
f Feature | Feature[]

The Feature or array of features to remove.

removeFeatureAt(index)

Remove the feature at the specified index.

Parameter Type Description
index int

The index of the feature to remove.

renderFeature(f)

Called when rendering a feature is necessary.

Parameter Type Description
f dojox/geo/openlayers/Feature

The feature to draw.

setMap(map)

Sets the map for this layer.

Parameter Type Description
map undefined
setViewport(g)

Sets the viewport

Parameter Type Description
g Object

An object with the following properties:

  • destroy:

    Releases all internal resources owned by this shape. Once this method has been called, the instance is considered destroyed and should not be used anymore.

  • getNode:

    Different graphics rendering subsystems implement shapes in different ways. This method provides access to the underlying graphics subsystem object. Clients calling this method and using the return value must be careful not to try sharing or using the underlying node in a general way across renderer implementation. Returns the underlying graphics Node, or null if no underlying graphics node is used by this shape.

  • getShape:

    returns the current Shape object or null (see dojox/gfx.defaultPath, dojox/gfx.defaultPolyline, dojox/gfx.defaultRect, dojox/gfx.defaultEllipse, dojox/gfx.defaultCircle, dojox/gfx.defaultLine, or dojox/gfx.defaultImage)

  • getTransform:

    Returns the current transformation matrix applied to this Shape or null

  • getFill:

    Returns the current fill object or null (see dojox/gfx.defaultLinearGradient, dojox/gfx.defaultRadialGradient, dojox/gfx.defaultPattern, or dojo/Color)

  • getStroke:

    Returns the current stroke object or null (see dojox/gfx.defaultStroke)

  • getParent:

    Returns the parent Shape, Group or null if this Shape is unparented. (see dojox/gfx/shape.Surface, or dojox/gfx.Group)

  • getBoundingBox:

    Returns the bounding box Rectangle for this shape.

  • getTransformedBoundingBox:

    returns an array of four points or null four points represent four corners of the untransformed bounding box

  • getEventSource:

    returns a Node, which is used as a source of events for this shape

  • setClip:

    sets the clipping area of this shape.

  • getClip
  • setShape:

    sets a shape object (the default implementation simply ignores it)

  • setFill:

    sets a fill object (the default implementation simply ignores it)

  • setStroke:

    sets a stroke object (the default implementation simply ignores it)

  • setTransform:

    sets a transformation matrix

  • _applyTransform:

    physically sets a matrix

  • moveToFront:

    moves a shape to front of its parent's list of shapes

  • moveToBack:

    moves a shape to back of its parent's list of shapes

  • _moveToFront:

    renderer-specific hook, see dojox/gfx/shape.Shape.moveToFront()

  • _moveToBack:

    renderer-specific hook, see dojox/gfx/shape.Shape.moveToFront()

  • applyRightTransform:

    multiplies the existing matrix with an argument on right side (this.matrix * matrix)

  • applyLeftTransform:

    multiplies the existing matrix with an argument on left side (matrix * this.matrix)

  • applyTransform:

    a shortcut for dojox/gfx/shape.Shape.applyRightTransform

  • removeShape:

    removes the shape from its parent's list of shapes

  • _setParent:

    sets a parent

  • _updateParentMatrix:

    updates the parent matrix with new matrix

  • _getRealMatrix:

    returns the cumulative ('real') transformation matrix by combining the shape's matrix with its parent's matrix

  • on:

    Connects an event to this shape.

  • connect:

    connects a handler to an event on this shape

  • disconnect:

    connects a handler by token from an event on this shape

  • _init
  • openBatch:

    starts a new batch, subsequent new child shapes will be held in the batch instead of appending to the container directly.

  • closeBatch:

    submits the current batch, append all pending child shapes to DOM

  • add:

    adds a shape to the list

  • remove:

    removes a shape from the list

  • clear:

    removes all shapes from a group/surface.

  • _moveChildToFront:

    moves a shape to front of the list of shapes

  • _moveChildToBack:

    moves a shape to back of the list of shapes

  • createShape:

    creates a shape object based on its type; it is meant to be used by group-like objects

  • createGroup:

    creates a group shape

  • createRect:

    creates a rectangle shape

  • createEllipse:

    creates an ellipse shape

  • createCircle:

    creates a circle shape

  • createLine:

    creates a line shape

  • createPolyline:

    creates a polyline/polygon shape

  • createImage:

    creates a image shape

  • createText:

    creates a text shape

  • createPath:

    creates a path shape

  • createTextPath:

    creates a text shape

  • createObject:

    creates an instance of the passed shapeType class

  • textDir (String):

    Will be used for inheritance, or as default for text objects that textDir wasn't directly specified for them but the bidi support was required.

  • setTextDir:

    Used for propagation and change of textDir. newTextDir will be forced as textDir for all of it's children (Group/Text/TextPath).

  • getTextDir

Events

onMapResize()

Called when map is resized.

Error in the documentation? Can’t find what you are looking for? Let us know!