Select to view content in your preferred language

How do I change the basemap opacity?

713
5
02-13-2024 01:31 AM
LR2
by
Occasional Contributor

I need to change the transparency of the basemap, but there's no option in the UI and neither appending a parameter to the URL nor trying to edit the MapComponent in C++ got me anywhere. How do I do this?

LR2_0-1707816425939.png

(mind that I just started using Unreal, so you can't be too detailed 😏)

0 Kudos
5 Replies
MichaelBranscomb
Esri Frequent Contributor

Can share any more info about why you want to change the opacity of the basemap? (e.g. for greater contrast with your own overlaid content, to see content beneath the basemap, to see content beneath the terrain/surface...)

The Basemap is a collection of ArcGISLayers, so you could write code to iterate the layers in the collection and set the opacity. Or alternatively, add the layers that you want as your basemap as regular layers via the UI where you can then set the opacity (and remember to set the API key / authentication type). 

The basemaps in the gallery are effectively the basemaps included in the (for developers) group on ArcGIS.com: 

Those services all require a "token" - for more info see access token | Documentation | ArcGIS Developers

piercze
Occasional Contributor

Hi Michael, I am also interested in this solution. I'm attempting to visualize subsurface geological layers which would not be ArcGIS Actors, but normal StaticMeshActors (uassets) that I import manually. I have extensive blueprint experience, but only a bit of C++. Ideally I would like to also expose all of the opacities (also of the Layers within the 'ArcGIS Maps SDK Mode') as parameters so that they can be modified by User Inputs. I want the user to be able to reveal subsurface stratigraphy.

How would I go about setting these opacities as parameters and/or variables?

Thanks!

0 Kudos
piercze
Occasional Contributor

I figured this out. 

You'll need to learn how to spin up scenes using Blueprints. You'll use nodes to pull the maps from the esri server instead of the default Unreal/ArcGIS UI. See here:
https://developers.arcgis.com/unreal-engine/maps/tutorials/display-a-map-bp/

Then you will use nodes like 'Create ArcGIS Image Layer With Properties'. The 'with properties' part is key, because it will give you the ability to convert the opacity of a map into a parameter. I think this should also apply to the basemaps, but I'm not actually sure. If the basemap nodes don't have exposed property functions this should be low-hanging fruit for next update. 

piercze
Occasional Contributor

Also, the basemaps don't seem to be configurable w opacity properties. But I made a workaround. When you build with blueprints by following the tutorial above, you can actually skip the generation of the 'basemap' and just use that same ESRI rest server source link as a normal GIS Image Layer later 'with properties' alongside the new york layers. It will allow you to have an opacity parameter exposable to an input mapping context. However, there are some aesthetic/color issues that you'll have to explore using this method.

piercze
Occasional Contributor

A problem with my current configuration is that I am actually creating a whole set of new map layers every time I want to reveal or hide a specific layer with a key press input. Does anyone know a way to work around this, to be able to adjust the opacity like a normal material, without having to reload the map?

0 Kudos