User Tools

Site Tools


thinkgeo.mapsuite.windowsphonecore.edittools

ThinkGeo.MapSuite.WindowsPhoneCore.EditTools

Note: The page was created before Map Suite 10. Map Suite 10.0 organized many classes into new namespaces and assemblies as well as had a few minor breaks in compatibility. The majority of previously built code should work without modification assuming the new namespaces are added. For guidance on upgrading your existing code, please check out MapSuite 10 Upgrade Guide.

<!– Class –> This class is a wrapper class for the FeatureLayer that isolates only the editing methods to make them easily accessible to the programmer.

Remarks

This class is a wrapper class for the FeatureLayer that isolates only the editing methods to make them easily accessible to the programmer.

Inheritance Hierarchy

Members Summary

Public Constructors

Name Parameters DeclaringType Summary
Public MethodEditTools FeatureSource This is a constructor for the class.

Protected Constructors

Name Parameters DeclaringType Summary
Protected MethodEditTools This is a constructor for the class.

Public Methods

Name Parameters DeclaringType Summary
Public MethodAdd Feature This method adds a new Feature to an existing transaction.
Public MethodAdd BaseShape This method adds a new Feature to an existing transaction.
Public MethodAdd BaseShape, Dictionary<String, String> This overload allows you pass in a Feature.
Public MethodBeginTransaction This method starts a new transaction if the FeatureLayer allows editing.
Public MethodCommitTransaction This method will commit the existing transaction to its underlying source of data.
Public MethodDelete String This method deletes a Feature from an existing transaction.
Public MethodEquals Object Object
Public MethodGetDifference String, AreaBaseShape This method returns the difference between two shapes, which are defined as the set of all points that lie in the Feature but not in the targetShape.
Public MethodGetDifference String, Feature This method returns the difference between two features, which are defined as the set of all points which lie in the Feature but not in the targetFeature.
Public MethodGetHashCode Object
Public MethodGetType Object
Public MethodRollbackTransaction This method will cancel an existing transaction. It will free up the internal memory cache of any InternalFeatures added, updated or deleted.
Public MethodRotate String, PointShape, Single This method rotates the Feature any number of degrees based on a pivot point.
Public MethodScaleDown String, Double This method decreases the size of the feature by the percentage given in the percentage parameter.
Public MethodScaleUp String, Double This method increases the size of the feature by the percentage given in the percentage parameter.
Public MethodToString Object
Public MethodTranslateByDegree String, Double, Double, GeographyUnit, DistanceUnit This method moves the Feature from one location to another based on a distance and a direction in degrees.
Public MethodTranslateByOffset String, Double, Double, GeographyUnit, DistanceUnit This method moves the Feature from one location to another based on a X and Y offset distance.
Public MethodUnion String, AreaBaseShape This method returns the union of the Feature and the target shapes, which are defined as the set of all points in the Feature or the target shape.
Public MethodUnion String, Feature This method returns the union of the Feature and the target features, which are defined as the set of all points in the Feature or the target shape.
Public MethodUpdate BaseShape This method updates a Feature in an existing transaction.
Public MethodUpdate Feature This method updates a Feature in an existing transaction.
Public MethodUpdate BaseShape, Dictionary<String, String> This method updates a Feature in an existing transaction.

Protected Methods

Name Parameters DeclaringType Summary
Protected MethodFinalize Object
Protected MethodMemberwiseClone Object

Public Properties

Name Return DeclaringType Summary
Public PropertyIsEditable Boolean This property returns whether the FeatureLayer allows edits or is read only.
Public PropertyIsInTransaction Boolean This property returns true if the FeatureLayer is in a transaction and false if it is not.
Public PropertyIsTransactionLive Boolean This property returns true if the features currently modified in a transaction are expected to reflect their state when calling other methods on the FeatureLayer, such as spatial queries.
Public PropertyTransactionBuffer TransactionBuffer This property allows you get and set the transaction buffer.

Protected Properties

Name Return DeclaringType Summary

Public Events

Name Event Arguments DeclaringType Summary

Public Constructors

EditTools(FeatureSource)

This is a constructor for the class.

Overloads

This constructor allows you to pass in the FeatureSource.

Parameters

Name Type Description
featureSource FeatureSource<!– ThinkGeo.MapSuite.WindowsPhoneCore.FeatureSource –> This parameter is the FeatureSource that the edit operations will pass through to.

