Zum Hauptinhalt gehen

How to manipulate a map point

Kommentare

4 Kommentare

  • Ryan Kelley
    Can't you just make a new variable (type = Double), and set that new variable = point.X + 1000 ?
    0
  • Permanently deleted user
    Yes I did. I created a variable for map point. Now I am getting an null error. I dont not know how to initialize the map point variable so that it is not null.
    0
  • Aaron Oxley
    Hi Shaniqua, 

     

    Once you have a FeatureSet, you can assign the FeatureSet's geometry to a variable with a Cast<T> activity (Type: ESRI.ArcGIS.Client.Geometry.MapPoint). The input "Value" for that activity (the right side) will be something like this: FeatureSetVariable.Features(0).Geometry. And the output "To" (left side) will be your new variable. 

     

    Then, you can use an Assign activity to modify the X and Y and, if required, assign it to a new variable.

     

    Thanks,

     

    Aaron Oxley
    0
  • Berend Veldkamp
    In the list of variables you'll find a column named 'Default'. Set this to New MapPoint() to initialize the mappoint, or New MapPoint(100, 200) to also to set initial X and Y values.

     

    Alternatively, use an assign activity where you set value to the name of your variable, and to to New MapPoint().

     

    To change X or Y later, for instance to add 1000 to the X coordinate, you can use an Assign activity with Value: point.X and To: point.X + 1000.
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.