Select to view content in your preferred language

Make canvas colour of AGOL white not grey

920
4
06-26-2018 02:40 AM
MarkCooper5
Frequent Contributor

We have created a cached map service of Ordnance Survey data, which is a mixture of raster and vector data. When zoomed in past 1:5000 it uses MasterMap vector data. The cache is created in mixed format and for these scales it has a transparent background. When this is added to ArcMap or any desktop product it looks great, but in AGOL or Portal it looks terrible as the canvas colour for these porducts, for some reson, is grey, not white.

Does anyone know if it is possible to change the default colour of the canvas in AGOL? ESRI UK's solution was to put a white polygon behind the data, but this forces it to create a jpeg cache, which is of poor quality and much larger than the mixed (png?) version.

The other alternative is to change the css of the app, but that means we need to host it, which isn't ideal.

Tags (1)
4 Replies
by Anonymous User
Not applicable

Are you referring to the light gray canvas base map or the HTML <canvas> element from an application?

If it's an application which one are you using?

0 Kudos
MarkCooper5
Frequent Contributor

Its not the light grey canvas basemap. The problem is the cached basemap has transparency and the background of the webpage shows through. We can change the colour but it means hosting the app.

0 Kudos
KellyGerrow
Esri Alum

Would creating a white Vector Basemap behind your basemap help? With vector tile basemaps, you can update the styling without hosting the data.

https://www.esri.com/arcgis-blog/products/developers/mapping/design-custom-basemaps-with-the-new-arc... 

0 Kudos
MarkCooper5
Frequent Contributor

Thanks - I will give this a go.

However, due to potential (very slight) performance cost, I would still rather change the code to achieve this.  If we edit an app that has been created using an esri template (crowdsource polling), there is a mapDiv in ID in the the css file which allows you to change the background-color. Unfortunately, I cannot find something similar in any of the  WAB developer files.

0 Kudos