Treat map markers as display objects

It would be really great to treat map markers as special display objects. And then be able to add them to a map just as we can add display objects to the physics object. For example (note the added userID property):

local myMarker = display.newMapmarker( "mappin.png")
myMap:addMarker( myMarker, latitude, longitude, { title="Displayed Title", subtitle="subtitle text", userID=id } )

Then we could add event listeners, like this:

myMarker:addEventListener( "touch", onTouch )

And have other functions like:

myMarker:removeSelf( )

views:1841 update:2011/9/18 14:43:09
corona forums © 2003-2011