Quantcast
Channel: MapWinGIS ActiveX Map and GIS Component
Viewing all articles
Browse latest Browse all 2341

New Post: Problems to add shapefile in a map

$
0
0
Thanks a lot,Paul.

I upgraded my binaries,but the same error occurred,
And MapWindow GIS has no problem.

My souce code is very simple.

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    LoadData()

End Sub

Private Sub LoadData()

    Dim sfWorld As New MapWinGIS.Shapefile

    OpenFileDialog1.Filter = "Shape Files (.shp)|*.shp|All Files (*.*)|*.*"
    If OpenFileDialog1.ShowDialog = DialogResult.OK Then
        sfWorld.Open(OpenFileDialog1.FileName)
        AxMap1.AddLayer(sfWorld, True)
    End If

End Sub

End Class

That's all.

And the Shape file is "world_adm0.shp".It's not special.

If I don't use AxMap,I can debug in IDE and no error.
For example,the code which convert shape file to KML file is OK.

Viewing all articles
Browse latest Browse all 2341

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>