Can I pass Object ID in the web address and zoom to it.

582
1
01-10-2012 08:44 AM
CraigGallant
New Contributor II
I normally use the Silverlight SDK so I understand the map layers and the QueryTask and zooming to the returned features. What I would like to do is have a URL of a java script map that if I pass it the VALUE of a feature in a layer it would open it and zoom to it. I would like a URL something like this "http://myarc.server.com/map?StateName=Texas"

In the above example the map would open and then zoom in to the state with the Name = Texas. Is this even possible in java script and if so is there code to show how to achieve this.

Thanks for the help,
Craig
0 Kudos
1 Reply
StephenLead
Regular Contributor III
I would like a URL something like this "http://myarc.server.com/map?StateName=Texas"

In the above example the map would open and then zoom in to the state with the Name = Texas.


Take a look at location.href to obtain the URL, then parse it to obtain the section you need, before feeding that to the search/query section of your code.

Steve
0 Kudos