A Feature encapsulating a geometry.
This Feature renders a geometry such as a Point or LineString geometry. This Feature is responsible for reprojecting the geometry before creating a gfx shape to display it. By default the shape created is a circle for a Point geometry and a polyline for a LineString geometry. User can change these behavior by overriding the createShape method to create the desired shape.
Parameter | Type | Description |
---|---|---|
geometry | dojox/geo/openlayers/Geometry | The geometry to render. |
See the dojox/geo/openlayers/GeometryFeature reference documentation for more information.
var geom = new dojox.geo.openlayers.Point({x:0, y:0}); var gf = new dojox.geo.openlayers.GeometryFeature(geom);
Apply the style on the geometry's shape recursively.
Parameter | Type | Description |
---|---|---|
g | dojox/geo/openlayers/Geometry | The geometry. |
stroke | Object | The stroke |
fill | Object | The fill |
Apply the style on the geometry's shape.
Parameter | Type | Description |
---|---|---|
g | Geometry | The geometry. |
Create collection shape and add it to the viewport.
Parameter | Type | Description |
---|---|---|
g | dojox/geo/openlayers/Geometry |
Create polyline shape and add it to the viewport.
Parameter | Type | Description |
---|---|---|
g | dojox/geo/openlayers/Geometry |
Create a point shape
Parameter | Type | Description |
---|---|---|
g | dojox/geo/openlayer/Geometry |
Get the collection shape, create it if necessary
Parameter | Type | Description |
---|---|---|
g | dojox/geo/openlayers/Geometry |
Get the line string geometry shape, create it if necessary
Parameter | Type | Description |
---|---|---|
g | dojox/geo/openlayers/Geometry |
From projected coordinates to screen coordinates
Parameter | Type | Description |
---|---|---|
p | Object | Object with x and y fields |
get the point geometry shape, create it if necessary
Parameter | Type | Description |
---|---|---|
g | dojox/geo/openlayers/Geometry |
Sets the layer to which this Feature belongs
Called when the feature is added to the Layer.
Parameter | Type | Description |
---|---|---|
l | dojox/geo/openlayers/Layer |
Called when the shape rendering the geometry has to be created. This default implementation creates a circle for a point geometry, a polyline for a LineString geometry and is recursively called when creating a collection. User may replace this method to produce a custom shape.
Parameter | Type | Description |
---|---|---|
s | dojox/gfx/Surface | The surface on which the method create the shapes. |
g | dojox/geo/openlayers/Geometry |
Optional The reference geometry |
The resulting shape.
Returns the coordinate system in which coordinates of this feature are expressed.
The coordinate system in which coordinates of this feature are expressed.
Returns the fill style
The fill style
Returns the Layer to which this feature belongs.
The layer to which this feature belongs.
Returns the shape rendering the geometry
The shape used to render the geometry.
Returns the shape properties.
The shape properties.
Returns the stroke style
The stroke style
Removes the shape from the Surface. Called when the feature is removed from the layer.
Render a geometry. Called by the Layer on which the feature is added.
Parameter | Type | Description |
---|---|---|
g | dojox/geo/openlayer/Geometry |
Optional The geometry to draw |
Renders a geometry collection.
Parameter | Type | Description |
---|---|---|
g | dojox/geo/openlayers/Geometry |
Optional The geometry to render. |
Renders a line string geometry.
Parameter | Type | Description |
---|---|---|
g | dojox/geo/openlayers/Geometry |
Optional The geometry to render. |
Renders a point geometry.
Parameter | Type | Description |
---|---|---|
g | dojox/geo/openlayers/Point |
Optional The geometry to render, or the current instance geometry if not specified. |
Set the coordinate system in which coordinates of this feature are expressed.
Parameter | Type | Description |
---|---|---|
cs | OpenLayers.Projection | The coordinate system in which coordinates of this feature are expressed. |
Set the fill style to be applied on the rendered shape.
Parameter | Type | Description |
---|---|---|
f | Object | The fill style |
Set the fill style to be applied on the rendered shape.
Sets the shape properties.
Parameter | Type | Description |
---|---|---|
s | Object | The shape properties to set. |
Sets the shape properties.
Set the stroke style to be applied on the rendered shape.
Parameter | Type | Description |
---|---|---|
s | Object | The stroke style |
Set the stroke style to be applied on the rendered shape.