Select to view content in your preferred language

Flex : opaque background color for a layer

2439
2
04-21-2011 02:26 AM
carinestolz
Emerging Contributor
Hi everyone !

I would like to add a layer (graphicsLayer for example) to my map with an opaque background instead of a transparent background. That layer would overlay the basemap and the basemap would not be visible anymore.

Is that possible with the ArcGIS flex API ?

Many thanks for your help !

Carine
Tags (2)
0 Kudos
2 Replies
DasaPaddock
Esri Regular Contributor
Setting opaqueBackground on the GraphicsLayer won't cover the whole map with the color. Instead you can turn off the base layer and set opaqueBackground on the Map.

Try making these changes to this sample:
http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=AddingGraphics

1. Set the id on the ArcGISTiledMapServiceLayer.
2. Add these lines of code to addSomeMarkers():
tiledLayer.visible = false;
                myMap.opaqueBackground = 0xFF0000;
0 Kudos
carinestolz
Emerging Contributor
It works perfectly 😄

Many thanks for your help !

Carine
0 Kudos