1

I am using arcgis silverlight api

I all i need to do is to get geometry from feature by objectid to zoom to it

getFeature(objectid);

so i used WCF service to get the geometry but I found error that say

Type 'System.__ComObject' cannot be serialized

can you help me please?

Thank you in advance

tkanzakic
  • 5,499
  • 16
  • 34
  • 41

1 Answers1

1

Any reason you're not using an ArcGIS server service? anyway you can't return arcobjects in a wcf service since it wouldn't know how to convert it into XML or json. You will need to define a datacontract class with some simple properties that you convert between in each end. I also wrote the following blogpost way back when which might be helpful: http://blogs.esri.com/esri/arcgis/2010/03/11/sending-geometry-between-silverlight-and-the-server-using-wcf/ This uses the arcgis wpf and SL geometries for transferring since these have a data contract and share the same one.

dotMorten
  • 1,953
  • 1
  • 14
  • 10