Total Pageviews

Monday, May 26, 2014

Event mapAddress

Event mapAddress
សំរាប់ mapTap event បង្កើតឡើងដោយ asynchronously in response ក្នុងការ call to a tap event ទៅលើ map view។ មិនមានលើ Corona Simulator
នេះជា Properties របស់វា
event.latitude
នេះជា latitude គិតជា degrees tapped location
event.longitude
នេះជា longitude គិតជា degrees of tapped location
សូមមើលកូដះ
local function mapTapListener( event )
    -- handle mapTap event here
    print( "The tapped location is in: " .. event.latitude .. ", " .. event.longitude )
end

-- Create a native MapView (requires XCode Simulator build or device build)
-- You can create multiple maps, if you like...
local myMap = native.newMapView( 20, 20, 300, 220 )

-- Initialize map to a real location, since default location (0,0) is not very interesting
myMap:setCenter( 37.331692, -122.030456 )
myMap:addEventListener("mapTap", mapTapListener)


No comments:

Post a Comment