What are the basic requirements to utilize ArcGIS JS API with ArcGIS for Server?

Jump to solution
09-16-2015 02:52 PM
New Contributor II

What the basic requirements needed run  under a closed network? For example, the sample first map in (ArcGIS API for JavaScript )

I feel like I'm missing several things.

What I have so far:

ArcGIS for Server 10.3

ArcMap with a couple of mxd files and a lyr file

What I figured out so far:

Override the basemap url via esri/basemap

ArcMap can publish the mxd as a service

     I can view them as a layer added on to an undefined basemap

     Couldn't use it as a basemap as it just show blank

0 Kudos
1 Solution

Accepted Solutions
MVP Esteemed Contributor

Yes, at least in my experience......or ArcGIS Server and any data that you already have and want for a base map.  ​I'm not sure where you are located, but you may be able to find or download data from a local organization or other agency.

View solution in original post

8 Replies
MVP Esteemed Contributor

You have a few options for using the JS API without requiring Internet/AGOL access if you already have ArcGIS Server.  with AGS, you should have access to Portal, which is basically AGOL that is housed locally (although releases run a little later ...months at least...than AGOL releases)  With Portal, that opens up the ability to use Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers    (See my blog for resources and help Web AppBuilder Developer Edition - Customization Resource List​ )  The reason WAB requires AGOL or Portal is for "registration", but beyond that, you can use all your own services from AGS, base maps and/or operation layers.

if you are wanting to use the API without use of the app builder, you can do that without any reliance on AGOL or Portal, but still can use any/all your local AGS services.  I suggest looking thru all the samples (filter topics from the search at top) Basemap gallery | ArcGIS API for JavaScript   to find code samples (I think I have yhe link pointing to the base map gallery).

Make sure that you do NOT have your Basemap in the same mxd/service as your operational layers.  Keep all basemaps as separate services.  Use the toggle-basemap or Basemap-gallery samples (I'm assuming in your question that you want to use your base maps and not he esri/base maps....sorry if I interpreted that wrong)

make ake sure the basemap service is in the reference system that you would like your web app to be.  If not web Mercator aux, you can specify a different if needed (that wasn't anything you asked, but since I use a different one, thought I'd add that in).

I hope this helps....please feel free to ask additional questions.  you question was pretty open ended...but thought I'd give it a start.

New Contributor II

Thanks for the reply.

I have no idea on how to generate a basemap or make it as a service.

Just a reminder, I'm trying to set this up on system(s) that will never touch the Internet.

I was looking in more details / documentations / examples  what makes

Canvas/World_Light_Gray_Base (MapServer)  work with the ArcGIS JS API

esriBasemaps.test = {

baseMapLayers:[{url: "http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"}],   title: "Test"


var map = new Map("map", { center: [-118, 34.5], zoom: 8, basemap: "test" });

Which would help explain why I can't just use the SampleWorldCities service as a basemap

0 Kudos
Occasional Contributor

Hi James,

here is the example to create your own map services as your basemap : https://jsfiddle.net/geoholix/ez4kn0uw/

as you mentioned you have to build the system in closed environment, you also need to install ArcGIS API for Javascript in your environment and add it in your code.



0 Kudos
New Contributor II

I tried to do that but I get a blank screen with no errors.

I confirmed that the ArcGIS JS API and ArcGIS for Server runs in my closed environment.

I'm wonder how you make something like Ocean_Basemap (MapServer) 

The types of map files available to me now are a bunch of unrelated mxd, lyr, tpk, a layer folder filled with bundle & bundlx.

Building a basemap and install it as a basemap service for  ArcGIS for Server seems the missing critical step to me.

0 Kudos
MVP Esteemed Contributor

​(I had a more detailed reply...but my battery died and ate it...trying to recap)

A basemap service is the same as any other service, but with data that you would like to display no mater what operational layers you have on top.  this can be your road system, topo maps, imagery, political boundaries, etc. Since this is the first layer loaded, you want it to have the same spatial reference that you would like your app to be displayed.  You also want to create a cache of your service (So it is a tiled service, vs dynamic).

To create a base map service similar to those provided on AGOL, you would need access to the source data (you can not make a service from a service). See if you have any of the data on the esri map disks (from several years ago....not sure off hand how to get updates....and they may be included with Portal which I have not set up).

Bottom line, in a closed system, you will need to create and cache your own basemap service.

New Contributor II

So in short ... I need the ESRI Data & Maps and Portal for ArcGIS Server Extension to generate a basemap service with one of the mxd files in the Data & Map  as the basemap.

Or alternatively, ESRI Data & Map for Server.

Then publish that service into the ArcGIS Server.

0 Kudos
MVP Esteemed Contributor

Yes, at least in my experience......or ArcGIS Server and any data that you already have and want for a base map.  ​I'm not sure where you are located, but you may be able to find or download data from a local organization or other agency.

Occasional Contributor II

You can use the caches on the Esri server discs, and publish the service definition. I don't have them in front of me (on mobile)  but from memory they are pretty straightforward.