0
我試着去編寫代碼CLLocationCoordinate2DMake
由array
所以LAT改變和長將取決於indxPath
改變... 像我想在這裏:變化CLLocationCoordinate2DMake隨着陣列由indexPath
var Longitude = ["32.101145","32.074961","",""]
var Latitude = ["34.775163","34.781679","","",""]
//What i tried :
let LightHouseLocation = CLLocationCoordinate2DMake(Longitude[indexPath.row],Latitude[indexPath.row])
// Drop a pin
但當然它對我的投擲錯誤。如果有人能幫助我,我將不勝感激,謝謝。
你什麼錯誤?請詳細說明一下。看來你的位置已經到位。下一步是爲你的'LighthouseLocation'配置你的'MKPointAnnotation'(pin)並將它添加到你的地圖中。 –
你爲什麼不有CLLocationCoordinate2D'的'數組,而不是兩個單獨的陣列用於'latitude'和'longitude'? –
顯示你的錯誤,但我想那是因爲你正在傳遞字符串不漂浮,在某些情況下,這些字符串不彩車甚至表示,所以你需要處理的是 – Paulw11