Total Pageviews

Saturday, May 24, 2014

Event Map Address in detail (2)

event.countryCode
ជាពត័មានលំអិតរបស់ country code abbreviation
សូមមើលកូដះ
-- Create a native MapView (requires XCode Simulator build or device build)
-- You can create multiple maps, if you like...
local myMap = native.newMapView( 2020300220 )
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.countryCode )
end

myMap:nearestAddress( 38.898748, -77.037684, mapAddressHandler )

event.country
ជាឈ្មោះរបស់ប្រទេស
សូមមើលកូដះ
-- Create a native MapView (requires XCode Simulator build or device build)
-- You can create multiple maps, if you like...
local myMap = native.newMapView( 2020300220 )
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, mapAddressHandler )

event.errorMessage
event.isError
event.name
event.postalCode
event.region
event.regionDetail
event.street
event.streetDetail

សូមមើលកូដះ
-- Create a native MapView (requires XCode Simulator build or device build)
-- You can create multiple maps, if you like...
local myMap = native.newMapView( 2020300220 )
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, mapAddressHandler )


No comments:

Post a Comment