Hotspots problem

5/30/2014 10:27:23 AM
Total Posts 1

Hotspots problem



I create hotspots but they do not show on map, or I can not click on them, code below

all my layers are created from shape files


In debug I can see the values in the hotspots.addinfo


Private Sub AddTooltips()
    Dim objLayer As clsLayer
    Dim strArgument As String
    Dim strToolTip As String
    Dim intLayerRecord As Integer
    Dim rstAllShapes As AspMap.Recordset


    amMap.TooltipStyle.BackColor = Color.LightYellow
    amMap.TooltipStyle.Width = Unit.Pixel(220)

    For Each amLayer As AspMap.Layer In amMap
      objLayer = objLayerList.Layers.Find(Function(x) x.Name = amLayer.Name)
      If amLayer.Visible AndAlso objLayer.Queryable Then
        rstAllShapes = amLayer.SearchShape(amLayer.Extent, SearchMethod.Inside)
        'rstAllShapes = amMap(amLayer.Name).SearchShape(amMap.Extent, SearchMethod.Inside)
        For intLayerRecord = 0 To rstAllShapes.RecordCount - 1
          strArgument = ""
          strToolTip = ""
          Select Case objLayer.LayerType
            Case AtlasLayerType.Blocks
              strArgument = CStr(rstAllShapes.Fields.Item(11).Value)
              strToolTip = CStr(rstAllShapes.Fields.Item(8).Value)
            Case AtlasLayerType.Discoveries
              strArgument = CStr(rstAllShapes.Fields.Item(4).Value)
              strToolTip = CStr(rstAllShapes.Fields.Item(0).Value)
            Case AtlasLayerType.Fields
              strArgument = CStr(rstAllShapes.Fields.Item(5).Value)
              strToolTip = CStr(rstAllShapes.Fields.Item(0).Value)
            Case AtlasLayerType.PlannedWells
              strArgument = CStr(rstAllShapes.Fields.Item(12).Value)
              strToolTip = CStr(rstAllShapes.Fields.Item(0).Value)
            Case AtlasLayerType.RecentWells
              strArgument = CStr(rstAllShapes.Fields.Item(13).Value)
              strToolTip = CStr(rstAllShapes.Fields.Item(0).Value)
            Case AtlasLayerType.HistoricWells
              strArgument = CStr(rstAllShapes.Fields.Item(13).Value)
              strToolTip = CStr(rstAllShapes.Fields.Item(0).Value)
          End Select
          amMap.Hotspots.AddInfo(rstAllShapes.RecordExtent.Center, 9, strToolTip, strArgument)

      End If
      objLayer = Nothing

end sub









5/30/2014 11:39:17 AM
Total Posts 323

Re: Hotspots problem

This may happen if Map.CoordinateSystem is set to a different coordinate system than the layers. Please provide more information.