ThinkGeo.com    |     Blog    |     Wiki    |     Support

Issue with TrackMode.Line when the mouse leave the map area

Hi,

When the map is in trackmode to create a poly-line, there is a last segment which follows the mouse move. This is good.

However, when the mouse leave the map area, this last segment remain displayed at the last mouse coord.

I need to hide this last segment until the mouse comes back to the map.
I also need to remove this last segment is the user click on a button (eg: Apply)

Any option to proceed ?
any other idea ?

thank you
Patrick.

Hi Patrick,

Are you using Desktop Edition?

I think you should want to add the mouseleave event for the map control.

Then handle the last feature in TrackOverlay.

Regards,

Don

Hi Don,

yes, I’m using the desktop edition for this question.
ok to handle the mouseleave, but do you have a suggestion to handle the lastsegment ?

Thank’s
Patrick.

Hi Patrick,

You can get the feature from TrackOverlay, it should be a line, I think you can directly remove its end vertex.

Regards,

Don

Don,

no it does not work. The last vertex is the last clicked one;
I need to remove the segment between the last clicked vertex and the mouse.

Any suggestion is welcome.

Patrick.

Hi Patrick,

The last segment looks hadn’t been removed should because you hadn’t update the track shape in track overlay.

If you complete the track, you can remove this feature and move the feature into your other layer.

Regards,

Don