Select to view content in your preferred language

Editor with custom behavior

646
1
03-06-2012 06:43 AM
SteveLi
Emerging Contributor
I am working on a web editing app to create point features.  I'd like to use the default Editor, but one unique requirement is certain fields in attributes inspector will be automatically populated when user click on the map to add a new point, for example, the city, zip fields will be populated based the location.

Is there way to do that (somehow inject the value into the attributes inspector)?
Tags (2)
0 Kudos
1 Reply
BenKane
Regular Contributor
Steve,
If you implemented an identify operation (on a layer that has the city/zip/whatever information you want) on the map_click when a user adds a point the returns of the identify operation can be injected into the attribute inspector fields with something like
{graphic.attributes['city'] = CITY;} where "graphic" is a variable representing the graphic/point added in the edit operation and "CITY" is the value returned by the identify operation.

-Ben
0 Kudos