Select to view content in your preferred language

Installing/Testing JS API on IIS

1840
7
12-11-2012 07:26 AM
Zeke
by
Honored Contributor
I'm trying to install & test the Javascript API on my local machine using IIS (C:\inetpub\wwwroot) using the instructions in the install.html file shown below. I don't understand the bolded  instructions. I don't have the  'ArcGIS Server REST SDK' installed locally anywhere I can find. Any help on what this means and how to proceed? Thanks, appreciate it. Actual coding is easier than the setup, I think.

Test the Install

Access the ArcGIS JavaScript library from your Web server using the following URL:http://<myserver>/arcgis_js_api/library/3.2/jsapi/init.js and http://<myserver>/arcgis_js_api/library/3.2/jsapicompact/init.js

Change the ArcGIS Services Directory "View In JavaScript" URL. Instructions are given in "Configuring the REST API" in the ArcGIS Server REST SDK.  On Windows, the location is <Installation Location>\DeveloperKit\Help\REST\index.html.  On UNIX and Linux, the location is http://<myserver>:8399/<instance>/sdk/rest/index.html where myserver is your server name and instance is the instance name (jsapi is the default).    

Find the "JavaScript API" section for either .NET or Java for more information about parameter values.

For .NET, the parameters to change in rest.config are <ArcGIS> and <ArcGISCSS>.  Replace serverapi.arcgisonline.com with your server domain name.

For Java, the parameters to change in rest-config.properties are jsapi.arcgis and jsapi.arcgis.css.  Replace serverapi.arcgisonline.com with your server domain name.



Test your install.  You can use the following test code to validate your JSAPI library install.  
0 Kudos
7 Replies
JohnGravois
Deactivated User
the instructions you mentioned are only relevant if you have ArcGIS Server installed on the same machine to help you configure it to point to your local API when displaying the JavaScript sample viewer for services you've published.

ie:
http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer?f=jsapi

to make things slightly more confusing, the wording of the present instructions are specific to ArcGIS Server 10.0.  At 10.1 the rest config properties location is
[install_location]\ArcGIS\Server\framework\runtime\tomcat\webapps\arcgis#rest\WEB-INF\classes\resources\rest-config.properties


we are working on updating the installation guide.  sorry for the inconvenience.
0 Kudos
Zeke
by
Honored Contributor
Ok, thanks, then I can ignore that? Anything I should replace/do instead? I'm just using IIS to test things out. We'll be migrating from 10.0, using ADF on the actual server, to 10.1, where we need to upgrade to JS, Silverlight, etc., and we'd prefer JS.
0 Kudos
JohnGravois
Deactivated User
why not just use the hosted CDN copy of our API?
0 Kudos
KeG
by
Deactivated User
like cbsnews did during superstorm Sandy?
0 Kudos
JohnGravois
Deactivated User
well, he said he was just planning on doing some testing to get familiar with the API....

but if he's gonna build an app that generates a few million hits and causes a natural disaster which takes out server farms, hopefully he'll let us all know in advance 🙂
0 Kudos
Zeke
by
Honored Contributor
why not just use the hosted CDN copy of our API?

Well, this is just testing on my machine, but also not familiar with the hosted CDN. More familiar with the programming side of things than network/server setup. Apparently the city has ArcServer that services are published to, web access through IIS. I may have that wrong, it's been years since I set up anything myself. I think I need a 'services publishing web for dummies' tutorial. :confused:
0 Kudos
JohnGravois
Deactivated User
if you're just getting familiar with the JavaScript API, there is no need to install and configure it locally.  feel free to use the version we make available over the internet.

i'd recommend taking a look at our conceptual article "Building your first application" and then perusing all our published samples.

you can copy/paste or download the projects and host on IIS or any other web server on a development machine.  They should work whether you are pointing at your own ArcGIS Server content or the content on our sample servers.

hope that helps! 🙂
0 Kudos