Go Back

Protected Constructors

EditTools()

This is a constructor for the class.

Overloads

This is the default constructor. It is protected and not meant to be used.

Remarks

This is the default constructor. It is protected and not meant to be used.

Parameters

Name Type Description

Go Back

Public Methods

Add(Feature)

This method adds a new Feature to an existing transaction.

Overloads

This overload allows you pass in a Feature.

Remarks

This method adds a new Feature to an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction.

The Transaction System

The transaction system of a FeatureLayer sits on top of the inherited implementation of any specific source, such as Oracle Spatial or Shape files. In this way, it functions the same way for every FeatureLayer. You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the feature are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific FeatureLayer is responsible for integrating your changes into the underlying FeatureLayer. By default the IsLiveTransaction property is set to false, which means that until you commit the changes, the FeatureLayer API will not reflect any changes that are in the temporary editing buffer.

In the case where the IsLiveTransaction is set to true, then things function slightly differently. The live transaction concept means that all of the modifications you perform during a transaction are live from the standpoint of the querying methods on the object.

As an example, imagine that you have a FeatureLayer that has 10 records in it. Next, you begin a transaction and then call GetAllFeatures. The result would be 10 records. After that, you call a delete on one of the records and call the GetAllFeatures again. This time you only get nine records, even though the transaction has not yet been committed. In the same sense, you could have added a new record or modified an existing one and those changes would be considered live, though not committed.

In the case where you modify records – such as expanding the size of a polygon – those changes are reflected as well. For example, you expand a polygon by doubling its size and then do a spatial query that would not normally return the smaller record, but instead would return the larger records. In this case, the larger records are returned. You can set this property to be false, as well; in which case, all of the spatially related methods would ignore anything that is currently in the transaction buffer waiting to be committed. In such a case, only after committing the transaction would the FeatureLayer reflect the changes.

Return Value

Return Type Description
String<!– System.String –> This string is the ID that will uniquely identify this Feature while it is in a transaction.

Parameters

Name Type Description
feature Feature<!– ThinkGeo.MapSuite.WindowsPhoneCore.Feature –> This parameter represents the new Feature that will be added to the transaction.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Add(BaseShape)

This method adds a new Feature to an existing transaction.

Overloads

This overload allows you to pass in a shape.

Remarks

This method adds a new Feature to an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction.

The Transaction System

The transaction system of a FeatureLayer sits on top of the inherited implementation of any specific source, such as Oracle Spatial or Shape files. In this way, it functions the same way for every FeatureLayer. You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the feature are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific FeatureLayer is responsible for integrating your changes into the underlying FeatureLayer. By default the IsLiveTransaction property is set to false, which means that until you commit the changes, the FeatureLayer API will not reflect any changes that are in the temporary editing buffer.

In the case where the IsLiveTransaction is set to true, then things function slightly differently. The live transaction concept means that all of the modifications you perform during a transaction are live from the standpoint of the querying methods on the object.

As an example, imagine that you have a FeatureLayer that has 10 records in it. Next, you begin a transaction and then call GetAllFeatures. The result would be 10 records. After that, you call a delete on one of the records and call the GetAllFeatures again. This time you only get nine records, even though the transaction has not yet been committed. In the same sense, you could have added a new record or modified an existing one and those changes would be considered live, though not committed.

In the case where you modify records – such as expanding the size of a polygon – those changes are reflected as well. For example, you expand a polygon by doubling its size and then do a spatial query that would not normally return the smaller record, but instead would return the larger records. In this case, the larger records are returned. You can set this property to be false, as well; in which case, all of the spatially related methods would ignore anything that is currently in the transaction buffer waiting to be committed. In such a case, only after committing the transaction would the FeatureLayer reflect the changes.

Return Value

Return Type Description
String<!– System.String –> This string is the ID that will uniquely identify this Feature while it is in a transaction.

Parameters

Name Type Description
shape BaseShape<!– ThinkGeo.MapSuite.WindowsPhoneCore.BaseShape –> This parameter represents the new shape that will be added to the transaction.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Add(BaseShape, Dictionary<String, String>)

This overload allows you pass in a Feature.

Overloads

This overload allows you pass in a Feature.

Remarks

This method adds a new Feature to an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction.

The Transaction System

