Rest Service appears in gray scale

509
4
12-10-2013 12:31 AM
HaniuHokkaido
New Contributor III
Hi,

I just made an application from Arcgis Viewer for Flex 3.5 using Map Service from Arcgis Server 9.3.1. Why does the map appear in gray scale ?

[ATTACH=CONFIG]29706[/ATTACH]

I tried to make an app with arcgis server wizard, the map appears in color.

FYI, The map service has 3 layers (1 basemap and 2 operational) taken from arcgis server local. The map service is very simple, just single color. and its a dynamic map service

Please help...

thanks
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Haniu,

Arcgis Server 9.3.1 does not provide Drawing Info data about the map service so when the map service is added to the Viewer as a Feature type it does not know how to symbolize itself. You will have to manually specify the renderer that it will use unless you add it as dynamic. When you say "Arcgis Viewer for Flex 3.5" can I assume you are talking about Application Builder (the GUI app for producing Viewer sites)? If so it could be that you are just adding your map service in correctly (i.e. drilling down to far and adding your layers as type feature).
0 Kudos
HaniuHokkaido
New Contributor III
Hi Robert..

thanks for the suggestion..

Yup, I use Application Builder (the GUI app for producing Viewer sites)

I changed my operationallayers code to: <layer type="dynamic" label="layer2" alpha="1.0" url="http://172.30.129.52/arcgis/rest/services/test_pl2b/MapServer" visiblelayers="2" useamf="true" mode="onDemand" visible="true"/>. And it finally shows colors

Now, this presents another "problem"... there is a drop down list that appears. Why cant i use : <layer type="dynamic" label="layer2" alpha="1.0" url="http://172.30.129.52/arcgis/rest/services/test_pl2b/MapServer/2" useamf="true" mode="onDemand" visible="true"/> ? I just want to remove the drop down list...


Thanks
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Haniu,

   Dynamic is for displaying the whole map service and not a single layer. You can use type feature and get that one single layer if you specify your renderer in the XML. It all comes back to you using such an older ArcGIS Server.

Here is an example.
<layer type="feature" label="layer2" alpha="1.0" url="http://172.30.129.52/arcgis/rest/services/test_pl2b/MapServer"
       visiblelayers="2" useamf="true" mode="onDemand" visible="true">
     <uniquevaluerenderer field="type" fielddelimiter=",">
         <uniquevalueinfo value="3" label="Campground">
             <picturemarkersymbol url="assets/images/es.png" />
         </uniquevalueinfo>
         <uniquevalueinfo value="2" label="Contained Fire">
             <picturemarkersymbol url="assets/images/fr.png" />
         </uniquevalueinfo>
         <uniquevalueinfo value="4" label="Damaged Home">
             <picturemarkersymbol url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0/images/7D11DE72" />
         </uniquevalueinfo>
         <uniquevalueinfo value="0" label="Fire Department">
             <picturemarkersymbol url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0/images/86A29AC1" />
         </uniquevalueinfo>
         <uniquevalueinfo value="6" label="Mountain">
             <picturemarkersymbol url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0/images/41B1D33E" />
         </uniquevalueinfo>
         <uniquevalueinfo value="5" label="Ranger Station">
             <picturemarkersymbol url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0/images/EEA508E3" />
         </uniquevalueinfo>
         <uniquevalueinfo value="1" label="Shelter">
             <picturemarkersymbol url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0/images/B0F5149C" />
         </uniquevalueinfo>
    </uniquevaluerenderer>
</layer>


or

<layer type="feature" label="layer2" alpha="1.0" url="http://172.30.129.52/arcgis/rest/services/test_pl2b/MapServer"
       visiblelayers="2" useamf="true" mode="onDemand" visible="true">
     <simplerenderer>
      <simplemarkersymbol style="triangle" color="0xFF0000" alpha="1" size="40">
         <outline width="2" color="0x0000FF" style="dashdot"  />
      </simplemarkersymbol>
   </simplerenderer>
</layer>
0 Kudos
HaniuHokkaido
New Contributor III
Thanks for the info Robert...I just knew that Dynamic is for displaying the whole map service.

Many thanks
0 Kudos