Esempio n. 1
0
 /// <remarks/>
 public System.IAsyncResult BeginCalculateSimpleRoute(LatLong[] latLongs, string dataSourceName, SegmentPreference preference, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("CalculateSimpleRoute", new object[] {
                 latLongs,
                 dataSourceName,
                 preference}, callback, asyncState);
 }
Esempio n. 2
0
 /// <remarks/>
 public void CalculateSimpleRouteAsync(LatLong[] latLongs, string dataSourceName, SegmentPreference preference) {
     this.CalculateSimpleRouteAsync(latLongs, dataSourceName, preference, null);
 }
Esempio n. 3
0
 /// <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);
 }
Esempio n. 4
0
 public Route CalculateSimpleRoute(LatLong[] latLongs, string dataSourceName, SegmentPreference preference) {
     object[] results = this.Invoke("CalculateSimpleRoute", new object[] {
                 latLongs,
                 dataSourceName,
                 preference});
     return ((Route)(results[0]));
 }
Esempio n. 5
0
 /// <remarks/>
 public System.IAsyncResult BeginConvertToPoint(LatLong[] latLong, MapView view, int width, int height, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("ConvertToPoint", new object[] {
                 latLong,
                 view,
                 width,
                 height}, callback, asyncState);
 }
Esempio n. 6
0
 /// <remarks/>
 public void GetLocationInfoAsync(LatLong location, string dataSourceName, GetInfoOptions options) {
     this.GetLocationInfoAsync(location, dataSourceName, options, null);
 }
Esempio n. 7
0
 /// <remarks/>
 public void GetGreatCircleDistancesAsync(LatLong[] latLongs, object userState) {
     if ((this.GetGreatCircleDistancesOperationCompleted == null)) {
         this.GetGreatCircleDistancesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetGreatCircleDistancesOperationCompleted);
     }
     this.InvokeAsync("GetGreatCircleDistances", new object[] {
                 latLongs}, this.GetGreatCircleDistancesOperationCompleted, userState);
 }
Esempio n. 8
0
        /// <summary>
        /// This method approximates an address from a LatLong
        /// </summary>
        /// <param name="aLatLong">a LatLong</param>
        /// <returns></returns>
        public Address GetAddress(LatLong aLatLong)
        {
            Location location = null;

            try
            {
                location = FindLocation(aLatLong);

                return location.Address;

            }
            catch (ArgumentNullException e)
            {
                throw e;  // rethrow for app to handle
            }
            catch (Exception e)
            {
                throw e;  // rethrow for app to handle
            }
        }
Esempio n. 9
0
 /// <remarks/>
 public System.IAsyncResult BeginGetGreatCircleDistances(LatLong[] latLongs, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("GetGreatCircleDistances", new object[] {
                 latLongs}, callback, asyncState);
 }
Esempio n. 10
0
 /// <remarks/>
 public void GetGreatCircleDistancesAsync(LatLong[] latLongs) {
     this.GetGreatCircleDistancesAsync(latLongs, null);
 }
Esempio n. 11
0
 public double[] GetGreatCircleDistances(LatLong[] latLongs) {
     object[] results = this.Invoke("GetGreatCircleDistances", new object[] {
                 latLongs});
     return ((double[])(results[0]));
 }
Esempio n. 12
0
 /// <remarks/>
 public void ConvertToPointAsync(LatLong[] latLong, MapView view, int width, int height, object userState) {
     if ((this.ConvertToPointOperationCompleted == null)) {
         this.ConvertToPointOperationCompleted = new System.Threading.SendOrPostCallback(this.OnConvertToPointOperationCompleted);
     }
     this.InvokeAsync("ConvertToPoint", new object[] {
                 latLong,
                 view,
                 width,
                 height}, this.ConvertToPointOperationCompleted, userState);
 }
Esempio n. 13
0
 /// <remarks/>
 public void ConvertToPointAsync(LatLong[] latLong, MapView view, int width, int height) {
     this.ConvertToPointAsync(latLong, view, width, height, null);
 }
Esempio n. 14
0
 /// <remarks/>
 public void CalculateSimpleRouteAsync(LatLong[] latLongs, string dataSourceName, SegmentPreference preference, object userState) {
     if ((this.CalculateSimpleRouteOperationCompleted == null)) {
         this.CalculateSimpleRouteOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCalculateSimpleRouteOperationCompleted);
     }
     this.InvokeAsync("CalculateSimpleRoute", new object[] {
                 latLongs,
                 dataSourceName,
                 preference}, this.CalculateSimpleRouteOperationCompleted, userState);
 }
Esempio n. 15
0
 public Location[] GetLocationInfo(LatLong location, string dataSourceName, GetInfoOptions options) {
     object[] results = this.Invoke("GetLocationInfo", new object[] {
                 location,
                 dataSourceName,
                 options});
     return ((Location[])(results[0]));
 }
Esempio n. 16
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
        }
Esempio n. 17
0
 /// <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);
 }
Esempio n. 18
0
        /// <summary>
        /// This method turns a LatLong into a zip code
        /// </summary>
        /// <param name="aLatLong">LatLong object</param>
        /// <returns>string</returns>
        public string GetPostalCode(LatLong aLatLong)
        {
            Address address;

            try
            {
                address = GetAddress(aLatLong);
                if (address != null)
                    return address.PostalCode;
                else
                    return null;
            }
            catch (ArgumentNullException e)
            {
                throw e;  // rethrow for app to handle
            }
            catch (Exception e)
            {
                throw e;  // rethrow for app to handle
            }
        }
Esempio n. 19
0
 public PixelCoord[] ConvertToPoint(LatLong[] latLong, MapView view, int width, int height) {
     object[] results = this.Invoke("ConvertToPoint", new object[] {
                 latLong,
                 view,
                 width,
                 height});
     return ((PixelCoord[])(results[0]));
 }