Basemaps do not load for 2D maps using MapView in version 4.x

1469
5
Jump to solution
10-11-2016 12:15 PM
CarlHughes3
New Contributor II

I am creating a 2D map using version 4.1 of the API. Prior to October 7th, 2016 I had no issue loading a Map using any of the basemaps in a MapView. Since then, I can only load the OSM basemap. Whenever I try a different basemap (e.g. "streets" or "gray", I receive the following type of error in the console: "server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/8/93/77:1 GET file://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/8/93/77 net::ERR_FILE_NOT_FOUND"

The issue seemed to start shortly after ESRI posted an issue with the Vector Basemaps Service on October 6th.

I have the same issue when I copy any of the sample codes from the documentation to a local file and run it from my computer.

Any ideas what might be the problem here?

Thanks!

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Carl,

  The issue is that you can not use the file:// protocol any longer when using 4.1 of the api. You will have to use your local IIS and a true url like http://localhost/yourhtmldoc.html.

View solution in original post

5 Replies
SarojThapa1
Occasional Contributor III

ArcGIS API for JavaScript 4.0 and 4.1 are primarily focused on 3D maps. It's a good idea to use ArcGIS API for JavaScript 3.18 especially if you are working with 2D maps. 

0 Kudos
CarlHughes3
New Contributor II

Saroj,

Thanks, that seems to be the way to go, but I am still curious to know what the issue is here? Although the ArcGIS API for JavaScript 4.1 documentation indicates the focus on 3D, it seems strange that 2D maps would simply stop working altogether as it clearly supports 2D. Much of the API reference and many of the code samples are explicitly for 2D.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Carl,

  The issue is that you can not use the file:// protocol any longer when using 4.1 of the api. You will have to use your local IIS and a true url like http://localhost/yourhtmldoc.html.

CarlHughes3
New Contributor II

Thanks, Robert!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Carl,

   Glad to help. Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.

0 Kudos