Jump to content
Software FX Community
pram3dev

HitTest only returns HitType.BackGround

Recommended Posts

Hi ChartFXers,

I'm using the "IL-5 Digit Ungrouped.svg" file as my MapSource.  I am displaying my Map on a TabPage within a TabControl.  However, the default functionality of the Map, where a user can hover over each ZIP code and it becomes highlighted, doesn't seem to work.  When I use other maps, such as "RI-5 Digit Ungrouped.svg", this seems to work fine.

Debugging this I find that on the map's MouseMove event, the HitTest(e.X, e.Y, etc...) always returns a HitType of Background.  I tried calling myMap.BringToFront(), and many other ways of getting the map to redisplay with no solution currently working.

However, if I make the map zoomable (myMap.Zoom = true) and then highlight the entire map as my zoom area, I get the correct behavior.

Any thoughts?  Is this a bug with the .svg file that I can fix?

Thanks!

Share this post


Link to post
Share on other sites

It looks like my problem occurs when the map's Zoom property is set to true.  When it is true, the mouse hover feature doesn't work.  When it is false, the mouse hover feature works, but then I lose the default behavior of the zoom (where dragging the mouse into a rectangle over my map zooms in to that rectangle).

I'd like to have both features work at the same time.  I am now trying to do a combination of setting the Zoom property to true on a MouseDown, recording the coordinates, then waiting for the MouseUp event to fire and using the user32.dll "mouse_enter" event to manually throw mouse events back to my form to basically redraw the rectangle while the map's zoom property is true and let the default behavior take over, but this is proving cumbersome.

I'll post back if I find anything else.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...