# Tool Identify with ShpfileType.SHP\_POINT

**URL:** <https://mapwindow.discourse.group/t/tool-identify-with-shpfiletype-shp-point/341>\
**Category:** MapWinGIS\
**Created:** [November 13, 2019, 7:51pm UTC](https://mapwindow.discourse.group/t/tool-identify-with-shpfiletype-shp-point/341 "2019-11-13T19:51:10Z")\
**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:** [November 13, 2019, 7:51pm UTC](https://mapwindow.discourse.group/t/tool-identify-with-shpfiletype-shp-point/341/1 "2019-11-13T19:51:10Z")

</div>

Hello.  
I try to identify the shapeindex and layerhandle with the tool identify but dosn’t work and with the ShapeHighlighted works correctly. any idea?  
Thanks.  
i use sf.identificable = true

 ![123](https://global.discourse-cdn.com/free1/uploads/mapwindow1/original/1X/aeeeb1b4c7c241042aa32afe3e25f21153c4ed38.png) ![1234](https://global.discourse-cdn.com/free1/uploads/mapwindow1/original/1X/b4d2b4fd02e6a1162ec45edfb65b9a7d088e5e7f.png) ![12345](https://global.discourse-cdn.com/free1/uploads/mapwindow1/original/1X/081edf5982b52b4690187afbd4c6a0c0d80aa6e1.png)

---

<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:** [November 13, 2019, 11:38pm UTC](https://mapwindow.discourse.group/t/tool-identify-with-shpfiletype-shp-point/341/2 "2019-11-13T23:38:57Z")

</div>

Hello @Luis

I’m guessing that there shapes identified from more than 1 layer. This occurs if the following [IdentifierMode](https://www.mapwindow.org/documentation/mapwingis4.9/_enumerations_8cs.html#a0167e28efbb5899b9c0cb0758b84a10a) is set

```
AxMap1.Identifier.IdentifierMode = tkIdentifierMode.imAllLayers ' all identifiable layers

```

rather than

```
AxMap1.Identifier.IdentifierMode = tkIdentifierMode.imSingleLayer ' shapefile defined by Identifier.ActiveLayer

```

So you probably want to set IdentifierMode equal to imSingleLayer, and set the specific LayerHandle (in your case, 3) into the [Identifier.ActiveLayer](https://www.mapwindow.org/documentation/mapwingis4.9/class_identifier.html#a37432b6c7ac79c084a35fb926315f336) property.

When multiple shapes are identified, you instead need to do something like the following (code is in [VB.NET](http://VB.NET))

```
Private Sub AxMap1_ShapeIdentified(sender As Object, e As AxMapWinGIS._DMapEvents_ShapeIdentifiedEvent)
    Dim shapes As SelectionList = AxMap1.IdentifiedShapes()
    If shapes.Count > 0 Then
        Dim sf As Shapefile = AxMap1.get_Shapefile(e.layerHandle)
        Dim shp As Shape = sf.Shape(e.shapeIndex)
        ...
        ' do something with each shape
        ...
    End If
End Sub

```

See if that’s what is going on.

Regards,  
Jerry.

---

<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 14, 2019, 12:03am UTC](https://mapwindow.discourse.group/t/tool-identify-with-shpfiletype-shp-point/341/3 "2019-11-14T00:03:11Z")

</div>

Thanks @jerryfaust  
I’m sorry, i only have these options in AxMap1.Identifier  
 ![Sin%20t%C3%ADtulo123](https://global.discourse-cdn.com/free1/uploads/mapwindow1/original/1X/3dc58a3b506c4f398fc77a9d2736fe8aed7385f1.png)

Thanks for your time, regards.

---

<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:** [November 14, 2019, 12:38am UTC](https://mapwindow.discourse.group/t/tool-identify-with-shpfiletype-shp-point/341/4 "2019-11-14T00:38:27Z")

</div>

Interesting. It looks like the documentation is out-of-date. I should make a note of that.

Looking at the source code, it looks like if you set

```
AxMap1.Identifier.IdentifierMode = tkIdentifierMode.imSingleLayer

```

then it will select features from the single layer that you specify in the AxMap.ChooseLayer event.

And if you set

```
AxMap1.Identifier.IdentifierMode = tkIdentifierMode.imAllLayersStopOnFirst

```

then the selection will consider all “Identifiable” layers, and stop on the first layer for which shapes are identified.

EIther way, you may get more than 1 shape returned. If only 1 shape is returned, then you can use `e.layerHandle` and `e.shapeIndex` to fetch the shape. However, if more than 1 shape is identified, even if all from one layer, then you will need to iterate the shapes as I outlined in the previous response.

Hope that helps.

---

<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:** [December 4, 2019, 12:38am UTC](https://mapwindow.discourse.group/t/tool-identify-with-shpfiletype-shp-point/341/5 "2019-12-04T00:38:27Z")

</div>

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.
