# Remove Point shp on map

**URL:** <https://mapwindow.discourse.group/t/remove-point-shp-on-map/425>\
**Category:** Uncategorized\
**Created:** [January 20, 2020, 10:54am UTC](https://mapwindow.discourse.group/t/remove-point-shp-on-map/425 "2020-01-20T10:54:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![james](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@james](https://mapwindow.discourse.group/u/james)\
**Post date:** [January 20, 2020, 10:54am UTC](https://mapwindow.discourse.group/t/remove-point-shp-on-map/425/1 "2020-01-20T10:54:37Z")

</div>

Hello everyone  
I’m trying to made Undo Function.  
So i’m looking for the way to remove point shape on a map.  
Is there any reference for me??

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [January 20, 2020, 11:04pm UTC](https://mapwindow.discourse.group/t/remove-point-shp-on-map/425/2 "2020-01-20T23:04:33Z")

</div>

Hello @james

If you’re doing operations manually, for example, using `EditAddShape` to add the shape, then in your Undo operation, you can use `EditDeleteShape` to remove the shape, passing in the `shapeIndex` that was returned from `EditAddShape`.

If instead you use the [built-in shape editing tools](https://www.mapwindow.org/documentation/mapwingis4.9/class_shape_editor.html#details), there is already a built-in Undo/Redo stack that you can use.

Regards,  
Jerry.

---

<div class="post-metadata">

**Author:** ![james](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@james](https://mapwindow.discourse.group/u/james)\
**Post date:** [January 30, 2020, 5:23am UTC](https://mapwindow.discourse.group/t/remove-point-shp-on-map/425/3 "2020-01-30T05:23:23Z")

</div>

Thank You Jerry.  
I used **shp.DeletePoint(index)** to remove Point SHP. And it works.  
Please let me ask you one more thing.  
I used **DrawLineEX** to connect two Point SHPs.  
How can i do to erase this Line?

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [January 30, 2020, 5:54am UTC](https://mapwindow.discourse.group/t/remove-point-shp-on-map/425/4 "2020-01-30T05:54:56Z")

</div>

Hello @james

Using the Drawing layer, the only way to remove shapes is to clear the entire layer. You would have to keep track of things if you wanted, for instance, to keep your two points - you would have to put them back.

Here are the [Drawing Layer options](https://www.mapwindow.org/documentation/mapwingis4.9/group __map__ drawing__layers.html).

If you [create an in-memory Shapefile](https://www.mapwindow.org/documentation/mapwingis4.9/group __shapefile__ management.html#ga7dab1419ad95274257417ff89519c8fc), and [add it as a map layer](https://www.mapwindow.org/documentation/mapwingis4.9/group __map__ layer__management.html#ga281642a365f309d8df72891f151f3d35), you have much more control over individual shapes.

Regards,  
Jerry.

---

<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/remove-point-shp-on-map/425/5 "2022-01-05T15:08:58Z")

</div>

Closed on January 5, 2022, 3:08pm UTC


