Hoppa till huvudinnehållet

Using Reverse Geocode in a workflow (Workflow 4)

Kommentarer

6 kommentarer

  • Nico Burgerhart

    Use the Attributes property, this returns a dictionary with name/value pairs.

    See https://help.arcgis.com/en/webapi/wpf/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Address~Attributes.html

    The following will return a comma separated list of address attribute names or values.

    string.Join(",",address.Attributes.Keys) string.Join(",",address.Attributes.Values)

    This will return the value of the City attribute.

    address.Attributes("City").ToString

    I guess the attribute names are dependent on the used geocode service.

    0
  • John Nerge

    So I plugged string.Join(",",address.Attributes.Keys) into an alert, and it runs, but it doesn't return any values (blank). Do I need to specify the Keys somewhere in GE?

    0
  • Nico Burgerhart

    No, I guess there is something wrong with the (configuration of) the geocode service or Reverse Geocode activity, or it cannot find an address. Does the Location property return a value?

    address.Location.ToString

     

    0
  • John Nerge

    Nope, just returns the ol' "Object reference not set to an instance of an object" error. It does return an address in the context menu though.

     

    Reverse Geocode

    0
  • John Nerge

    I get the same error using the ArcGIS World Geocoder too.

    0
  • John Nerge

    Sigh, okay, it was user error. I was reading too fast and thought the the Geocode Service URL parameter in the ReverseGeocode activity said Geometry Service URL. When I use an actual, ya know, geocode service, it works!

     

    Thanks for all the help, Nico. I don't know if we've ever put it up to a vote, but if so you have mine for king of the forums.

    1

Du måste logga in om du vill lämna en kommentar.