Having Difficulty Identifying points


I am having difficulty identifying points. The points have lines above or below them. I have to Zoom in real close to where the point is away from the line, then I am able t Identify the point.

my code is as follows:

Private Sub Idenfify_Toggle_Button_Click()

' Button - Identify Toggle Button

    Select Case Me.Idenfify_Toggle_Button.Value

           Case True
                    Map0.Identifier.IdentifierMode = imAllLayersStopOnFirst
                    Map0.Identifier.OutlineColor = vbYellow
                    Map0.Identifier.HotTracking = True
                    Map0.CursorMode = tkCursorMode.cmIdentify
           Case False
                    Map0.CursorMode = tkCursorMode.cmZoomIn
    End Select

End Sub


Private Sub Map0_ShapeIdentified(ByVal LayerHandle As Long, ByVal shapeIndex As Long, ByVal pointX As Double, ByVal pointY As Double)

' Event code for mouse button click
' and display message box of assets
' description and Spatial ID

    If LayerHandle = -1 Then End
    Dim sf As New MapWinGIS.Shapefile
        Set sf = Map0.Shapefile(LayerHandle)
    If sf.CellValue(Spatial_ID_Field(LayerHandle), shapeIndex) = "" Then End
    search_string = "SpatialID = '" & sf.CellValue(Spatial_ID_Field(LayerHandle), shapeIndex) & "'"

    DoCmd.OpenForm "FRM Map Inventory PopUp", , , search_string

End Sub

Hello stu.

Do you need to be able to Identify all of the layers? Because you could just specify

Map0.Identifier.IdentifierMode = imSingleLayer

Then use the ChooseLayer event to specify the Layer Handle of the point layer. Then it should only identify the points even when in close quarters.

In the mean time, I’ll think about a response if indeed you need to be able to Identify any of the layers.


Hi Jerry

Yes, I need to identify all layers. They are:

  • lines are roads
  • points are bridges

Thanks for your help


I found a solution!!

I found MouseTollerance in the GlobalSettings. This function gets or sets a value which determines how close to a particular object mouse cursor should be in order to select it with mouse click. The default value is 20 (Pixels I assume)

I changed the value to 5 and I now can select the points from a much larger scale of 5 km compared to 18 m before.

This works for me!

Thanks again for your support

Have a Happy New Year


I thought I would add an example of how far I can Zoom out and select a point.

I am able to select any point on the following map. I love it!