Click or drag to resize

ShapeLayerAddShape Method

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Adds a new shape entity to the layer.

Namespace:  Telogis.GeoBase.ShapeUI
Assembly:  geobase.net (in geobase.net.dll) Version: 4.98.0.0
Syntax
public void AddShape(
	ShapeEntity entity
)

Parameters

entity
Type: Telogis.GeoBase.ShapeUIShapeEntity
The entity to add to the layer.
Examples
C#
public MyForm() {
// create new shapelayer
myLayer = new MyShapeLayer(mapMain);
// create polygon
Telogis.GeoBase.Geometry.Polygon myPol = new Telogis.GeoBase.Geometry.Polygon(
    new Telogis.GeoBase.Geometry.LineString[] {
    new Telogis.GeoBase.Geometry.LineString(
        new LatLon(33.632714, -117.816371),
        new LatLon(33.631749, -117.816903),
        new LatLon(33.631190, -117.815253),
        new LatLon(33.632504, -117.814716),
        new LatLon(33.632714, -117.816371)
        )
    }
);
// create polygon entity
PolygonEntity PolyEntity = new PolygonEntity(myLayer, myPol);
// Add the entity to the layer
myLayer.AddShape(PolyEntity);
See Also