Results 1 to 6 of 6

Thread: Click event on BasicTiledImageLayer

  1. #1
    Junior Member
    Join Date
    Feb 2012
    Location
    Brest, Brittany, France
    Posts
    19

    Default Click event on BasicTiledImageLayer

    Hi,

    Is it possible to catch an event when click on BasicTiledImageLayer ?

    Thanks

  2. #2
    Senior Member heidtmare's Avatar
    Join Date
    Feb 2008
    Location
    Melbourne, FL, USA
    Posts
    685
    Go To My Homepage: Go to heidtmare's homepage

    Default

    you can add a mouselistener to the inputhandler

  3. #3
    Junior Member
    Join Date
    Feb 2012
    Location
    Brest, Brittany, France
    Posts
    19

    Default

    Ok, but what do you mean exactly because when I click anywhere I receive the event ? Or I would receive an event only when I click on a BasicTiledImageLayer...
    Maybe I didn't understand something about layers ?

  4. #4
    WW Technical Manager
    Join Date
    May 2007
    Location
    Seattle
    Posts
    1,242
    Go To My Homepage: Go to tag's homepage

    Default

    BasicTiledImageLayer typically covers the terrain. When you click on the layer's imagery the presumption is that you're picking the terrain. There's no mechanism to deliver Select events that indicate a TiledImageLayer was picked.

    If the TiledImageLayer covers a small area then you could place a transparent SurfaceSector over it and that would be delivered as the pick. Picking doesn't honor opacity.

  5. #5
    Junior Member
    Join Date
    Feb 2012
    Location
    Brest, Brittany, France
    Posts
    19

    Default

    Ok, it's exactly what I will do !

    Thanks,

    Kenavo

  6. #6
    WW Technical Manager
    Join Date
    May 2007
    Location
    Seattle
    Posts
    1,242
    Go To My Homepage: Go to tag's homepage

    Default

    When you set the surface shape's opacity, be sure to use a very small value that's not 0. There's a bug in the code that prevents a surface shape whose opacity is 0 from being picked. Try 0.00000001.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •