Initializes a new instance of the Basemap class from a specified map file (.nmf).
Namespace:
ESRI.ArcGISExplorer.MappingAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.900 (2.0.0.900)
Syntax
Parameters
- path
- Type: System..::.String
The path to a map file (.nmf) containing one or more Basemap layers.
Remarks
If you would like to use one of the preconfigured ArcGIS Online or Bing basemaps you may find the nested type initializers for Basemap..::.ArcGISOnline and Basemap..::.BingMaps useful.
This constructor will not set the Basemap name on initialization; the name will therefore be initialized as a blank string. The Basemap name appears in the ArcGIS Explorer contents window if the Basemap is applied to a map. You can change the Basemap name after construction by setting Basemap.Name property.
Examples
The code below demonstrates alternative ways to initialize a Basemap variable, using the overloaded constructors and the nested type initializers
on the Basemap class.
CopyC#
CopyVB.NET

//Create custom basemap using an existing map file Basemap customBasemap = new Basemap(@"C:\Basemaps\RedlandsBasemap.nmf"); //Set the basemap name customBasemap.Name = "Redlands"; //Create custom basemap with a map file and specified name Basemap basemapWithName = new Basemap(@"C:\Basemaps\RedlandsBasemap.nmf", "Redlands"); //Use nested type initializer for Microsoft Bing Aerial photography Basemap virtualEarthAerial = Basemap.BingMaps.Aerial; //Apply any basemap to the current map, in this case Virtual Earth imagery ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map.Basemap = virtualEarthAerial;

'Create custom basemap using an existing map file Dim customBasemap As New Basemap("C:\Basemaps\RedlandsBasemap.nmf") 'Set the basemap name customBasemap.Name = "Redlands" 'Create custom basemap with a map file and specified name Dim basemapWithName As New Basemap("C:\Basemaps\RedlandsBasemap.nmf", "Redlands") 'Use nested type initializer for Microsoft Bing Aerial photography Dim virtualEarthAerial As Basemap = Basemap.BingMaps.Aerial 'Apply a basemap to the current map, in this case Bing Aerial photography ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map.Basemap = virtualEarthAerial