Click or drag to resize

ShapeCanvas Class

Canvas displaying shape elements on a map.

See the Shape Layer Concept topic for an example.

Inheritance Hierarchy

Namespace:  Ptv.XServer.Controls.Map.Layers.Shapes
Assembly:  Ptv.XServer.Controls.Map (in Ptv.XServer.Controls.Map.dll) Version: 1.7.10.0
Syntax
public class ShapeCanvas : WorldCanvas

The ShapeCanvas type exposes the following members.

Constructors
  NameDescription
Public methodShapeCanvas
Initializes a new instance of the ShapeCanvas class
Top
Properties
  NameDescription
Public propertyCanvasCategory
Gets or sets the CanvasCategory of the canvas. The canvas category defines the z order of the canvas in the map.
(Inherited from MapCanvas.)
Public propertyMapView
Gets the parent map instance.
(Inherited from MapCanvas.)
Top
Methods
  NameDescription
Protected methodBeforeUpdate
Callback to precede the updating of the map content.
(Inherited from WorldCanvas.)
Public methodCanvasToGeo
Converts a canvas point to a geographic point.
(Inherited from MapCanvas.)
Public methodCanvasToPtvMercator
This method implements a transformation from canvas coordinates to logical coordinates.
(Inherited from WorldCanvas.)
Public methodDispose
Disposes the map canvas. During disposal the children of the canvas are removed and the viewport changed events are disconnected.
(Overrides MapCanvasDispose.)
Public methodGeoToCanvas(Point)
Converts a geographic point to a canvas point.
(Inherited from MapCanvas.)
Public methodGeoToCanvas(Point, String)
Converts a geographic point to a canvas coordinate.
(Inherited from MapCanvas.)
Public methodStatic memberGetAnchor
Retrieves the Anchor of a certain shape element.
Public methodStatic memberGetLocation
Retrieves the location of a certain shape element.
Public methodStatic memberGetScale
Retrieves the scale factor of a certain shape element.
Public methodStatic memberGetScaleFactor
Retrieves the scale factor of a certain shape element.
Public methodInitializeTransform
Initializes the transformation instance which is needed to transform coordinates from one format to another one.
(Inherited from WorldCanvas.)
Protected methodNeedsUpdate
Check if an update of a shape object is necessary, according to the lazy mode or update mode.
Public methodPtvMercatorToCanvas
This method implements a transformation from logical coordinates to canvas coordinates.
(Inherited from WorldCanvas.)
Public methodReceiveWeakEvent
Receives events from the centralized event manager.
(Inherited from MapCanvas.)
Public methodStatic memberSetAnchor
Sets the anchor of a certain shape element.
Public methodStatic memberSetLocation
Sets the location of a certain shape element.
Public methodStatic memberSetScale
Sets the scale factor of a certain shape element.
Public methodStatic memberSetScaleFactor
Sets the scale factor of a certain shape element.
Public methodUpdate
Updates the map content. The map content consists of all elements of the canvas. This method is for example triggered when the viewport changes.
(Overrides MapCanvasUpdate(UpdateMode).)
Public methodUpdateScale
Updates the scale of a certain shape element.
Public methodUpdateScales
Updates the scale of a whole set of shape elements. All shape elements which are currently visible on the displayed map section are updated.
Top
Fields
  NameDescription
Public fieldStatic memberAnchorProperty
Anchor of a shape element.
Public fieldStatic memberLocationProperty
Location of a shape element.
Public fieldStatic memberScaleFactorProperty
The ScaleFactor element defines the dependency between map scale and the size of map objects. A scale factor of 0 indicates a constant object size. The size of the map object is the size in pixel, without regarding the zoom factor. A scale factor of 1 indicates an object size in coordinate units. The object will be enlarged if the map is zoomed. It is also possible to choose a value between 0 and 1. According to that value, a nonlinear enlargement will be used.
Public fieldStatic memberScaleProperty
The Scale element defines the dependency between map scale and the size of map objects. An LSF of 0 indicates a constant object size. The size of the map object is the size in pixel, without regarding the zoom factor. An LSF of 1 indicates an object size in units. The object will be enlarged if the map is zoomed. It’s also possible to choose a value between 0 and 1. According to that value, a nonlinear enlargement will be used.
Public fieldtransform
Transformation method which transforms the shape points from one coordinate format to another depending on the given spatial reference system.
Top
Attached Properties
  NameDescription
Public attached propertyAnchor
Anchor of a shape element.
Public attached propertyLocation
Location of a shape element.
Public attached propertyScale
The Scale element defines the dependency between map scale and the size of map objects. An LSF of 0 indicates a constant object size. The size of the map object is the size in pixel, without regarding the zoom factor. An LSF of 1 indicates an object size in units. The object will be enlarged if the map is zoomed. It’s also possible to choose a value between 0 and 1. According to that value, a nonlinear enlargement will be used.
Public attached propertyScaleFactor
The ScaleFactor element defines the dependency between map scale and the size of map objects. A scale factor of 0 indicates a constant object size. The size of the map object is the size in pixel, without regarding the zoom factor. A scale factor of 1 indicates an object size in coordinate units. The object will be enlarged if the map is zoomed. It is also possible to choose a value between 0 and 1. According to that value, a nonlinear enlargement will be used.
Top
Extension Methods
  NameDescription
Public Extension MethodFindRelativeT
Finds an object of type T for a framework element which is somewhere in the visual tree.
(Defined by MapElementExtensions.)
Public Extension MethodToJson
Converts an object to a JSON string representation.
(Defined by JSONWriter.)
Top
See Also