當試圖實現兩個點之間的查找路徑,我用this article,但它會產生一個錯誤:錯誤:類型或命名空間找不到
類型或命名空間名稱findroute」找不到(是否缺少using指令或程序集引用?)
using findroute.geocodeservice;
private void Geocode(string strAddress, int waypointIndex)
{
// Here we create the service variable and set the callback method using the GeocodeCompleted property.
findroute.geocodeservice.GeocodeServiceClient geocodeService = new findroute.geocodeservice.GeocodeServiceClient("BasicHttpBinding_IGeocodeService");
geocodeService.GeocodeCompleted += new EventHandler<findroute.geocodeservice.GeocodeCompletedEventArgs>(geocodeService_GeocodeCompleted);
// Here we Set the credentials and the geocode query,which could be an address or location.
findroute.geocodeservice.GeocodeRequest geocodeRequest = new findroute.geocodeservice.GeocodeRequest();
geocodeRequest.Credentials = new Credentials();
geocodeRequest.Credentials.ApplicationId = ((ApplicationIdCredentialsProvider)map1.CredentialsProvider).ApplicationId;
geocodeRequest.Query = strAddress;
// Now Making the asynchronous Geocode request, using the 'waypoint index' as
// the user state to track this request and allow it to be identified when the response is returned.
geocodeService.GeocodeAsync(geocodeRequest, waypointIndex);
}
如何這個問題能解決?
這聽起來像他正在創建的項目的核心命名空間。嘗試你的核心命名空間而不是'findroute'。 – Tejs 2012-04-16 21:36:13
100%true .. thnx ...我覺得很殘留..^_^ – bebadbutneverbesad 2012-04-16 22:21:16