The transaction system of a FeatureLayer sits on top of the inherited implementation of any specific source, such as Oracle Spatial or Shape files. In this way, it functions the same way for every FeatureLayer. You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the feature are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific FeatureLayer is responsible for integrating your changes into the underlying FeatureLayer. By default the IsLiveTransaction property is set to false, which means that until you commit the changes, the FeatureLayer API will not reflect any changes that are in the temporary editing buffer.

In the case where the IsLiveTransaction is set to true, then things function slightly differently. The live transaction concept means that all of the modifications you perform during a transaction are live from the standpoint of the querying methods on the object.

As an example, imagine that you have a FeatureLayer that has 10 records in it. Next, you begin a transaction and then call GetAllFeatures. The result would be 10 records. After that, you call a delete on one of the records and call the GetAllFeatures again. This time you only get nine records, even though the transaction has not yet been committed. In the same sense, you could have added a new record or modified an existing one and those changes would be considered live, though not committed.

In the case where you modify records – such as expanding the size of a polygon – those changes are reflected as well. For example, you expand a polygon by doubling its size and then do a spatial query that would not normally return the smaller record, but instead would return the larger records. In this case, the larger records are returned. You can set this property to be false, as well; in which case, all of the spatially related methods would ignore anything that is currently in the transaction buffer waiting to be committed. In such a case, only after committing the transaction would the FeatureLayer reflect the changes.

Return Value

Return Type Description
String<!– System.String –> This string is the ID that will uniquely identify this BaseShape while it is in a transaction.

Parameters

Name Type Description
shape BaseShape<!– ThinkGeo.MapSuite.WindowsPhoneCore.BaseShape –> This parameter represents the new BaseShape that will be added to the transaction.
columnValues Dictionary<String,String><!– System.Collections.Generic.Dictionary{System.String,System.String} –> This parameter represents DBF information of the new BaseShape.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

BeginTransaction()

This method starts a new transaction if the FeatureLayer allows editing.

Remarks

This method is used to start a transaction, assuming that the FeatureLayer allows editing. There are some additional prerequisites to beginning a transaction, such as ensuring that a transaction is not already in progress. You must also be sure that the FeatureSource has been opened.

The Transaction System

The transaction system of a FeatureLayer sits on top of the inherited implementation of any specific source, such as Oracle Spatial or Shape files. In this way, it functions the same way for every FeatureLayer. You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the feature are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific FeatureLayer is responsible for integrating your changes into the underlying FeatureLayer. By default the IsLiveTransaction property is set to false, which means that until you commit the changes, the FeatureLayer API will not reflect any changes that are in the temporary editing buffer.

In the case where the IsLiveTransaction is set to true, then things function slightly differently. The live transaction concept means that all of the modifications you perform during a transaction are live from the standpoint of the querying methods on the object.

As an example, imagine that you have a FeatureLayer that has 10 records in it. Next, you begin a transaction and then call GetAllFeatures. The result would be 10 records. After that, you call a delete on one of the records and call the GetAllFeatures again. This time you only get nine records, even though the transaction has not yet been committed. In the same sense, you could have added a new record or modified an existing one and those changes would be considered live, though not committed.

In the case where you modify records – such as expanding the size of a polygon – those changes are reflected as well. For example, you expand a polygon by doubling its size and then do a spatial query that would not normally return the smaller record, but instead would return the larger records. In this case, the larger records are returned. You can set this property to be false, as well; in which case, all of the spatially related methods would ignore anything that is currently in the transaction buffer waiting to be committed. In such a case, only after committing the transaction would the FeatureLayer reflect the changes.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

CommitTransaction()

This method will commit the existing transaction to its underlying source of data.

Remarks

This method will commit the existing transaction to its underlying source of data. It will then pass back the results of the commit, including any error(s) received. Finally, it will free up the internal memory cache of any InternalFeatures added, updated or deleted. You will need to ensure that you have started a transaction by calling BeginTransaction.

The Transaction System

The transaction system of a FeatureLayer sits on top of the inherited implementation of any specific source, such as Oracle Spatial or Shape files. In this way, it functions the same way for every FeatureLayer. You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the feature are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific FeatureLayer is responsible for integrating your changes into the underlying FeatureLayer. By default the IsLiveTransaction property is set to false, which means that until you commit the changes, the FeatureLayer API will not reflect any changes that are in the temporary editing buffer.

