Disabling the basemap,

1499
2
06-05-2013 11:49 PM
JamalNUMAN
Legendary Contributor
Disabling the basemap,

I couldn???t figure out how the base map can be disabled and thus the background for my operational layers is while

[ATTACH=CONFIG]25044[/ATTACH]


Is there way to do so?


Thank you

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
2 Replies
AlexeyTereshenkov
Regular Contributor III
Jamal,

The SL Viewer has been designed to include a basemap and one or more operational layers. A web application built in the Viewer must contain at least one basemap.

A workaround for you would be to publish a map document with an empty or switched off map layer, set the data frame background color to be just slightly different from what white, then publish this map as a service and finally cache this map service in those scales you plan to you use operational layers. This will result in having a basemap which will server just as a white background.

If you don't want to do this, you might just go into the source code of the deployed application with a basemap and then just comment out the piece of code which adds the basemap (you comment out in xml file with the <!-- code -->. The Map.xml file you need to edit is located in the C:\inetpub\wwwroot\Apps\NoBasemap\Config folder by default. This will result in grey background in your application and on top of this grey background your operational layers will be drawn.

I've added the Topographic basemap layer in Builder and thus my code looks like this:
<!--<esri:ArcGISTiledMapServiceLayer ID="Topographic" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer" MinimumResolution="0">
  <esriExtensibility: Document.IsBaseMap>true</esriExtensibility: Document.IsBaseMap>
  <esriMapping:LayerExtensions.LayerName>Terrain</esriMapping:LayerExtensions.LayerName>
  <esriMapping:LayerExtensions.LayerInfos />
  <esriExtensibility:LayerProperties.IsPopupEnabled>true</esriExtensibility:LayerProperties.IsPopupEnabled>
  <esriExtensibility:LayerProperties.IsVisibleInMapContents>true</esriExtensibility:LayerProperties.IsVisibleInMapContents>
</esri:ArcGISTiledMapServiceLayer> -->
0 Kudos
JamalNUMAN
Legendary Contributor
Jamal,

The SL Viewer has been designed to include a basemap and one or more operational layers. A web application built in the Viewer must contain at least one basemap.

A workaround for you would be to publish a map document with an empty or switched off map layer, set the data frame background color to be just slightly different from what white, then publish this map as a service and finally cache this map service in those scales you plan to you use operational layers. This will result in having a basemap which will server just as a white background.

If you don't want to do this, you might just go into the source code of the deployed application with a basemap and then just comment out the piece of code which adds the basemap (you comment out in xml file with the <!-- code -->. The Map.xml file you need to edit is located in the C:\inetpub\wwwroot\Apps\NoBasemap\Config folder by default. This will result in grey background in your application and on top of this grey background your operational layers will be drawn.

I've added the Topographic basemap layer in Builder and thus my code looks like this:
<!--<esri:ArcGISTiledMapServiceLayer ID="Topographic" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer" MinimumResolution="0">
  <esriExtensibility: Document.IsBaseMap>true</esriExtensibility: Document.IsBaseMap>
  <esriMapping:LayerExtensions.LayerName>Terrain</esriMapping:LayerExtensions.LayerName>
  <esriMapping:LayerExtensions.LayerInfos />
  <esriExtensibility:LayerProperties.IsPopupEnabled>true</esriExtensibility:LayerProperties.IsPopupEnabled>
  <esriExtensibility:LayerProperties.IsVisibleInMapContents>true</esriExtensibility:LayerProperties.IsVisibleInMapContents>
</esri:ArcGISTiledMapServiceLayer> -->





Many thanks Alexey for the very useful answer,


I would prefer to go to the very interesting option which is publishing and cashing an empty map. The issue here is that I NEVER succeeded in caching a very simple map with the desired scales.

For example, I wanted to publish and cache the attached map but caching has never completed despite the fact that it took very long time. Could you please help me choosing whatever settings to let this very simple map cached with the desired scales? My settings are shown in the screenshots below:

[ATTACH=CONFIG]25112[/ATTACH], [ATTACH=CONFIG]25113[/ATTACH], [ATTACH=CONFIG]25114[/ATTACH], [ATTACH=CONFIG]25115[/ATTACH]



Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos