# TrackOverlay Question

**URL:** <https://community.thinkgeo.com/t/trackoverlay-question/1065>\
**Category:** WinForms\
**Created:** [February 22, 2010, 2:53am UTC](https://community.thinkgeo.com/t/trackoverlay-question/1065 "2010-02-22T02:53:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carol](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@Carol](https://community.thinkgeo.com/u/Carol)\
**Post date:** [February 22, 2010, 2:53am UTC](https://community.thinkgeo.com/t/trackoverlay-question/1065/1 "2010-02-22T02:53:18Z")

</div>

Hello&nbsp;all,

I&nbsp;use&nbsp;sample&nbsp;of&nbsp;[code.thinkgeo.com/projects/show/customtrackline](http://code.thinkgeo.com/projects/show/customtrackline)&nbsp;to&nbsp;create&nbsp;a&nbsp;line&nbsp;trackshape.

and&nbsp;Get&nbsp;all&nbsp;Coordinates&nbsp;of&nbsp;line&nbsp;trackshape&nbsp;as&nbsp;follows&nbsp;code:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Protected&nbsp;Overloads&nbsp;Overrides&nbsp;Function&nbsp;MouseDownCore(ByVal&nbsp;interactionArguments&nbsp;As&nbsp;InteractionArguments)&nbsp;As&nbsp;InteractiveResult

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If&nbsp;interactionArguments.MouseButton&nbsp;\<\>&nbsp;MapMouseButton.Right&nbsp;Then  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Console.Write((interactionArguments.WorldX).ToString&nbsp;&&nbsp;vbNewLine)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Console.Write((interactionArguments.WorldY).ToString&nbsp;&&nbsp;vbNewLine)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; **coordinates**.Add(New&nbsp;Feature(interactionArguments.WorldX,&nbsp;interactionArguments.WorldY))  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;MyBase.MouseDownCore(interactionArguments)

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Else  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RemoveLastVertexAdded()  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;If  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return&nbsp;New&nbsp;InteractiveResult()

&nbsp;&nbsp;&nbsp;&nbsp;End&nbsp;Function

But,&nbsp;how&nbsp;to&nbsp;ended&nbsp;the&nbsp;last&nbsp;track&nbsp;line?

In&nbsp;this&nbsp;sample,&nbsp;I&nbsp;have&nbsp;to&nbsp;double&nbsp;click&nbsp;Mouse&nbsp;button,&nbsp;the&nbsp;track&nbsp;line&nbsp;shape&nbsp;is&nbsp;end.

but&nbsp;it&nbsp;can't&nbsp;get&nbsp;the&nbsp;last&nbsp;coordinate.

If&nbsp;I&nbsp;modify&nbsp;MouseDoubleClickCore&nbsp;like&nbsp;MouseDownCore,&nbsp;I&nbsp;don't&nbsp;know&nbsp;how&nbsp;to&nbsp;end&nbsp;track&nbsp;line&nbsp;shape.

Could&nbsp;you&nbsp;give&nbsp;any&nbsp;idea&nbsp;about:

1.&nbsp;I&nbsp;double&nbsp;click&nbsp;Mouse&nbsp;button,&nbsp;then&nbsp;track&nbsp;shape&nbsp;ended&nbsp;and&nbsp;add&nbsp;its&nbsp;coordinate&nbsp;value&nbsp;to&nbsp; **coordinates**

2.&nbsp;other&nbsp;method&nbsp;about&nbsp;how&nbsp;to&nbsp;end&nbsp;track&nbsp;shape.

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [February 22, 2010, 3:41pm UTC](https://community.thinkgeo.com/t/trackoverlay-question/1065/2 "2010-02-22T15:41:00Z")

</div>

The&nbsp;purpose&nbsp;of&nbsp;the&nbsp;sample&nbsp;Custum&nbsp;Track&nbsp;Line&nbsp;is&nbsp;to&nbsp;shopw&nbsp;how&nbsp;to&nbsp;track&nbsp;a&nbsp;line&nbsp;left&nbsp;clicking&nbsp;and&nbsp;remove&nbsp;the&nbsp;last&nbsp;vertex&nbsp;right&nbsp;clicking.&nbsp;In&nbsp;your&nbsp;case,&nbsp;I&nbsp;don’t&nbsp;understand&nbsp;very&nbsp;well&nbsp;from&nbsp;your&nbsp;explanation&nbsp;what&nbsp;your&nbsp;goal&nbsp;is&nbsp;exactely.&nbsp;I&nbsp;don’t&nbsp;see&nbsp;very&nbsp;well&nbsp;what&nbsp;you&nbsp;are&nbsp;trying&nbsp;to&nbsp;get&nbsp;accomplished&nbsp;with&nbsp;the&nbsp;coordinates&nbsp;collection.&nbsp;What&nbsp;is&nbsp;the&nbsp;purpose&nbsp;of&nbsp;that&nbsp;collection?&nbsp;Thank&nbsp;you.&nbsp;

---

<div class="post-metadata">

**Author:** ![Carol](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@Carol](https://community.thinkgeo.com/u/Carol)\
**Post date:** [February 22, 2010, 7:32pm UTC](https://community.thinkgeo.com/t/trackoverlay-question/1065/3 "2010-02-22T19:32:18Z")

</div>

Thanks&nbsp;for&nbsp;your&nbsp;reply,&nbsp;Val&nbsp;  
&nbsp;Sorry,&nbsp;I&nbsp;explain&nbsp;unclearly.&nbsp;  
&nbsp;I&nbsp;hope&nbsp;I&nbsp;can&nbsp;use&nbsp;trackoverlay&nbsp;tool&nbsp;to&nbsp;draw&nbsp;polygon/line/point&nbsp;on&nbsp;the&nbsp;map&nbsp;and&nbsp;I&nbsp;want&nbsp;to&nbsp;get&nbsp;value&nbsp;of&nbsp;coordinates&nbsp;collection&nbsp;to&nbsp;create&nbsp;new&nbsp;shp&nbsp;file.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Or,&nbsp;you&nbsp;can&nbsp;give&nbsp;me&nbsp;other&nbsp;idea&nbsp;to&nbsp;accomplish&nbsp;this&nbsp;purpose.&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [February 23, 2010, 12:01am UTC](https://community.thinkgeo.com/t/trackoverlay-question/1065/4 "2010-02-23T00:01:06Z")

</div>

Carol,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;think&nbsp;your&nbsp;requrement&nbsp;is&nbsp;not&nbsp;related&nbsp;with&nbsp;this&nbsp;sample,&nbsp;the&nbsp;defaul&nbsp;trackoverlay&nbsp;can&nbsp;fit&nbsp;your&nbsp;requriement.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Trackoverlay&nbsp;has&nbsp;a&nbsp;property&nbsp;called&nbsp;TrackShapeLayer,&nbsp;every&nbsp;shape&nbsp;which&nbsp;you&nbsp;track&nbsp;is&nbsp;stored&nbsp;here,&nbsp;you&nbsp;can&nbsp;get&nbsp;them&nbsp;and&nbsp;save&nbsp;to&nbsp;the&nbsp;new&nbsp;shp&nbsp;files.&nbsp;  
&nbsp;&nbsp;  
&nbsp;If&nbsp;I&nbsp;am&nbsp;misunderstand,&nbsp;please&nbsp;let&nbsp;me&nbsp;know&nbsp;and&nbsp;describe&nbsp;the&nbsp;exactly&nbsp;requirement.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;  
&nbsp;&nbsp;  
&nbsp;James

---

<div class="post-metadata">

**Author:** ![Carol](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@Carol](https://community.thinkgeo.com/u/Carol)\
**Post date:** [February 23, 2010, 12:44am UTC](https://community.thinkgeo.com/t/trackoverlay-question/1065/5 "2010-02-23T00:44:31Z")

</div>

Oh~Thanks&nbsp;a&nbsp;lot,&nbsp;James&nbsp;  
&nbsp;Sorry,&nbsp;I&nbsp;never&nbsp;use&nbsp;TrackOverlay&nbsp;before.&nbsp;:(&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;know&nbsp;how&nbsp;to&nbsp;do&nbsp;it,&nbsp;it&nbsp;works&nbsp;well!&nbsp;:)&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [February 23, 2010, 4:00am UTC](https://community.thinkgeo.com/t/trackoverlay-question/1065/6 "2010-02-23T04:00:38Z")

</div>

Carol,&nbsp;  
&nbsp;&nbsp;  
&nbsp;You’re&nbsp;welcome,&nbsp;I&nbsp;am&nbsp;very&nbsp;glad&nbsp;it’s&nbsp;working&nbsp;with&nbsp;you,&nbsp;hope&nbsp;you&nbsp;can&nbsp;play&nbsp;it&nbsp;very&nbsp;well&nbsp;soon.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;  
&nbsp;&nbsp;  
&nbsp;James
