Unable to create map using Basicviewer from my local server

8908
25
02-10-2013 06:32 PM
HelenYang
New Contributor II
Hi,

I've created a map from ArcGIS online using my own arcgis server services, shared the map with everyone, and even publish a web application using the Basic viewer template from ArcGISOnline.

However, when I downloaded the bisicviewer template to create a web application from the local web server, I got the error message - Unable to create map: "Unable to load http://localhost/sharing/content/items/xxxxxxx?f=json status:404".

I understand 404 meaning the web page not found. It could be security related, as my server is behind the firewall and proxy. So I set up a proxy page according to the http://help.arcgis.com/en/webapi/javascript/arcgis/jshelp/#ags_proxy, although I am not sure if my proxy setup is correct. How do I know if my proxy page setup correctly?

Could any one suggest what I should do to bypass the error? Did I miss something in setting the web page. I didn't modify anything in index.html but the WebmapID, then copied to the IIS root folder.

Thank you very much in advance.

Helen
Tags (2)
0 Kudos
25 Replies
MattClarke
New Contributor II
I tried the exact same this just a few moments ago. I was attempting to create a public map shared with everyone download the basic viewer change the webmapid and go...I do not see a need to configure a proxy page at this point being this a is public map and the url is less than 2048 characters in length.
0 Kudos
KellyHutchins
Esri Frequent Contributor
The app is looking for your arcgis.com content in the wrong location. Looks like we forgot to set a path to point it to www.arcgis.com in the download version of the template. I've attached a zip file of the updated version that should fix this problem.
0 Kudos
TroyProctor
New Contributor III

Kelly,

I downloaded the geoform code from the link below and I'm getting the following message when trying to run it from one of our web servers. It works fine when I run it from a local machine, but I get this message on the web server. It's as if it's trying to look for the web map on a premise portal, but I want it to look to cms.maps.arcgis for the web map. Which again it works fine locally in my dev environment on my machine, but not on the web server. Also I have the "sharinghost": in the default.js set to "http://cms.maps.arcgis.com".

Thanks for the help.

Troy Proctor

error message.png

Esri/geoform-template-js · GitHub

0 Kudos
KellyHutchins
Esri Frequent Contributor

Tony,

On production is your app deployed to a location that has apps or home in the path? If so try switching line 179 in template.js from this:

appLocation = location.pathname.indexOf("/apps/");

To this:

appLocation = -1;

If your path contains home you'll also want to comment out the if statement from lines 180-182

0 Kudos
TroyProctor
New Contributor III

Kelly,

Thanks for the quick response!

It was under /apps/.

That got it to look at cms,maps.arcgis.com, but now I'm getting this error.

Thanks,

Troy

error.png

0 Kudos
KellyHutchins
Esri Frequent Contributor

Looks like that url works fine. Can you try just navigating to the url on your production server:

http://cms.maps.arcgis.com/sharing/rest/content/items/1579f66872684abb9c003a21df4e972d/data

0 Kudos
TroyProctor
New Contributor III

Kelly,

Yeah, that link works fine in Internet Explorer on the production server.

It made me think to try to browse to the application with IE and after

doing that the site runs fine. So it looks like it's just an issue within

Chrome and Safari when trying to browse to site, which is weird because it

still works fine in my local dev environment with Chrome. If you happen to

think of something that might be causing that let me know.

Thanks for your help.

Troy Proctor

0 Kudos
TroyProctor
New Contributor III

Kelly,

I got that last piece figured out.

I didn't have the http(s) in my url. Once I had "sharinghost": "

https://cms.maps.arcgis.com", it worked fine in Chrome and Firefox.

Thanks Again,

Troy

On Thu, Oct 16, 2014 at 1:20 PM, Troy Proctor <troy.c.proctor@gmail.com>

MattClarke
New Contributor II
Kelly...thank you! Any way you could hook us up with an example php proxy page? I have been reviewing the info from the resource pages and I am still missing something.
0 Kudos