Select to view content in your preferred language

How to perform spatial query between two services...

6202
24
07-15-2010 04:45 AM
MichaelBlom
Deactivated User
Hello,
all of the sdk examples involving spatial qeuries involve a service being queried against a feature that the user creates in th UI. 

ie drag a box, take the geometry from that box, set that geometry into the query, perform task

I want to do a query task between two service layers.

I see that I need to get at the recordset from the service in Silverlight, does anyone know how to do this?

Thanks,
Mike
0 Kudos
24 Replies
DavidAshton
Frequent Contributor
John,

Thanks for trying! Now my selection works; my table populates but my layers don't change to the selection color.

Anymore suggestions.

Dave
0 Kudos
JMcNeil
Deactivated User
Sorry David,

I give it some more thought but off the top of my head....I'm not sure?  maybe someone else can help you.

J.
0 Kudos
DavidAshton
Frequent Contributor
Thanks for trying John!

Maybe I will figure it out or maybe someone else will show me the way! :cool:

Dave
0 Kudos
JMcNeil
Deactivated User
Dave,

Sorry it took me so long!  I just tried to plug it in my code:  This will work for sure:


 switch (featureSet.GeometryType.ToString())
                      // switch (feature.Attributes["Shape"].ToString())
                       {
                           case "Polygon":
                               feature.Symbol = LayoutRoot.Resources["ResultsFillSymbol"] as FillSymbol;
                                break;
                           case "Polyline":
                               feature.Symbol = LayoutRoot.Resources["DefaultLineSymbol"] as SimpleLineSymbol;
                               break;
                           case "Point":
                               feature.Symbol = LayoutRoot.Resources["ResultsMarkerSymbol"] as SimpleMarkerSymbol;
                                break;
                    }


                    graphicsLayer.Graphics.Insert(0, feature);




J. Lennon
0 Kudos
DavidAshton
Frequent Contributor
That is it!  Except I am using Default Symbols not Results but I got it! 
Thanks again John.


Dave,

Sorry it took me so long!  I just tried to plug it in my code:  This will work for sure:


 switch (featureSet.GeometryType.ToString())
                      // switch (feature.Attributes["Shape"].ToString())
                       {
                           case "Polygon":
                               feature.Symbol = LayoutRoot.Resources["ResultsFillSymbol"] as FillSymbol;
                                break;
                           case "Polyline":
                               feature.Symbol = LayoutRoot.Resources["DefaultLineSymbol"] as SimpleLineSymbol;
                               break;
                           case "Point":
                               feature.Symbol = LayoutRoot.Resources["ResultsMarkerSymbol"] as SimpleMarkerSymbol;
                                break;
                    }


                    graphicsLayer.Graphics.Insert(0, feature);




J. Lennon
0 Kudos