In the case where the IsLiveTransaction is set to true, then things function slightly differently. The live transaction concept means that all of the modifications you perform during a transaction are live from the standpoint of the querying methods on the object.

As an example, imagine that you have a FeatureLayer that has 10 records in it. Next, you begin a transaction and then call GetAllFeatures. The result would be 10 records. After that, you call a delete on one of the records and call the GetAllFeatures again. This time you only get nine records, even though the transaction has not yet been committed. In the same sense, you could have added a new record or modified an existing one and those changes would be considered live, though not committed.

In the case where you modify records – such as expanding the size of a polygon – those changes are reflected as well. For example, you expand a polygon by doubling its size and then do a spatial query that would not normally return the smaller record, but instead would return the larger records. In this case, the larger records are returned. You can set this property to be false, as well; in which case, all of the spatially related methods would ignore anything that is currently in the transaction buffer waiting to be committed. In such a case, only after committing the transaction would the FeatureLayer reflect the changes.

Return Value

Return Type Description
TransactionResult<!– ThinkGeo.MapSuite.WindowsPhoneCore.TransactionResult –> The returned decimalDegreesValue of this method is a TransactionResult class, which gives you the status of the transaction you just committed. It includes how many of the updates, adds, and deletes were successful and any errors that were encountered during the committing of the transaction.

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Delete(String)

This method deletes a Feature from an existing transaction.

Remarks

This method deletes a Feature from an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction.

The Transaction System

The transaction system of a FeatureLayer sits on top of the inherited implementation of any specific source, such as Oracle Spatial or Shape files. In this way, it functions the same way for every FeatureLayer. You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the feature are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific FeatureLayer is responsible for integrating your changes into the underlying FeatureLayer. By default the IsLiveTransaction property is set to false, which means that until you commit the changes, the FeatureLayer API will not reflect any changes that are in the temporary editing buffer.

In the case where the IsLiveTransaction is set to true, then things function slightly differently. The live transaction concept means that all of the modifications you perform during a transaction are live from the standpoint of the querying methods on the object.

As an example, imagine that you have a FeatureLayer that has 10 records in it. Next, you begin a transaction and then call GetAllFeatures. The result would be 10 records. After that, you call a delete on one of the records and call the GetAllFeatures again. This time you only get nine records, even though the transaction has not yet been committed. In the same sense, you could have added a new record or modified an existing one and those changes would be considered live, though not committed.

In the case where you modify records – such as expanding the size of a polygon – those changes are reflected as well. For example, you expand a polygon by doubling its size and then do a spatial query that would not normally return the smaller record, but instead would return the larger records. In this case, the larger records are returned. You can set this property to be false, as well; in which case, all of the spatially related methods would ignore anything that is currently in the transaction buffer waiting to be committed. In such a case, only after committing the transaction would the FeatureLayer reflect the changes.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
id String<!– System.String –> This string is the Id of the feature in the FeatureLayer that you wish to delete.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Equals(Object)

Return Value

Return Type Description
Boolean<!– System.Boolean –>

Parameters

Name Type Description
obj Object<!– System.Object –>

<!– System.Object –> Go Back

GetDifference(String, AreaBaseShape)

This method returns the difference between two shapes, which are defined as the set of all points that lie in the Feature but not in the targetShape.

Remarks

This method is a helpful function that allows you to easily edit InternalFeatures directly in the FeatureSource without having to retrieve them, convert them to a shape, manipulate them and put them back into the FeatureSource.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
featureId String<!– System.String –> This is the Feature you want to remove area from.
targetShape AreaBaseShape<!– ThinkGeo.MapSuite.WindowsPhoneCore.AreaBaseShape –> The shape you are trying to find the difference with.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

GetDifference(String, Feature)

This method returns the difference between two features, which are defined as the set of all points which lie in the Feature but not in the targetFeature.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
featureId String<!– System.String –> This is the Feature you want to remove area from.
targetAreaFeature Feature<!– ThinkGeo.MapSuite.WindowsPhoneCore.Feature –> The feature you are trying to find the difference with.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

GetHashCode()

Return Value

Return Type Description
Int32<!– System.Int32 –>

Parameters

Name Type Description

<!– System.Object –> Go Back

GetType()

Return Value

Return Type Description
Type<!– System.Type –>

Parameters

Name Type Description

