# Help line with markspoints

**URL:** <https://mapwindow.discourse.group/t/help-line-with-markspoints/324>\
**Category:** MapWinGIS\
**Created:** [October 30, 2019, 11:28pm UTC](https://mapwindow.discourse.group/t/help-line-with-markspoints/324 "2019-10-30T23:28:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luis](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Luis](https://mapwindow.discourse.group/u/Luis)\
**Post date:** [October 30, 2019, 11:28pm UTC](https://mapwindow.discourse.group/t/help-line-with-markspoints/324/1 "2019-10-30T23:28:59Z")

</div>

Hello.  
I need to do something like this, any example you can share me.  
Thanks.  
I did this with GMaps Control, but i want to use Mapwingis to replace him.

 ![Capturatool](https://global.discourse-cdn.com/free1/uploads/mapwindow1/original/1X/be9ee5063b111bf3a306c7dc4e69fd30924b85a3.png)

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [November 1, 2019, 9:39am UTC](https://mapwindow.discourse.group/t/help-line-with-markspoints/324/2 "2019-11-01T09:39:24Z")

</div>

Not sure what you need.  
Do you want to place markers?  
Or lines? Or labels?

You can create a point shapefile, add the points. Set the point style to the marker.  
Here are some examples:

- [Create point shapefile](https://www.mapwindow.org/documentation/mapwingis4.9/_create_point_shapefile_8cs-example.html)
- [Mark points](https://www.mapwindow.org/documentation/mapwingis4.9/_mark_points_8cs-example.html)
- [Showing tooltip](https://www.mapwindow.org/documentation/mapwingis4.9/_tool_tip_8cs-example.html)

---

<div class="post-metadata">

**Author:** ![Luis](https://avatars.discourse-cdn.com/v4/letter/l/3e96dc/32.png) [@Luis](https://mapwindow.discourse.group/u/Luis)\
**Post date:** [November 1, 2019, 5:31pm UTC](https://mapwindow.discourse.group/t/help-line-with-markspoints/324/3 "2019-11-01T17:31:28Z")

</div>

I’m sorry.  
My English is not good.  
I need to do marks with lines joined.  
Thanks for your answerd.

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [November 6, 2019, 1:03pm UTC](https://mapwindow.discourse.group/t/help-line-with-markspoints/324/4 "2019-11-06T13:03:35Z")

</div>

When you look at the ‘Mark points’ example, you see this is the part that is handling the mouse clicks:

```
public void AxMap1MouseDownEvent(object sender, _DMapEvents_MouseDownEvent e)
{
    if (e.button == 1) // left button
    {
        Shapefile sf = axMap1.get_Shapefile(m_layerHandle);
        Shape shp = new Shape();
        shp.Create(ShpfileType.SHP_POINT);
        Point pnt = new Point();
        double x = 0.0;
        double y = 0.0;
        axMap1.PixelToProj(e.x, e.y, ref x, ref y);
        pnt.x = x;
        pnt.y = y;
        int index = shp.numPoints;
        shp.InsertPoint(pnt, ref index);
        index = sf.NumShapes;
        if (!sf.EditInsertShape(shp, ref index))
        {
            MessageBox.Show("Failed to insert shape: " + sf.ErrorMsg[sf.LastErrorCode]);
            return;
        }
        axMap1.Redraw();
    }
}

```

Instead of creating a POINT shapefile you can create a POLYLINE shapefile, create a line with two or more mouse clicks and add that line to the shapefile.

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [January 5, 2022, 3:08pm UTC](https://mapwindow.discourse.group/t/help-line-with-markspoints/324/5 "2022-01-05T15:08:54Z")

</div>


