コード例 #1
0
        /// <summary>
        /// Version of FindLocation that searches using a LatLong object
        /// </summary>
        /// <param name="aLatLong">a LatLong</param>
        /// <returns></returns>
        public Location FindLocation(LatLong aLatLong)
        {
            Location[] location = null;

            try
            {

                if (aLatLong == null)
                {
                    throw new System.ArgumentNullException("LatLong cannot be null");
                }

                //OK find something
                FindSpecification fs = new FindSpecification();
                fs.DataSourceName = "MapPoint.NA";

                LatLong locationLatLong = aLatLong;
                GetInfoOptions infoOptions = new GetInfoOptions();

                location = theMapPointFindService.GetLocationInfo(locationLatLong,
                    MAPPOINT_NA, infoOptions);

            }
            catch (ArgumentNullException e)
            {
                throw e;  // rethrow for app to handle
            }
            catch (Exception e)
            {
                throw e;  // rethrow for app to handle

            }

            return location[0];  // zero position should be the best match
        }
コード例 #2
0
ファイル: Reference.cs プロジェクト: xxjeng/nuxleus
 /// <remarks/>
 public void GetLocationInfoAsync(LatLong location, string dataSourceName, GetInfoOptions options, object userState) {
     if ((this.GetLocationInfoOperationCompleted == null)) {
         this.GetLocationInfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetLocationInfoOperationCompleted);
     }
     this.InvokeAsync("GetLocationInfo", new object[] {
                 location,
                 dataSourceName,
                 options}, this.GetLocationInfoOperationCompleted, userState);
 }
コード例 #3
0
ファイル: Reference.cs プロジェクト: xxjeng/nuxleus
 /// <remarks/>
 public System.IAsyncResult BeginGetLocationInfo(LatLong location, string dataSourceName, GetInfoOptions options, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("GetLocationInfo", new object[] {
                 location,
                 dataSourceName,
                 options}, callback, asyncState);
 }
コード例 #4
0
ファイル: Reference.cs プロジェクト: xxjeng/nuxleus
 /// <remarks/>
 public void GetLocationInfoAsync(LatLong location, string dataSourceName, GetInfoOptions options) {
     this.GetLocationInfoAsync(location, dataSourceName, options, null);
 }
コード例 #5
0
ファイル: Reference.cs プロジェクト: xxjeng/nuxleus
 public Location[] GetLocationInfo(LatLong location, string dataSourceName, GetInfoOptions options) {
     object[] results = this.Invoke("GetLocationInfo", new object[] {
                 location,
                 dataSourceName,
                 options});
     return ((Location[])(results[0]));
 }