<!– System.Object –> Go Back

RollbackTransaction()

This method will cancel an existing transaction. It will free up the internal memory cache of any InternalFeatures added, updated or deleted.

Remarks

This method will cancel an existing transaction. It will free up the internal memory cache of any InternalFeatures added, updated or deleted. You will need to ensure that you have started a transaction by calling BeginTransaction.

The Transaction System

The transaction system of a FeatureLayer sits on top of the inherited implementation of any specific source, such as Oracle Spatial or Shape files. In this way, it functions the same way for every FeatureLayer. You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the feature are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific FeatureLayer is responsible for integrating your changes into the underlying FeatureLayer. By default the IsLiveTransaction property is set to false, which means that until you commit the changes, the FeatureLayer API will not reflect any changes that are in the temporary editing buffer.

In the case where the IsLiveTransaction is set to true, then things function slightly differently. The live transaction concept means that all of the modifications you perform during a transaction are live from the standpoint of the querying methods on the object.

As an example, imagine that you have a FeatureLayer that has 10 records in it. Next, you begin a transaction and then call GetAllFeatures. The result would be 10 records. After that, you call a delete on one of the records and call the GetAllFeatures again. This time you only get nine records, even though the transaction has not yet been committed. In the same sense, you could have added a new record or modified an existing one and those changes would be considered live, though not committed.

In the case where you modify records – such as expanding the size of a polygon – those changes are reflected as well. For example, you expand a polygon by doubling its size and then do a spatial query that would not normally return the smaller record, but instead would return the larger records. In this case, the larger records are returned. You can set this property to be false, as well; in which case, all of the spatially related methods would ignore anything that is currently in the transaction buffer waiting to be committed. In such a case, only after committing the transaction would the FeatureLayer reflect the changes.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Rotate(String, PointShape, Single)

This method rotates the Feature any number of degrees based on a pivot point.

Remarks

This method is a helpful function that allows you to easily edit InternalFeatures directly in the FeatureSource without having to retrieve them, convert them to a shape, manipulate them and put them back into the FeatureSource.

This method rotates the Feature based on a pivot point by a number of degrees. By placing the pivot point in the center of the Feature, you can achieve in-place rotation. By moving the pivot point outside of the center of the Feature, you can translate the shape in a circular motion. Moving the pivot point further outside of the center will make the circular area larger.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
featureId String<!– System.String –> This parameter is the Feature you want to rotate.
pivotPoint PointShape<!– ThinkGeo.MapSuite.WindowsPhoneCore.PointShape –> The pivotPoint represents the center of rotation.
degreeAngle Single<!– System.Single –> The number of degrees of rotation, from 0 to 360.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

ScaleDown(String, Double)

This method decreases the size of the feature by the percentage given in the percentage parameter.

Remarks

This method is a helpful function that allows you to easily edit InternalFeatures directly in the FeatureSource without having to retrieve them, convert them to a shape, manipulate them and put them back into the FeatureSource.

This method is useful when you would like to decrease the size of the Feature. Note that a larger percentage will scale the shape down faster as you apply the operation multiple times. There is also a ScaleUp method that will expand the shape as well.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
featureId String<!– System.String –> This parameter is the Id of the Feature you want to scale.
percentage Double<!– System.Double –> This is the percentage by which to decrease the Feature's size.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

ScaleUp(String, Double)

This method increases the size of the feature by the percentage given in the percentage parameter.

Remarks

This method is a helpful function that allows you to easily edit InternalFeatures directly in the FeatureSource without having to retrieve them, convert them to a shape, manipulate them and put them back into the FeatureSource.

This method is useful when you would like to increase the size of the Feature. Note that a larger percentage will scale the shape up faster as you apply the operation multiple times. There is also a ScaleDown method that will shrink the shape as well.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
featureId String<!– System.String –> This parameter is the Id of the Feature you want to scale.
percentage Double<!– System.Double –> This is the percentage by which to increase the Feature's size.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

ToString()

Return Value

Return Type Description
String<!– System.String –>

Parameters

Name Type Description

<!– System.Object –> Go Back

TranslateByDegree(String, Double, Double, GeographyUnit, DistanceUnit)

This method moves the Feature from one location to another based on a distance and a direction in degrees.

Overloads

In this overload, the distance unit is based on a DistanceUnit you specify in the distanceUnit parameter, regardless of the shape's GeographicUnit.

