I have been trying to use the updated ArcGIS API for Javascript, with ArcGIS Online. I have been testing with the sample code found on the "Create web map by ID" page:
http://developers.arcgis.com/en/javascript/jssamples/ags_createwebmapid.html
If I download that and try to run it in Firefox, without making any changes, then the map does not show up and I get the following error reported in Firebug:
Error: Unable to load the base map layer
[Break On This Error]
...);}},_getKind:function(_2ff){var _300=this._trackManager;if(_300){return _300.is...
utils.js (line 19)
The sample runs fine on the http://developers.arcgis.com/ site, I'm not sure why it would be failing for me. I am not accessing the web through a proxy.
Thanks.
3 Answers 3
Works fine after I changed the relative reference to layout.css -- cheers!
<link rel="stylesheet" href="css/layout.css">
to
<link rel="stylesheet" href="http://developers.arcgis.com/en/javascript/samples/ags_createwebmapid/css/layout.css">
-
I tried that, but it didn't work. I'm still getting the same issue on the base map layer.Britt Wescott– Britt Wescott2013年04月10日 16:12:40 +00:00Commented Apr 10, 2013 at 16:12
-
1Can you get other samples to work on your test platform? Different browsers?awesomo– awesomo2013年04月10日 16:23:46 +00:00Commented Apr 10, 2013 at 16:23
-
I also tested in IE and Chrome. I did try the sample for developers.arcgis.com/en/javascript/jssamples/map_simple.html and that one is working correctly. However, it is not using an ArcGIS Online map.Britt Wescott– Britt Wescott2013年04月10日 16:56:09 +00:00Commented Apr 10, 2013 at 16:56
-
What about this one where you "Create web map using JSON"? Not using a proxy there either, but it does reference a base map... developers.arcgis.com/en/javascript/jssamples/…awesomo– awesomo2013年04月10日 22:36:45 +00:00Commented Apr 10, 2013 at 22:36
-
That one is working also. I'm trying to figure out why I'm getting the different behavior.Britt Wescott– Britt Wescott2013年04月11日 19:47:37 +00:00Commented Apr 11, 2013 at 19:47
I was able to find an ArcGIS forum post for a similar issue:
http://forums.arcgis.com/threads/54811-Proxy-page-error-using-editor-widgit
The directions for creating a proxy page for viewing ArcGIS Online maps can be found here:
http://help.arcgis.com/en/webapi/javascript/arcgis/jshelp/ags_proxy.html
a simple way to create web maps is to install cartoview www.cartologic.com/cartoview and create a webmap the steps are available at http://cartologic.com/cartoview/apps/cartoserver/help/webmap/#settings