0
我有一組座標保存在數組中。我使用反向地理編碼如何給變量座標
我所用的方法,
- (id)initWithCoordinate:(CLLocationCoordinate2D)coordinate altitude:(CLLocationDistance)altitude horizontalAccuracy:(CLLocationAccuracy)hAccuracy verticalAccuracy:(CLLocationAccuracy)vAccuracy timestamp:(NSDate *)timestamp
我需要轉換的緯度,經度CLLocationCoordinate2D。
self.atmLocation.latitude = [tempDict objectForKey:@"Latitude"]; //atmlocation is of type CLLocationCoordinate2D.
這給了我一個錯誤「Expression is not assignable」。如何解決這個問題?如果這不可能比請建議任何其他方式,所以我可以使用外部座標集。
這仍然給了我同樣的錯誤。 – Harsh
將代碼粘貼到創建atmLocation和tempDict的位置。 –
您也可以將tempDict的返回類型轉換爲NSString,然後使用上面的方法。 –