Select to view content in your preferred language

Sample viewer ServiceAreaWidget projected results?

681
2
04-05-2010 10:42 AM
SpencerLace
Occasional Contributor
Hi,
I am trying to get the Service Area widget in the sample viewer 1.3 to return a graphic that is already projected to state plane to match my basemap.  Currently, the widget locates a point on the map and computes the service area, but the result is in a different coordinate system than the point submitted. Does anyone have any ideas what I can do to force the result geometry and/or graphic to be my (map.spatialReference.wkid), or to have geometryService.project() the result of service area?
Thanks,

Spencer
Tags (2)
0 Kudos
2 Replies
PrashanthSukumaran
Emerging Contributor
Hi Spencer,

The ServiceAreaWidget uses the Geoprocessor to retrieve the drive time polygon.  You have to pass the output spatial reference (outSR). 

var params:Object = 
                  {
                      "Input_Location": featureSet,
                      "Drive_Times": driveTimes,
                      "env:outSR": 3566,
                                    "env:processSR": 4326 // Input spatial reference
                  };


Thanks
Prashanth Sukumaran
0 Kudos
SpencerLace
Occasional Contributor
Yes!  Thank you, this change made it work.
0 Kudos