Select to view content in your preferred language

ArcGIS API JS Tutorial Maps Showing Up Blank

1118
2
05-22-2014 08:03 AM
LisCollins
Occasional Contributor
Hi,

I want to add a map that I created on ArcGIS Online to my website (currently developing locally; I haven't uploaded the page to my server yet).

I have tried to follow the tutorials listed here for doing that: https://developers.arcgis.com/javascript/jssamples/ags_createwebmapitem.html, and when I copy and paste the code and save the file, and open the local html file in a browser, nothing shows up!

I even tried using my own web map id in the code, and still nothing shows up. (I have made my ArcGIS online map public).

When I do the basic, add a map to your website tutorial, a map shows up. But when I want to show a map from ArcGIS online, nothing shows.

Why is it doing this?

Thanks.
0 Kudos
2 Replies
GISDev1
Occasional Contributor III
Hi,

I want to add a map that I created on ArcGIS Online to my website (currently developing locally; I haven't uploaded the page to my server yet).

I have tried to follow the tutorials listed here for doing that: https://developers.arcgis.com/javascript/jssamples/ags_createwebmapitem.html, and when I copy and paste the code and save the file, and open the local html file in a browser, nothing shows up!

I even tried using my own web map id in the code, and still nothing shows up. (I have made my ArcGIS online map public).

When I do the basic, add a map to your website tutorial, a map shows up. But when I want to show a map from ArcGIS online, nothing shows.

Why is it doing this?

Thanks.


What is the URL you are trying to view in your web browser to see your local .html file? If it's something along the lines of 'C:\web\test.html', then you'll probably want to try and put that file in your 'C:\inetpub\wwwroot' directory (you should have this directory if you have IIS installed on your machine), and then view the file using localhost.
0 Kudos
JeffPace
MVP Alum
just to be clear.  You HAVE to run the file on a server.  You cannot run it locally (file://)