kdefilip / google-maps-utility-library-v3

Automatically exported from code.google.com/p/google-maps-utility-library-v3
Apache License 2.0
0 stars 0 forks source link

ArcGIS server Dynamic Map Service Example not working for me #270

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Demo link or sample code:
[http://google-maps-utility-library-v3.googlecode.com/svn-history/r172/trunk/arc
gislink/docs/examples.html]

What steps will reproduce the problem?
1.Follow the link. On the second example ("Dynamic Map Service") of the ArcGIS 
Server Link for Google Maps API V3. 
2.
3.

Expected result:
I expected the ArcGIS census boundaries layer to pop up as a MapOverlay on top 
of the Google Maps imagery

Actual result:
The census boundary layer does not pop up.  I have checked the ArcGIS server 
link, and it works fine through other programs.  Using the same code, I have 
also tried another simple ArcGIS server layer and have not been able to get 
reproduce an overlay layer with that either.  

I get no error message from FF or ie, but chrome says 'Resource interpreted as 
Script but transferred with MIME type text/plain: 
"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Ce
nsus_USA/MapServer/layers?f=json&callback=ags_jsonp.ags_jsonp1_985830"'. 

Version: ###

Browser / Operating System:
FF22, ie8, Chrome 28 /Windows 7 

Original issue reported on code.google.com by natev...@gmail.com on 12 Aug 2013 at 2:35

GoogleCodeExporter commented 8 years ago
This is actually a quirk of Chrome.  Chrome strictly enforces the header types 
it receives.  When the json is requested from:

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Cen
sus_USA/MapServer?f=json&callback=ags_jsonp.ags_jsonp0_387592

It is being returned with the following header type:

Content-Type: text/plain

Chrome requires the following:

Content-Type: application/javascript

This is purely a server side issue.  If you have access to the server you are 
making these calls to, you can correct the header being returned, but if you do 
not, then you're out of luck with Chrome.  You could check the Chrome bug list 
to see if anyone has posted this as a bug/defect and request that it be handled 
more gracefully.

I'm marking it as invalid as there is nothing we can do on our side to fix this.

Original comment by brett.mc...@gmail.com on 16 Sep 2013 at 6:15