event.errorMessage

类型 String
事件 mapLocation
修订版 发行版 2024.3703
关键字 mapLocation, errorMessage

概览

如果 event.isErrortrue,则为错误消息。

示例

local function mapLocationHandler( event )
    -- handle mapLocation event here
    if event.isError then
        print( "Error: " .. event.errorMessage )
    else
        print( "The specified string is at: " .. event.latitude .. ", " .. event.longitude )
    end
end

myMap:requestLocation( "1900 Embarcadero Road, Palo Alto, CA", mapLocationHandler )