Remarks

This method is a helpful function that allows you to easily edit InternalFeatures directly in the FeatureSource without having to retrieve them, convert them to a shape, manipulate them and put them back into the FeatureSource.

This method moves the Feature from one location to another based on angleInDegrees and the distance parameter. With this overload, it is important to note that the distance units are based on the specified distanceUnit parameter. For example, if your Feature is in decimal degrees and you call this method with a specified distanceUnit of miles, you're going to move this shape a number of miles based on the distance and angleInDegrees. In this way, you could easily move a shape in decimal degrees five miles to the north.

If you pass a distance of 0, the operation is ignored.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
featureId String<!– System.String –> This parameter is the Feature you want to move.
distance Double<!– System.Double –> The distance is the number of units to move the shape using the angle specified. The distance unit will be the DistanceUnit specified in the distanceUnit parameter. The distance must be greater than or equal to 0.
angleInDegrees Double<!– System.Double –> A number between 0 and 360 degrees that represents the direction you wish to move the shape, with zero being up.
shapeUnit GeographyUnit<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeographyUnit –> This is the GeographicUnit of the shape you are performing the operation on.
distanceUnit DistanceUnit<!– ThinkGeo.MapSuite.WindowsPhoneCore.DistanceUnit –> This is the DistanceUnit you would like to use as the measure of the translate. For example, if you select miles as your distanceUnit, then the distance will be calculated in miles.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

TranslateByOffset(String, Double, Double, GeographyUnit, DistanceUnit)

This method moves the Feature from one location to another based on a X and Y offset distance.

Overloads

In this overload, the X and Y offset are based on a DistanceUnit you specify, regardless of the shape's GeographicUnit.

Remarks

This method is a helpful function that allows you to easily edit InternalFeatures directly in the FeatureSource without having to retrieve them, convert them to a shape, manipulate them and put them back into the FeatureSource.

This method moves the Feature from one location to another based on an X and Y offset distance. With this overload, it is important to note that the distance units are based on the specified distanceUnit parameter. For example, if your Feature is in decimal degrees and you call this method with an X offset of 1 and a Y offset of 1, you're going to move this Feature one unit of the distanceUnit in the horizontal direction and one unit of the distanceUnit in the vertical direction. In this way, you could easily move a Feature in decimal degrees five miles on the X axis and 3 miles on the Y axis.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
featureId String<!– System.String –> This parameter is the Feature you want to move.
xOffset Double<!– System.Double –> This is the number of horizontal units of movement in the DistanceUnit specified in the distanceUnit parameter.
yOffset Double<!– System.Double –> This is the number of horizontal units of movement in the DistanceUnit specified in the distanceUnit parameter.
shapeUnit GeographyUnit<!– ThinkGeo.MapSuite.WindowsPhoneCore.GeographyUnit –> This is the GeographicUnit of the shape you are performing the operation on.
offsetUnit DistanceUnit<!– ThinkGeo.MapSuite.WindowsPhoneCore.DistanceUnit –> This is the DistanceUnit you would like to use as the measure of the translate. For example, if you select miles as your distanceUnit, then the xOffsetDistance and yOffsetDistance will be calculated in miles.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Union(String, AreaBaseShape)

This method returns the union of the Feature and the target shapes, which are defined as the set of all points in the Feature or the target shape.

Overloads

This overload allows you pass in an AreaBaseShape.

Remarks

This method is a helpful function that allows you to easily edit InternalFeatures directly in the FeatureSource without having to retrieve them, convert them to a shape, manipulate them and put them back into the FeatureSource.

This is useful for adding area shapes together to form a larger area shape.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
featureId String<!– System.String –> This parameter is the Feature you want to add the new area to.
targetShape AreaBaseShape<!– ThinkGeo.MapSuite.WindowsPhoneCore.AreaBaseShape –> The shape you are trying to find the union with.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Union(String, Feature)

This method returns the union of the Feature and the target features, which are defined as the set of all points in the Feature or the target shape.

Overloads

This overload allows you pass in a Feature.

Remarks

This method is a helpful function that allows you to easily edit InternalFeatures directly in the FeatureSource without having to retrieve them, convert them to a shape, manipulate them and put them back into the FeatureSource.

