Downloading a Location Data Source Using the Command Line
IMPORTANT: MapPoint Web Service was retired on November 18, 2011. Please see https://msdn.microsoft.com/en-us/library/dd877180.aspx for a list of current Bing Maps APIs.
You can download a location data source file from MapPoint Web Service by using the Data Download Client sample (DataDownloadCS.exe), a command-line tool that you can run on a one-time basis or as a scheduled task. To run the Data Download Client tool, navigate to the directory containing DataDownloadCS.exe, and then type DataDownloadCS.exe, followed by the options and flags described in this topic. You can also create a batch file containing the command line and schedule a task to run it.
You can also download location data source files from MapPoint programmatically by using the Customer Data Service download methods (the best option for automating regular downloads). For more information about the Customer Data Service download methods and to download DataDownloadCS.exe, see Programming with MapPoint Web Service Customer Data Download Methods.
You can run a maximum of 50 data jobs in a 24-hour period. A data job consists of uploading or replacing a polygon or location data source, copying a polygon or location data source from one environment to the other, or creating a downloadable file from a location data source. When you create a downloadable file, you can retrieve it as many times as necessary without affecting the 50-job limit.
The following sections describe the syntax, options, and flags for DataDownloadCS.exe. The options and flags are capitalized for readability. They are not case-sensitive.
Syntax
DownloadCS.exe /UserName %1 /Password %2 /DataSource "yourdatasource" /FileFormat "fileformatname" /EntityType "yourentitytype" /Environment "environment" /FilePath "yourfilepath.txt" /Verbose /Compress /Help
Options
UserName Your user name for Bing Maps (required).
Password Your password for Bing Maps (required).
DataSource The name of the data source you are downloading (required).
FileFormat The format for the downloadable file. Valid values are:
AccessXml2003 The file is in Microsoft Access® 2003 format. This is the default file format.
AccessXml2002 The file is in Access 2002 format.
TabDelimitedTextLatin1 The file is in tab-delimited format with Latin 1 (ISO 8859-1) encoding.
TabDelimitedTextUTF8 The file is in tab-delimited format with UTF-8 (ISO 10646-1:2000 Annex D) encoding.
PipeDelimitedTextLatin1 The file is in pipe-delimited format with Latin 1 (ISO 8859-1) encoding.
PipeDelimitedTextUTF8 The file is in pipe-delimited format with UTF-8 (ISO 10646-1:2000 Annex D) encoding.
CommaDelimitedTextLatin1 The file is in comma-delimited format with Latin 1 (ISO 8859-1) encoding.
CommaDelimitedTextUTF8 The file is in comma-delimited format with UTF-8 (ISO 10646-1:2000 Annex D) encoding.
EntityType The entity type for the entities in the data source (required).
Environment The environment from which to download the data. Valid values are service (default) for the production environment and staging for the staging environment.
FilePath A valid local path for the file (required). The path must include the local file name. If a file with the same name already exists, it will be overwritten. When specifying a file name, ensure that the extension that you use is the standard extension for the specified file format. Otherwise, the extension will not match the file format. If you use the Compress option, the file extension will always be .zip regardless of the file format.
Flags
Verbose Writes the status of the download job to the console.
Compress Compresses the file, regardless of format, into a ZIP (.zip) archive.
Help Displays the help for the executable.
Example
The following example downloads a data source for the Fourth Coffee Company.
DataDownloadCS.exe /UserName %1 /Password %2 /DataSource "FourthCoffee.310.espresso" /FileFormat "TabDelimitedTextLatin1" /EntityType "driveup" /Environment "staging" /FilePath "C:\data\espresso.txt" /Verbose
See Also
Concepts
Deleting a Data Source (MapPoint)
Downloading a Location Data Source
Downloading a Location Data Source Using the CSS
Replacing a Data Source
Uploading a Data Source