Select to view content in your preferred language

Ability to turn off all base mapping in flex viewer 2.5

2286
4
05-23-2013 07:56 AM
HarrietMcQuade
Emerging Contributor
Hello.

I have a request from a user that would like to be able to switch all base mapping off completely. In order to view one of the dynamic layers on its own.
Is there a button or widget I can add to the viewer to turn all layers shown in my map switcher off completely so that I just get white space?
I am using version 2.5 of the viewer, ArcGIS Server 10 and compiled code.

I know it is a bit of a strange request but if anyone can help me I would appreciate it.

Harriet
Tags (2)
0 Kudos
4 Replies
MayJeff
Deactivated User
I am using flexviewer 3.2.  I set addarcgisbasemaps to false and also comment out basemap on config.xml.  see below:
<map wraparound180="true" initialextent="-14083000 3139000 -10879000 5458000" fullextent="-20000000 -20000000 20000000 20000000" top="40" addarcgisbasemaps="false" esrilogovisible="false">

        <!--basemaps>
            ...
        </basemaps-->
        <operationallayers>
            ...
        </operationallayers>
</map>

Thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Harriet,

  This question has been answered a few times in the forums.

All you need to do is add a basemap with a blank url.

<basemaps>
        <layer label="Aerial" type="tiled" visible="true" alpha="1" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" icon="assets/images/basemap_imagery.jpg" />
        <layer label="Blank" type="dynamic" visible="false" url="" />    
</basemaps>

Assuming you are using the maps addarcgisbasemaps="true" then you need to specify your default basemap you want selected as I have above by putting the Aerial basemap.
0 Kudos
AnthonyGiles
Honored Contributor
Harriet,

If you want to give the user the ability to tone down the base map to Gray scale or desaturated, or turn off the base map completely then I have published a widget here:

http://www.arcgis.com/home/item.html?id=3d1ea673ad15413db81262a4e73184ac

Regards

Anthony
0 Kudos
RhettZufelt
MVP Notable Contributor
The method Robert mentioned doesn't work for me as I want my blank one listed first in the list.  If done with a blank URL, I don't get the tile info, and the other tiled layers error out.

What I have done is create an empty ArcMap (actually, one layer with color = null) document in my wkid, then published to a service, and created the same cache tiles as the rest of my map.  Works like a charm.

R_
0 Kudos