Start with a blank map

3220
1
05-22-2014 12:58 PM
HaniDraidi
Occasional Contributor II
How to start my application with a blank map that have no layers? When I create a new app I should choose a �??Web Map�?�, and it can�??t be removed inside the site editor. This is shown in screenshots below.

Regards,

Hani

1- Choosing a map when adding a new Site.

[ATTACH=CONFIG]34024[/ATTACH]

2- The added layer cannot be removed.

[ATTACH=CONFIG]34025[/ATTACH]
0 Kudos
1 Reply
PietaSwanepoel2
Occasional Contributor
Every application needs a base map. This defines the coordinate system, extent, etc

You can implement your own internal cached basemaps and remove all the external basemaps from the application. This will eliminate the need for clients to have access to internet resources.

You can implement an empty basemap (that is cached) and only add that to the application

Visibility in Table of Content can be set here:
Tools -> Manage -> Map Contents -> Hide basemap layer(s)

You can also implement a startup behaviour to show/hide all basemaps when application is loaded by user

            
            Map MyMap = MapApplication.Current.Map;
            LayerCollection MyLayers = MyMap.Layers;
            Layer BaseLayer = null;
            foreach (Layer MyLayer in MyLayers)
            {
                if ((MyLayer is ArcGISTiledMapServiceLayer) || (MyLayer is OpenStreetMapLayer))
                {
                    BaseLayer = MyLayer;
                }
            }
            if (!BaseLayer.Visible)
            {
                BaseLayer.Visible = true;
            }
            else
            {
                BaseLayer.Visible = false;
            }
0 Kudos