Add NAIP Imagery as a Map Service

3605
4
07-23-2010 10:09 AM
MattShetzer
New Contributor
Hi All,
I'm trying to add the latest NAIP for Colorado from the USDA to my Flex Project.  I'm struggling with this, and not able to display the data. 

The service I'm trying to access is at:
http://gis.apfo.usda.gov/ArcGIS/rest/services/NAIP_Imagery/Colorado/MapServer

and the line of code in the SFV Config.xml calling the service is:
<mapservice label="Test Colorado NAIP" type="tiled" visible="true" alpha="1" icon="com/esri/solutions/flexviewer/assets/images/icons/i_shuttle.png">http://gis.apfo.usda.gov/ArcGIS/rest/services/NAIP_Imagery/Colorado/MapServer</mapservice> 

Thanks in advance for your help !!!

Matt Shetzer
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Matt,

   When you go to the link that you provided the REST Service Directory tells you that you are working with a dynamic map service and not a tiled one. You can determine this by seeing that there is no LOD defined in the service directory. So all you need to do is change the type="dynamic" in your config.xml and you should be good to go.
0 Kudos
MattShetzer
New Contributor
Perfect !!! That did the trick !!

Thanks Robert.
0 Kudos
MattShetzer
New Contributor
Everything works great in Development and when I test in Flex, but when I push it up to the Server, the Imagery just appears as a gray background, and is not loading anything.

Does anyone have any ideas?

Thanks,
Matt
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Matt,

   They do not seem to have a crossdomain.xml file on their server. Flex is looking for http://gis.apfo.usda.gov/crossdomain.xml and can not find it. Adobe has a concept call security sandboxes and when you are developing on your dev machine you are in a local trusted sandbox and can see their map service with out the crossdomain.xml but when you deploy to your server you are no longer in the local sandbox and Flex requires the crossdomain.xml on their server. The other option beside contacting them and asking them to put a crossdomain.xml on thier server is to use the proxy server that comes with Flexviewer. Using a proxy allows you to connect with their map service without the crossdomain.xml

More info on crossdomain here: http://help.arcgis.com/en/webapi/flex/help/content/deploy_application.htm

More info in using a proxy here: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/ags_proxy.htm
0 Kudos