This is useful for adding area shapes together to form a larger area shape.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
featureId String<!– System.String –> This parameter is the Feature you want to add the new area to.
targetAreaFeature Feature<!– ThinkGeo.MapSuite.WindowsPhoneCore.Feature –> The feature you are trying to find the union with.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Update(BaseShape)

This method updates a Feature in an existing transaction.

Overloads

This overload allows you to pass in a shape and the Id to the Feature it will update.

Remarks

This method updates a Feature in an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction.

The Transaction System

The transaction system of a FeatureLayer sits on top of the inherited implementation of any specific source, such as Oracle Spatial or Shape files. In this way, it functions the same way for every FeatureLayer. You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the feature are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific FeatureLayer is responsible for integrating your changes into the underlying FeatureLayer. By default the IsLiveTransaction property is set to false, which means that until you commit the changes, the FeatureLayer API will not reflect any changes that are in the temporary editing buffer.

In the case where the IsLiveTransaction is set to true, then things function slightly differently. The live transaction concept means that all of the modifications you perform during a transaction are live from the standpoint of the querying methods on the object.

As an example, imagine that you have a FeatureLayer that has 10 records in it. Next, you begin a transaction and then call GetAllFeatures. The result would be 10 records. After that, you call a delete on one of the records and call the GetAllFeatures again. This time you only get nine records, even though the transaction has not yet been committed. In the same sense, you could have added a new record or modified an existing one and those changes would be considered live, though not committed.

In the case where you modify records – such as expanding the size of a polygon – those changes are reflected as well. For example, you expand a polygon by doubling its size and then do a spatial query that would not normally return the smaller record, but instead would return the larger records. In this case, the larger records are returned. You can set this property to be false, as well; in which case, all of the spatially related methods would ignore anything that is currently in the transaction buffer waiting to be committed. In such a case, only after committing the transaction would the FeatureLayer reflect the changes.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
shape BaseShape<!– ThinkGeo.MapSuite.WindowsPhoneCore.BaseShape –> The shape you wish to update in the transaction. The Id of the Shape should be the feature Id which you wish to update.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Update(Feature)

This method updates a Feature in an existing transaction.

Overloads

This overload allows you pass in a Feature.

Remarks

This method updates a Feature in an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction.

The Transaction System

The transaction system of a FeatureLayer sits on top of the inherited implementation of any specific source, such as Oracle Spatial or Shape files. In this way, it functions the same way for every FeatureLayer. You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the feature are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific FeatureLayer is responsible for integrating your changes into the underlying FeatureLayer. By default the IsLiveTransaction property is set to false, which means that until you commit the changes, the FeatureLayer API will not reflect any changes that are in the temporary editing buffer.

In the case where the IsLiveTransaction is set to true, then things function slightly differently. The live transaction concept means that all of the modifications you perform during a transaction are live from the standpoint of the querying methods on the object.

As an example, imagine that you have a FeatureLayer that has 10 records in it. Next, you begin a transaction and then call GetAllFeatures. The result would be 10 records. After that, you call a delete on one of the records and call the GetAllFeatures again. This time you only get nine records, even though the transaction has not yet been committed. In the same sense, you could have added a new record or modified an existing one and those changes would be considered live, though not committed.

In the case where you modify records – such as expanding the size of a polygon – those changes are reflected as well. For example, you expand a polygon by doubling its size and then do a spatial query that would not normally return the smaller record, but instead would return the larger records. In this case, the larger records are returned. You can set this property to be false, as well; in which case, all of the spatially related methods would ignore anything that is currently in the transaction buffer waiting to be committed. In such a case, only after committing the transaction would the FeatureLayer reflect the changes.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
feature Feature<!– ThinkGeo.MapSuite.WindowsPhoneCore.Feature –> The Feature you wish to update in the transaction.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Update(BaseShape, Dictionary<String, String>)

This method updates a Feature in an existing transaction.

Overloads

This overload allows you to pass in a shape and the columnValues to the Feature it will update.

Remarks

This method updates a Feature in an existing transaction. You will need to ensure that you have started a transaction by calling BeginTransaction.

The Transaction System

