UploadSpecification Class
UploadSpecification Class
Contains the location data upload specification for a data upload job.
Public Class UploadSpecification Inherits System.Object
[C#]
public class UploadSpecification : System.Object
Public Constructors
Name | Description |
---|---|
UploadSpecification Constructor | Initializes a new instance of the UploadSpecification class. |
Public Properties
Name | Description |
---|---|
DataSourceName | Represents the name of the data source (DataSource.Name property) that the point-of-interest data is being uploaded to. |
EntityTypeName | Represents the name of the entity type (EntityType.Name property) of the data that is being uploaded. |
Environment | Indicates which MapPoint Web Service environment should be used for the data upload. The default value is Staging. |
MaximumGeocodingLevel | Indicates the maximum geocoding level (GeocodingLevel enumeration) to be used to geocode the point-of-interest data. The default geocoding level is street name (and number). |
RejectAmbiguousGeocodes | Indicates whether ambiguous addresses should be skipped or whether they should be assigned the latitude and longitude of the first address that matches the record. |
GeometryType | Specifies whether the data is point data or polygon data (GeometryType enum). |
Example
[Visual Basic]
'Create an instance of the customer data service proxy.
Dim custDataService As CustomerDataService = New CustomerDataService
'Assign your credentials.
custDataService.Credentials = _
New NetworkCredential(myUserName, mySecurePassword, myDomainName)
'Set PreAuthenticate to True
custDataService.PreAuthenticate = True
Try
'Define an upload specification object
'and assign all required fields.
Dim uploadSpec As UploadSpecification = New UploadSpecification
uploadSpec.DataSourceName = myDataSourceName
uploadSpec.EntityTypeName = myEntityTypeName
uploadSpec.Environment = LocationDataEnvironment.Staging
uploadSpec.MaximumGeocodingLevel = GeocodingLevel.City
uploadSpec.RejectAmbiguousGeocodes = False
uploadspec.GeometryType = GeometryType.Polygon
'Start an upload job and obtain the job ID.
Dim jobID As String = custDataService.StartUpload(uploadSpec)
Catch e As Exception
Dim message As String = e.Message
'Do your exception handling here.
End Try
[C#]
//Create an instance of the customer data service proxy.
CustomerDataService cds = new CustomerDataService();
//Assign your credentials.
cds.Credentials = new System.Net.NetworkCredential(myUserName,
mySecurePassword, myDomainName);
//Set PreAuthenticate to true
cds.PreAuthenticate = true;
try
{
//Define an upload specification object
//and assign all required fiecds.
UploadSpecification uploadspec = new UploadSpecification();
uploadspec.DataSourceName = myDataSourceName;
uploadspec.EntityTypeName = myEntityTypeName;
uploadspec.Environment = LocationDataEnvironment.Staging;
uploadspec.MaximumGeocodingLevel = GeocodingLevel.City;
uploadspec.RejectAmbiguousGeocodes = false;
uploadspec.GeometryType = GeometryType.Polygon;
//Start an upload job and obtain the job ID.
string jobID = cds.StartUpload(uploadspec);
}
catch(Exception ex)
{
string message = ex.Message;
//Do your exception handling here.
}
See Also
CustomerDataService Class | CustomerDataService.StartUpload Method