Hit Test Functionality

7 views
Skip to first unread message

Damon Oehlman

unread,
Mar 1, 2011, 8:51:14 PM3/1/11
to ti...@googlegroups.com
Hi All,

Just a quick one to say that I've implemented the ability to detect hovering over a marker in Tile5, and this same functionality will be extended to more generic shapes and paths in the near future.

Currently tap events are reported through the map markers layer through a 'markerTap' event and while this event will remain in place for a little while yet, my current thinking is that a more generic events should be reported at the view level.

I have put together a demo of the proposed functionality:


Essentially, a view can fire various types of 'hit' events (currently hoverHit and tapHit) and this event reports a number of objects that have been captured in the hit or hover.  To allow you to programmatically handle the various types of objects that can be hit this array is not simply the raw object types, but rather an object literal containing type and data attributes, see the implementation in markerlayer.js for an example:


Pretty interested in feedback on this as from what I have seen of people's Tile5 projects / experiments, tapping, hovering, and all that fun stuff are pretty core to what most of you are doing.

Thanks for coming along for this crazy HTML5 mapping ride :)

Cheers,
Damon.
Reply all
Reply to author
Forward
0 new messages