Zum Hauptinhalt gehen

How do I finish this phrase to show the x coordinate of a point in an alert or log? $form1.state.geometryPicker1.

Kommentare

3 Kommentare

  • Stefan Schweigert

    Hi Ethan,

     

    If you use a Log activity, and use '=$form1.state.geometryPicker1' as an input, you can view the object's contents within the Chrome Developer Tools (F12) console.

     

    When using a geometry picker, you are able to select multiple input geometry values, so they are stored in an array.

     

    For example. to display the x,y coordinates, use the following expression in an Alert: ="Geometry Picker Value: " + $GeometryPickerForm.state.GeometryPicker.value.geometry[0].x + ", " + $GeometryPickerForm.state.GeometryPicker.value.geometry[0].y

     

    Thanks, Stefan

    0
  • Ethan Granger

    Ah! Thank you. I'm finding the examples were either geometry[0] or geometry.x but not both. It seems a good understanding of the ESRI Javascript API is required. It would be great if those properties showed in the autocomplete.

     

    The results I'm getting are x: -12986135.09560118 y: 5417436.451796072. Our data is WGS 84, the mxd is Idaho state plane, workflow is reporting WKID 102100, and the WKID set in GCE is 4326 What are these coordinates? And how do I get them to decimal degrees?

     

    0
  • Stefan Schweigert

    In the Query Layer, you can define the Output Spatial Reference property as the WKID required.

    0

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