kreynolds22

Network Analyst map service not working properly

Discussion created by kreynolds22 on Apr 15, 2010
Latest reply on Apr 21, 2010 by kreynolds22
Hi all,

We've been using ArcGIS this year for a school project, and seem to have hit a snag while trying to publish our map to ArcGIS Server.  I'll try to be as detailed as possible.

Basically, what we're doing is making a routing web application using google maps as the front end/geocoding and using Network Analyst to create a network map to specify special routes (trying to combine roads with bike trails, giving preference to bike trails/low traffic count roads and so on.)

From what I can tell, we need to use ArcMap to save a .mxd file that contains out network dataset, upload it to the server, and publish it as a service with the network analyst check-box checked.  We then set a javascript variable on our website to point to our service from the URL given by ArcGIS Server.

Example:
routeTask = new esri.arcgis.gmaps.RouteTask("http://arc-gis-server:8399/arcgis/services/Test/MapServer");

I've also seen some documentation saying we need to have it point to /arcgis/service/Test/MapServer/NAServer (since that's the URL given by the Network Analysis function when specifying when publishing the service).

The problem we're running into is after pointing to our server, our application doesn't route anything.

From the logs, there's information such as:

"The Layer:'TRAILS_SO_Merge' in Map:'Layers' is invalid. The database was not found. "
or
"The Layer:'TRAILS_SO_Merge_ND' in Map:'Layers' is invalid. "

Which makes it look like something's wrong with our .mxd file.  It's simply a file with the network dataset imported into it.

Trying to troubleshoot the problem some more, I've tried using a sample route that comes with arcgis server, SanFrancisco-SimpleRoute.mxd.  Again, publishing this service and pointing our web application to this service causes the application to not route.

However, pointing our web app to a routing system that ESRI has as an example:

http://tasks.arcgisonline.com/ArcGIS/rest/services/NetworkAnalysis/ESRI_Route_NA/NAServer/Route

causes our application to route correctly.

So it looks like both something's wrong with our .mxd and something's wrong with with our server setup, or I'm pointing our application to the wrong URL.

We're running 9.3.1 on RedHat 5, and any help is greatly appreciated.

Thanks!

Outcomes