Basemaps, print tasks & firewalls (oh my!)

1938
1
01-26-2016 02:25 PM
JeffreySchmidt
New Contributor II

Hi All,

I have been working with the 3.15 version of the JavsScript API.  I noticed that the basemap gallery basemaps are pointing at http://services.arcgisonline.com/arcgis/rest/services.  Is there a way to configure that to instead point to http://server.arcgisonline.com/arcgis/rest/services​?  (which looks like the same set of services?)

The reason I ask is because of some silly firewall rules built into our agencies server, which breaks my print tasks because it allows services from (server.arcgisonline.com), not from (services.arcgisonline.com)... and the basemapgallery widget to my knowledge points to the latter... Eventually I will be asking for a firewall exception to services.arcgisonline.com, openstreetmap.org, nationalmap.gov, & virtualearth.net (all the basemaps that my print tasks may use), but until then I was hoping for a workaround to meet some current client needs... 

Thanks!

0 Kudos
1 Reply
RebeccaStrauch__GISP
MVP Esteemed Contributor

Are you having issues with just replacing the url in your file?

I just tried it in the printing sample, in the sand box

ArcGIS API for JavaScript Sandbox

and replaced the url on line 130, and it seemed to work just fine

For example, I changed line 130 to

var url = "http://server.arcgisonline.com/arcgis/rest/services/USA_Topo_Maps/MapServer";

for topo maps (didn't have to cahnge anything else in the sample.

It may help if you post a sample of your code (see Posting Code blocks in the new GeoNet​ if you don't know how to format for geonet) and/or if you are testing in the JS sandbox.  Also, if you are getting an error message, include that.