2

I am new to ArcGIS JavaScript API and I want to use it in local host mode. I definitely follow Esri support instruction for using of it.

I replacement instead of [HOSTNAME_AND_PATH_TO_JSAPI] in init.js and dojo.js host by localhost/arcgis_js_api/library/3.11/3.11/, and then Edit ArcGIS services in JavaScript API URL.

enter image description here

But when I click on map service

enter image description here

it does not show a map.

enter image description here

  • Hey, you are not really supposed to mess with the paths to the .js in the REST Admin Directory. This is for ArcGIS Server internal quick preview of the map service. If you want to build an own web application, you need to host a separate web app on your own. Look for developers.arcgis.com/javascript – Alex Tereshenkov Jun 1 '18 at 12:09
1

I think you are trying to host your own copy of the javascript api files. To do this you don't need to mess around with the ArcGIS Server install paths, you just download and host the files through your normal web server, https://developers.arcgis.com/downloads/apis-and-sdks?product=javascript.

Once installed just refrence this location in your javascript files. From the help:

These instructions assume that you are installing the ArcGIS JavaScript API documentation in the following location https://www.example.com/arcgis_js_api/sdk/ (C:\Inetpub\wwwroot\arcgis_js_api\sdk) on Internet Information Services (IIS) for Windows® Server, where www.example.com is the combination of the fully qualified domain name and top level domain of your web site.

If you are using a non-Windows operating system, please see the instructions on deploying the library on Unix/Linux.

The ArcGIS API for JavaScript documentation can be copied in its entirety to your web server directory (C:\Inetpub\wwwroot\arcgis_js_api\sdk). Copy \arcgis_js_api\sdk and all its contents from the ArcGIS API for JavaScript download to your web server. In this example the files are copied to: C:\Inetpub\wwwroot\arcgis_js_api\sdk.

The start page is https://www.example.com/arcgis_js_api/sdk/index.html.

0

It seems to be that you have a certification problem, or something like that. You are trying to access a non-secure http site (your local ArcGIS-JS-API) from a secure https site.

I would do the following: 1. Try to access the ArcGIS Manager using http (http://localhost:6080/arcgis) 2. Check always the console to see the exact error or if there is a message that could help

If doesn't work, use the name of your machine instead of localhost in all the ArcGIS Server configuration

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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