The transaction system of a FeatureLayer sits on top of the inherited implementation of any specific source, such as Oracle Spatial or Shape files. In this way, it functions the same way for every FeatureLayer. You start by calling BeginTransaction. This allocates a collection of in-memory change buffers that are used to store changes until you commit the transaction. So, for example, when you call the Add, Delete or Update method, the changes to the feature are stored in memory only. If for any reason you choose to abandon the transaction, you can call RollbackTransaction at any time and the in-memory buffer will be deleted and the changes will be lost. When you are ready to commit the transaction, you call CommitTransaction and the collections of changes are then passed to the CommitTransactionCore method and the implementer of the specific FeatureLayer is responsible for integrating your changes into the underlying FeatureLayer. By default the IsLiveTransaction property is set to false, which means that until you commit the changes, the FeatureLayer API will not reflect any changes that are in the temporary editing buffer.

In the case where the IsLiveTransaction is set to true, then things function slightly differently. The live transaction concept means that all of the modifications you perform during a transaction are live from the standpoint of the querying methods on the object.

As an example, imagine that you have a FeatureLayer that has 10 records in it. Next, you begin a transaction and then call GetAllFeatures. The result would be 10 records. After that, you call a delete on one of the records and call the GetAllFeatures again. This time you only get nine records, even though the transaction has not yet been committed. In the same sense, you could have added a new record or modified an existing one and those changes would be considered live, though not committed.

In the case where you modify records – such as expanding the size of a polygon – those changes are reflected as well. For example, you expand a polygon by doubling its size and then do a spatial query that would not normally return the smaller record, but instead would return the larger records. In this case, the larger records are returned. You can set this property to be false, as well; in which case, all of the spatially related methods would ignore anything that is currently in the transaction buffer waiting to be committed. In such a case, only after committing the transaction would the FeatureLayer reflect the changes.

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description
shape BaseShape<!– ThinkGeo.MapSuite.WindowsPhoneCore.BaseShape –> The shape you wish to update in the transaction. The Id of the Shape should be the feature id which you wish to update.
columnValues Dictionary<String,String><!– System.Collections.Generic.Dictionary{System.String,System.String} –> The column values you wish to update in the transaction.

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Protected Methods

Finalize()

Return Value

Return Type Description
Void<!– System.Void –>

Parameters

Name Type Description

<!– System.Object –> Go Back

MemberwiseClone()

Return Value

Return Type Description
Object<!– System.Object –>

Parameters

Name Type Description

<!– System.Object –> Go Back

Public Properties

IsEditable

This property returns whether the FeatureLayer allows edits or is read only.

Remarks

This property is useful to check if a specific FeatureLayer accepts editing. If you call BeginTransaction and this property is false, then an exception will be raised.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

IsInTransaction

This property returns true if the FeatureLayer is in a transaction and false if it is not.

Remarks

To enter a transaction, you must first call the BeginTransaction method of the FeatureLayer. It is possible that some FeatureLayers are read only and do not allow edits. To end a transaction, you must either call CommitTransaction or RollbackTransaction.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

IsTransactionLive

This property returns true if the features currently modified in a transaction are expected to reflect their state when calling other methods on the FeatureLayer, such as spatial queries.

Remarks

The live transaction concept means that all of the modifications you perform during a transaction are live from the standpoint of the querying methods on the object.

As an example, imagine that you have a FeatureLayer that has 10 records in it. Next, you begin a transaction and then call GetAllFeatures. The result would be 10 records. After that, you call a delete on one of the records and call the GetAllFeatures again. This time you only get nine records, even though the transaction has not yet been committed. In the same sense, you could have added a new record or modified an existing one and those changes would be considered live, though not committed.

In the case where you modify records – such as expanding the size of a polygon – those changes are reflected as well. For example, you expand a polygon by doubling its size and then do a spatial query that would not normally return the smaller record, but instead would return the larger records. In this case, the larger records are returned. You can set this property to be false, as well; in which case, all of the spatially related methods would ignore anything that is currently in the transaction buffer waiting to be committed. In such a case, only after committing the transaction would the FeatureLayer reflect the changes.

Return Value

Return Type
Boolean<!– System.Boolean –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

TransactionBuffer

This property allows you get and set the transaction buffer.

Return Value

Return Type
TransactionBuffer<!– ThinkGeo.MapSuite.WindowsPhoneCore.TransactionBuffer –>

<!– ThinkGeo.MapSuite.WindowsPhoneCore.EditTools –> Go Back

Protected Properties

Public Events

thinkgeo.mapsuite.windowsphonecore.edittools.txt · Last modified: 2017/03/16 21:59 (external edit)