in my .msd file i have a polygon layer set to 50% transparency.
when i turn it on in the flex 2.2 viewer it is not transparent.
in the rest/services list the transparency is recorded.
any thoughts about why this happening??
thanks
If you only have a single layer in your map service you should turn off that 50% transparency as it serves no real purpose and may slow things down.
var dynLayer:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(url); // set properties dynLayer.imageFormat = "PNG32"; // add layer to map map.addLayer(dynLayer);
<esri:Map id="myMap"> <esri:ArcGISDynamicMapServiceLayer id="dynamicLayer" imageFormat="png32" url="{dynamicLayerUrl}"/> </esri:Map>
<basemaps> <layer label="Streets" type="tiled" visible="true" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/> <layer label="Aerial" type="tiled" visible="false" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/> <layer label="Topo" type="tiled" visible="false" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/> </basemaps> <operationallayers> <layer label="Boundaries and Places" type="tiled" visible="false" url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer"/> <layer label="Fires" type="feature" visible="false" alpha="1" info="widgets/InfoTemplates/SimpleInfoWinWidget.swf" infoconfig="widgets/InfoTemplates/IWT_Fires.xml" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"/> </operationallayers>
<basemaps> <layer label="Streets" type="tiled" visible="true" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/> <layer label="Aerial" type="tiled" visible="false" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/> <layer label="Topo" type="tiled" visible="false" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/> </basemaps> <operationallayers> <layer label="Boundaries and Places" type="tiled" visible="false" url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer"/> <layer label="Fires" type="feature" visible="false" alpha="1" info="widgets/InfoTemplates/SimpleInfoWinWidget.swf" infoconfig="widgets/InfoTemplates/IWT_Fires.xml" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"/> <layer label="MyLayer" type="dynamic" visible="true" imageFormat="png32" url="my layer url"/> </operationallayers>
<operationallayers> <layer label="Meters" type="dynamic" visible="true" imageFormat="png32" url="http://ags2.cdm.com/arcgis/rest/services/Meters/MapServer"> <sublayer id="0" popupconfig="popups/PopUp_AMR.xml"/> <sublayer id="1" popupconfig="popups/PopUp_AMR_PressureZones.xml"/> </layer> </operationallayers>
Find MapManager.mxml in FlexViewer. This file contains layes adding business logic.
As you see, only such types of layers support imageFormat proprty: "dynamic", "image", "arcims", "wms".
You can change/add this property in this file.
More information in Flex API reference.
config.xml file contains information about layers configuration
something like this:
<basemaps> <layer label="Streets" type="tiled" visible="true" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/> <layer label="Aerial" type="tiled" visible="false" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/> <layer label="Topo" type="tiled" visible="false" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/> </basemaps> <operationallayers> <layer label="Boundaries and Places" type="tiled" visible="false" url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/..."/> <layer label="Fires" type="feature" visible="false" alpha="1" info="widgets/InfoTemplates/SimpleInfoWinWidget.swf" infoconfig="widgets/InfoTemplates/IWT_Fires.xml" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"/> </operationallayers>
add imageFormat property to your layer:
<basemaps> <layer label="Streets" type="tiled" visible="true" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/> <layer label="Aerial" type="tiled" visible="false" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/> <layer label="Topo" type="tiled" visible="false" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/> </basemaps> <operationallayers> <layer label="Boundaries and Places" type="tiled" visible="false" url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/..."/> <layer label="Fires" type="feature" visible="false" alpha="1" info="widgets/InfoTemplates/SimpleInfoWinWidget.swf" infoconfig="widgets/InfoTemplates/IWT_Fires.xml" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"/> <layer label="MyLayer" type="dynamic" visible="true" imageFormat="png32" url="my layer url"/> </operationallayers>
Find MapManager.mxml in FlexViewer. This file contains layes adding business logic.
As you see, only such types of layers support imageFormat proprty: "dynamic", "image", "arcims", "wms".
You can change/add this property in this file.
More information in Flex API reference.