CoronaSDK 2013.1120 | Released: 21 May 2013, 2:31pm | What's New | Download Now
These docs are *very* out of date.
You will be redirected to the new docs in a few seconds.
If you are certain you want to see the old docs, click cancel.
Cancel | Continue to new docs
You will be redirected to the new docs in a few seconds.
If you are certain you want to see the old docs, click cancel.
Cancel | Continue to new docs
event.country
Description:
Gets the country name in response to a myMap:nearestAddress() call.
Syntax:
county = event.county
Example:
-- Create a native MapView (requires XCode Simulator build or device build) -- You can create multiple maps, if you like... -- myMap = native.newMapView( 20, 20, 300, 220 ) myMap.mapType = "standard" -- other mapType options are "satellite" or "hybrid" -- The MapView is just another Corona display object, and can be moved or rotated, etc. myMap.x = display.contentWidth / 2 myMap.y = 120 -- Initialize map to a real location, since default location (0,0) is not very interesting myMap:setCenter( 37.331692, -122.030456 ) local function mapAddressHandler( event ) -- handle mapAddress event here print( "The specified location is in: " .. event.city .. ", " .. event.country ) end myMap:nearestAddress( 38.898748, -77.037684 ) Runtime:addEventListener( "mapAddress", mapAddressHandler )
Parameters:
None.
Returns:
String
Returns county as a string.
Remarks:
This API is not available in Corona Simulator.
Supported on operating systems and platforms for build numbers shown:
- Mac OS X:--
- Windows:--
- iOS:Build 2011.268
- Android:--