How to display shapefiles

I have 3 data files which are:

  • .shp
  • .shx
  • .dbf

I need to display these files in the map.
Is it possible tp render these three files in the map by using MapWindow?
I could load .shp file but I am not sure about .shx, .dbf files.

Hello @Kayumiy, and welcome.

Those 3 files are the minimum required (e.g. they all have to exist), but you only have to open the Shapefile (.shp), and the others will be opened internally by the library.

You can use the FileManager OpenShapefile method, or the Shapefile Open method.

If you want to go straight to the map to add the layer, you can simply call axMap.AddLayerFromFilename, which will open the Shapefile and add it to the map in one call.


1 Like