Select to view content in your preferred language

ProxyURL and Graphics Layer

746
2
Jump to solution
02-07-2013 09:26 AM
JayKappy
Frequent Contributor
Looking to figure out how to use a ProxyURL in conjunction with a GraphicsLayer.
Up till now my Graphics layers were using a QueryTask to retrieve data and everything worked....but the data is now secured and I need to either move to a FeatureLayer and establish a token or use a ProxyURL in the QueryTask..I want to figure both of them out but more so figure out the GraphicsLayer with the ProxyURL...

Anyone have any examples out there...I assume that I can keep everything the same in my code and just add the ProxyURL in the QueryTask?  Examples?

Thanks
0 Kudos
1 Solution

Accepted Solutions
JayKappy
Frequent Contributor
scrapped the proxy page and went with long term token that is defined on the QueryTask

Dim queryTask2 As New QueryTask("https://.org/arcgis/rest/services/Grove/MapServer/7")
AddHandler queryTask2.ExecuteCompleted, AddressOf QueryTask_ExecuteCompletedSearch
AddHandler queryTask2.Failed, AddressOf QueryTask_FailedSearch

Dim query2 As New ESRI.ArcGIS.Client.Tasks.Query()
query2.OutFields.AddRange(New String() {"PID"})
query2.ReturnGeometry = False
query2.Where = "1=1"

' Specify the Token
queryTask2.Token = â??Generated Token for your URLâ??

queryTask2.ExecuteAsync(query2, "initial")

View solution in original post

0 Kudos
2 Replies
JayKappy
Frequent Contributor
What xoes the proxy file look like? Where is is stored? No idea here....please help
0 Kudos
JayKappy
Frequent Contributor
scrapped the proxy page and went with long term token that is defined on the QueryTask

Dim queryTask2 As New QueryTask("https://.org/arcgis/rest/services/Grove/MapServer/7")
AddHandler queryTask2.ExecuteCompleted, AddressOf QueryTask_ExecuteCompletedSearch
AddHandler queryTask2.Failed, AddressOf QueryTask_FailedSearch

Dim query2 As New ESRI.ArcGIS.Client.Tasks.Query()
query2.OutFields.AddRange(New String() {"PID"})
query2.ReturnGeometry = False
query2.Where = "1=1"

' Specify the Token
queryTask2.Token = â??Generated Token for your URLâ??

queryTask2.ExecuteAsync(query2, "initial")
0 Kudos