Add attributes to geometry?
Can attributes be appended to an ESRI.ArcGIS.Client.Geometry.Geometry?
I'm curious because I want to be able to use geometries for displaying markup in the map, particularly because I can now extract markup to a shapefile. The problem is that my geometries come from a workflow, so when they are added to the map to be extracted to a shapefile, they don't contain any attributes. :-\
I've built a dataset that writes to a data table which contains the attributes for each geometry I add as a markup, however I don't know if it's possible for a geometry to contain an attribute, as a collection of graphics can. Since I have to use the geometry namespace in order to create markup, which is used for shapefile exctractions, am I out of luck? Right now, I have it extracting my shapefile without an attribute table and simply ask the user to download an excel table that contains the attributes I write to the datatable. Not exactly ideal.
Hopefully I'm clear enough...
Thanks!
-
It looks like geometry is a member of graphic. Graphics hold both the geometry and attributes. So my answer is probably no.
So I'll shift my question... How can I display the graphic on the map with its associated attributes? Is there a way?
0 -
Hi Erik
so if you have a geometry you can create a graphic and assign your geomtery to it
ie in an assign task
theNewGraphic = New Graphic
theNewGraphic.Geometry = myAlreadySourcedGeometry
'and assign attributes
theNewGraphic.Attributes("fielName").Value = "the value of the field"
'and you can still draw it in the client using:
External Client Command Activity , AddMarkupFeature, theNewGraphic
or something along those lines
and extract it using: ExtractGraphicsLayerById
Just a suggestion since I am not currently at work and able to pre-test my suggestion ;-) No doubt there may be a couple of missing steps
Regards
Ralph
0 -
Hi Ralph,
is there away to access that attribute value without the extract function ? is it possible to add that field (along with any other attibutes we add in the workflow) to the results pane ?
Thanks
Mazen
0
Please sign in to leave a comment.
Comments
3 comments