I am new to JS API4.1. I tried installing it on a system with Windows 7 running IIS. The instructions given in the install.html were followed. But, the following error is seen in console after using the test API code given in the install.html page.that loads a custom basemap. I have tested the Map service that i was using and checked the JS API 4.1 init.js through web browser. All things seem to be working fine.
The error reads as follows:
TypeError: this._layerViewsMap.forEach is not a function.
The JS API and the service URL are seen to be going through in the console window.
Request for immediate responses.
Ram Kumar.
#4.1
Ram,
If you are following the instruction from the arcgis_js_api/library/downloads/index.html then it has this:
C:\Inetpub\wwwroot\arcgis_js_api\library\4.1\4.1\init.js
in a text editor and search for the text [HOSTNAME_AND_PATH_TO_JSAPI]
, and replace this text with <a href="https://en.wikipedia.org/wiki/Top-level_domain">fqdn.tld</a>/arcgis_js_api/library/4.1/4.1/
The <a href="https://en.wikipedia.org/wiki/Top-level_domain">fqdn.tld</a> is not suppose to look like that in the doc. It is suppose to be parsed and just be a link to fqdn.tld Which just explains how you need to use a fully qualified domain name of the web server.
So in my case on my development lap top I replaced [HOSTNAME_AND_PATH_TO_JSAPI] with "gislap183" (my machine name) for both step one and step 2.
Ram,
Just a suggestion: have you tried different browsers? Check also the compatibility mode in IE (Tools>Compatibility settings).