Select to view content in your preferred language

Closest Facility Widget not working in Flex Application Builder

3425
11
08-16-2013 01:11 AM
tanyabisen
Emerging Contributor
Hi All,

I downloaded Closest Facility Widget for Flex Viewer Application Builder and I am able to import it successfully. It works fine while using sample ESRI Network Service.

I tried embedding my Network Service into the widget but it failed. I even tried importing my custom Closest Facility widget which is working fine using Flash Builder but no success.

Below is the Error :

Input field [sh_name] was not mapped to a field in the network analysis class "Facilities". Input field [DTNAME11] was not mapped to a field in the network analysis class "Facilities". Insufficient number of valid locations in "Facilities" or "Incidents".

Where is it actually I am going wrong for my NA service for Application Builder as the same NA service works fine for my customized Flex application.

Please help.

Thanks,
Tags (2)
0 Kudos
11 Replies
MichaelVolz
Esteemed Contributor
Does the sample ESRI Network Service cover the entire United States?

Does anyone know how accurate (up-to-date) the ESRI Network Service is?

Also, what kind of Business needs does this widget address?
0 Kudos
GeorgeHaskett
Deactivated User
Hi All,

I downloaded Closest Facility Widget for Flex Viewer Application Builder and I am able to import it successfully. It works fine while using sample ESRI Network Service.

I tried embedding my Network Service into the widget but it failed. I even tried importing my custom Closest Facility widget which is working fine using Flash Builder but no success.

Below is the Error :

Input field [sh_name] was not mapped to a field in the network analysis class "Facilities". Input field [DTNAME11] was not mapped to a field in the network analysis class "Facilities". Insufficient number of valid locations in "Facilities" or "Incidents".

Where is it actually I am going wrong for my NA service for Application Builder as the same NA service works fine for my customized Flex application.

Please help.

Thanks,


Tanya,

Did you ever get this figured out?  I just added the widget and am getting similar errors.
Any advise?

Thanks
0 Kudos
bojko108
Emerging Contributor
Hello,
I have the same problem. I'm developing a custom tool for finding closest facility (using this example https://developers.arcgis.com/flex/sample-code/closest-facility.htm) and I receive the error when try to solve the task. If I try inside ArcMap, using the same Network Analyst service it is working.
I can't find the reason for this, is it some sort of wrong configuration of the Network Analyst service?

Thanks
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
All,

   The sample that is available here: https://developers.arcgis.com/flex/sample-code/closest-facility.htm uses the ONLY free NA service with is ONLY of San Diego. Notice the URL http://sampleserver6.arcgisonline.com/arcgis/rest/services/NetworkAnalysis/SanDiego/NAServer/ClosestFacility. The days of free routing and network analyst service is gone... You can configure the code to use the AGOL NA service that requires a AGOL account and costs credits against your account.
0 Kudos
bojko108
Emerging Contributor
Forgot to tell you that I have created and configured my own Network Analyst service and I don't use the one you mentioned. Maybe the problem is with my configuration but I don't know where to look for the problem.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Bogdan,

   So you are using your own NA Service or are you using this one? http://route.arcgis.com/arcgis/rest/services/World/ClosestFacility/NAServer/ClosestFacility_World
0 Kudos
bojko108
Emerging Contributor
Yes, I'm using my own service, not this from the sample.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Bogdan,

   There could be hundreds of differences between your NA service and the AGOL NA service... If your NA Service does not expose one particular thing that the closest facility task is looking for then you would get an error. I really don't have any advice on where to begin to look. You should contact esri Tech support.
0 Kudos
GeorgeHaskett
Deactivated User
Rob,

Just for clarification, was the original closest facility widget customized for the demo NA service?

I also created my own NA Closest Facility service using the USA Streetmap data for the state of Idaho and get a handful of errors.  From what I can gather it appears that the default settings I used to create my service do not match the setting for the one used in the widget.

Is it correct in stating that if I can alter my settings to match the ones in the demo service then I should be able to get it working?

Thanks
0 Kudos