Select to view content in your preferred language

Colors for basemap

1847
5
03-24-2014 09:35 AM
DonMorgan
Emerging Contributor
I am in the process of learning the javascript API and ArcGIS.  My knowledge base is growing slowly and I have been able to start building a map that will hopefully be my final solution.  I really need to modify the background color of the basemap.  I am using the streets basemap.  I can't figure out what I need to do to change it's background color.  I'm sure it's an easy fix but so far I have not been able to find the right solution in the documentation.  Can someone suggest how I go about making this happen?  Even a reference to the proper documentation would be great.  Thanks for your time and assistance.
0 Kudos
5 Replies
Noah-Sager
Esri Regular Contributor
Hi Don,

Welcome to Esri Forums! Thank you for posting your question here.

I don't think it is possible to modify the background color of an ArcGIS Online basemap. I assume you are referring to the standard basemaps set in the map constructor? One option for you would be to publish your own custom tiled map service as a basemap in ArcMap.

Another option, probably less desirable, would be to set the transparency of the basemap using the ArcGISTiledMapServiceLayer class, so that another layer may show through more easily.

Hope this helps!

-Noah
0 Kudos
JeffPace
MVP Alum
unfortunately, because the basemaps are prerendered tiles, you cannot override the colors.

You can either modify your overlay to be better seen, or build your own basemap

As a last resort, you could access the url of the rest endpoint of the streetmap as a dynamiclayer, and use layerdrawingoptions to override the individual layers (not even sure this is allowed on the basemap)

However if you choose the last resort, rendering will be SLOW AS DIRT.
0 Kudos
DonMorgan
Emerging Contributor
Thank you both for your responses.  I certainly don't want to slow the web page down any more than I have to.  The website is way to busy for that.  For the moment I'll work around the issue.  But I think a custom base map will be the eventual solution. 

I really hate asking these dumb questions but sometimes you have to spend hours and even days finding the obvious (to folks experienced with the api) answers to the simple questions.
0 Kudos
Noah-Sager
Esri Regular Contributor
No worries Don, it's good to ask questions. This forum is for users of all levels, so your question here may help another user in the future.

Also, please feel free to mark any posts as helpful (up arrow) or answers (checkmark) to your original question.
0 Kudos
JeffPace
MVP Alum
We are happy to help.

I find that most users try to conform to the out of the box offerings (basemaps, etc..) and as they get more experienced in the api eventually migrate to custom products.
0 Kudos