Can the map background color be changed from the client side?

605
4
Jump to solution
06-24-2013 10:25 AM
TyroneLigon
Occasional Contributor
I know the map's background color can be set (or changed?) on the server side; is it possible to do the same from the client side? Trying to match the background color of the map to the encompassing application's styles.
0 Kudos
1 Solution

Accepted Solutions
AdamSkoog
New Contributor III
You could try with css. Try overriding the following style:

.map .container {     background-color: <color>; }


It worked on my app when I did it in firebug. However, you will want to set up your map symbology so it doesn't "bleed" through. The map I tested it on looked quite terrible because I have a lot of hollow filled and transparent polygons.

View solution in original post

0 Kudos
4 Replies
TyroneLigon
Occasional Contributor
Did a hack as a workaround for now...created a graphics layer, added 2 polygons to cover the area above and below the North and South poles, respectively.

Would prefer a better solution if possible...
0 Kudos
AdamSkoog
New Contributor III
You could try with css. Try overriding the following style:

.map .container {     background-color: <color>; }


It worked on my app when I did it in firebug. However, you will want to set up your map symbology so it doesn't "bleed" through. The map I tested it on looked quite terrible because I have a lot of hollow filled and transparent polygons.
0 Kudos
TyroneLigon
Occasional Contributor
Much better solution...worked in both our intranet browsers (FF & IE8)
0 Kudos
AdamSkoog
New Contributor III
Glad I could help! 🙂
0 Kudos