DataSourceCapability Enumeration
DataSourceCapability Enumeration
Describes the capabilities of a specified data source (DataSource object).
Public Enum DataSourceCapability Inherits System.Enum
[C#]
public enum DataSourceCapability : System.Enum
Members
The following table lists the values for the DataSourceCapability enumeration.
Name | Description |
---|---|
CanDrawMaps | Indicates whether you can use the RenderServiceSoap.GetBestMapView, RenderServiceSoap.GetMap, RenderServiceSoap.GetLineDriveMap, and FindServiceSoap.GetLocationInfo methods with the specified DataSource object. |
CanFindPlaces | Indicates whether you can use the FindServiceSoap.Find method with the specified DataSource object. |
CanFindNearby | Indicates whether whether you can use the FindServiceSoap.FindByID, FindServiceSoap.FindByProperty, FindServiceSoap.FindNearby, and FindServiceSoap.FindNearRoute methods with the specified DataSource object. You can use the FindByID, FindByProperty, and FindNearRoute methods only with your private point-of-interest data sources and the MapPoint.FourthCoffeeSample data source. |
CanRoute | Indicates whether you can use the RouteServiceSoap.CalculateRoute and RouteServiceSoap.CalculateSimpleRoute methods with the specified DataSource object. |
CanFindAddress | Indicates whether you can use the FindServiceSoap.FindAddress method with the specified DataSource object. |
HasIcons | Indicates whether the specified DataSource object contains icons. |
DataServiceQuery | Reserved. |
Remarks
To return addresses by using the FindServiceSoap.GetLocationInfo method, you must specify a data source that has the CanFindAddress capability.
To return a route map by using the RenderServiceSoap.GetMap method, you must specify a data source that has the CanRoute capability.
You can use the CommonServiceSoap.GetDataSourceInfo and CommonServiceSoap.GetEntityTypes methods with any DataSource object.
When you upload custom icons to your data sources on the MapPoint Web Service servers the HasIcons flag for your data source is automatically set. Likewise, if you delete icons, the HasIcons flag is cleared.
For more information about MapPoint Web Service data sources and their capabilities, see MapPoint Web Service Data Sources and Capabilities.
Example
[Visual Basic]
'Write out each point of interest data source
Dim myDataSources() As DataSource
myDataSources = commonService.GetDataSourceInfo(Nothing)
Dim ds As DataSource
For Each ds In myDataSources
If (ds.Capability And DataSourceCapability.CanFindNearby) Then
Console.WriteLine(ds.Name + " is a point of interest data source.")
End If
Next
[C#]
//Write out each available point of interest data source
DataSource[] myDataSources;
myDataSources = commonService.GetDataSourceInfo(null);
foreach(DataSource ds in myDataSources)
{
if ((ds.Capability & DataSourceCapability.CanFindNearby) == DataSourceCapability.CanFindNearby)
{
Console.WriteLine(ds.Name + " is a point of interest data source.");
}
}
See Also
DataSource Class | RenderServiceSoap Class | FindServiceSoap Class | RouteServiceSoap Class | MapPoint Web Service Data Sources and Capabilities