我写了一个方法来从用户那里获取地址信息,然后在谷歌的地图上显示它。这是我写的方法
function doRemoteMapEmployee(e) {
var mapEmployeeAddressLine1 = (EmployeeInfo.at(0).EmployeeAddressLine1 !== null) ? EmployeeInfo.at(0).EmployeeAddressLine1 + ', ' : '',
mapEmployeeAddressLine2 = (EmployeeInfo.at(0).EmployeeAddressLine2 !== null) ? EmployeeInfo.at(0).EmployeeAddressLine2 + ', ' : '',
mapEmployeeAddressLine3 = (EmployeeInfo.at(0).EmployeeAddressLine3 !== null) ? EmployeeInfo.at(0).EmployeeAddressLine3 + ', ' : '',
mapEmployeeAddressCityTown = (EmployeeInfo.at(0).EmployeeAddressCityTown !== null) ? EmployeeInfo.at(0).EmployeeAddressCityTown + ', ' : '',
mapEmployeeAddressZipPostCode = (EmployeeInfo.at(0).EmployeeAddressZipPostCode !== null) ? EmployeeInfo.at(0).EmployeeAddressZipPostCode : '',
address = mapEmployeeAddressLine1 + mapEmployeeAddressLine2 + mapEmployeeAddressLine3 + mapEmployeeAddressCityTown + mapEmployeeAddressZipPostCode;
navigator.app.loadUrl("http://maps.google.co.uk/?q=" + address);
}
当我运行它时,它会给我错误无法调用未定义的方法 loadurl。现在,如果我只是用实际地址替换地址,它会给我同样的错误。知道这里可能出了什么问题吗?