I’m using MapSuite 4.0 and can import a GeoJPG, TIF, GIF, etc. with this basic code below. How can I also overlay a .NTF file on my map?
Private Sub addImageLayer(ByVal strImageFilename As String, ByVal zoomToImage As Boolean)
Try
Dim UserImageLayer As New GdiPlusRasterLayer(strImageFilename)
UserImageLayer.UpperThreshold = Double.MaxValue
UserImageLayer.LowerThreshold = 0
Dim staticOverlay As New LayerOverlay()
staticOverlay.Layers.Add(“UserImageLayer”, UserImageLayer)
staticOverlay.Layers(“UserImageLayer”).Transparency = trkImageTransparency.Value
Map1.Overlays.Add(“UserImageLayer”, staticOverlay)
If zoomToImage Then
’ Set the map’s current extent (zoom to the new image)
UserImageLayer.Open()
Map1.CurrentExtent = UserImageLayer.GetBoundingBox
UserImageLayer.Close()
End If
Map1.Refresh()
Catch ex As Exception
MsgBox("Error loading imagery: " + ex.Message, MsgBoxStyle.Exclamation)
End Try