Type Boolean Event mapLocation Revision Release 2024.3703 Keywords mapLocation, isError
Indicates whether the server returned an error rather than a location.
Normally this will be false
, but in the error case it will be true
(and the other event attributes will be empty). event.errorMessage will contain a string describing the error.
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 )