Parameters
- features
- A set of features to scale.
- origin
- The origin around which the geometry will be scaled.
- sx
- The scale factor along the x-axis.
- sy
- The scale factor along the y-axis.
- sz
- The scale factor along the z-axis.
var scaleFeatures = new EditOperation() { Name = "Scale Features" }; //Rotate works on a selected set of features //var scaleSelection = MapView.Active.GetFeatures(polygon).Select( // k => new KeyValuePair<MapMember, List<long>>(k.Key as MapMember, k.Value)); //scaleFeatures.Scale(scaleSelection, origin, 2.0, 2.0, 0.0); //Scale the selected features by 2.0 in the X and Y direction scaleFeatures.Scale(MapView.Active.GetFeatures(polygon), origin, 2.0, 2.0, 0.0); //Execute to execute the operation //Must be called within QueuedTask.Run if (!scaleFeatures.IsEmpty) { var result = scaleFeatures.Execute(); //Execute and ExecuteAsync will return true if the operation was successful and false if not } //or use async flavor //await scaleFeatures.ExecuteAsync();
Target Platforms: Windows 11, Windows 10