Need to get the ArcGIS Runtime SDK for WPF Routing Example to work with my gpk

1415
1
11-12-2012 04:19 AM
ReneeCammarere
Occasional Contributor
I went through the following two examples to get an idea of how to create a custom, local Routing Task.   This is a walkthrough that takes you step by step through the creation of your first routing geoprocessing package: http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/How_to_author_and_publish_a_geo....
And here is the second part, that completes the picture and shows you how to run it from code: http://resources.arcgis.com/en/help/runtime-wpf/concepts/index.html#/How_to_develop_a_point_to_point...
I was able to get it to run using my map package that I created (with my own vector data). However, when it runs and I click the "Solve" button, I can only get the Route graphic to display, that was displayed when I created the gpk from the result. The two points that I click on when running the code are obviously not used by the code to create the resulting Route graphic. I don�??t know what I�??m doing wrong with this example. Aren�??t you supposed to be able to use a gpk file to (in a sense) run that same model, but with different data each time?
I was not able to get the actual data to upload (which includes the gpk and mpk files) so I don't know how much help the attached code will be.
Thanks,
Renee
0 Kudos
1 Reply
ReneeCammarere
Occasional Contributor
I was able to determine that the reason the code wasn't running right was because I needed to change GPFeatureRecordSetLayer("Input Locations") to GPFeatureRecordSetLayer("Input_Locations")

Such a minor thing, and I must have looked at the URL for the local runtime server a dozen times and didn't think about this because the name of the input parameters in the model had the space and not the underscore, and there was never an error or anything.
0 Kudos