Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have been creating some web-map applications using GoogleMaps Javascript API v3.

I've been bringing in tiles from ArcGIS servers which is really easy using the API.

The code below loads a sample dataset from ARCGIS.COM

var url = 'http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer';
var agsType = new  gmaps.ags.MapType(url,{name:'ArcGIS'});
map.mapTypes.set('arcgis', agsType);
map.setMapTypeId('arcgis');

I have some clients that already have a public ArcGIS server online and in place. When I ask them for the MapServer URL, they don't know where to find it or how to generate it for their datasets.

I don't know anything about ArcGIS server and have not been able to find the appropriate info in ESRI help docs. Could someone point me to some info about generating an appropriate MapServer URL that I could then pass onto my clients?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

By default, ArcGIS Server for Java listens on port 6080 and its REST services directory is accessible at the path /arcgis/rest/services. So, given a host name, chances are you can browse its services directory using the following URL structure:

http://server.example.com:6080/arcgis/rest/services

From there, you'll find a list of services and/or folders with services in them. The path to a service's MapServer follows this format:

http://server.example.com:6080/arcgis/rest/services/foldername/servicename/MapServer

or, if it's not in a folder at all, just:

http://server.example.com:6080/arcgis/rest/services/servicename/MapServer

EDIT: As mwalker pointed out below, this is only the case for the Java version of ArcGIS Server. The .NET version listens on port 80 via IIS, so the base URL should simply be:

http://server.example.com/arcgis/rest/services

EDIT #2: It looks like at version 10.1 of ArcGIS Server, both the Windows and Linux versions listen on port 6080 by default. If you want another port to be used, you need to install the ArcGIS Server Web Adaptor. For more information, see: http://resources.arcgis.com/en/help/main/10.1/index.html#/Migration_to_ArcGIS_10_1_for_Server/0154000002p0000000/

share|improve this answer
1  
ArcGIS Server for Java listens on port 6080 (if you don't have the web connector). ArcGIS Server for .NET goes into IIS and listens on port 80, so remove the :6080 for that. –  mwalker Jun 13 '12 at 16:39
    
Thanks. Here is a arcServer I found on the web. How could I find the URLs to some of the layers on this server? I do not see an explicit ArcGIS server URL when viewing this map. gis.gallatin.mt.gov/general_viewer –  snowgage Jun 13 '12 at 18:04
    
@mwalker, thanks for clarifying about .NET. snowgage, I just took a guess and plugged in /arcgis/rest/services to the base hostname and it took me to the REST services directory: gis.gallatin.mt.gov/arcgis/rest/services –  greenlaw Jun 14 '12 at 19:32
    
Also, these services will only show in a browser if the ArcGIS Server Admin has enabled web access (which is default to be enabled). –  MLowry Jun 14 '12 at 19:50
    
Very helpful. Thanks Greenlaw! –  snowgage Jun 18 '12 at 19:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.