Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TdxMapItemFileLayer.LoadShapeFileFromStream(TStream,TStream,TStream) Method

Loads Esri shapefile vector data (shapes, their attributes, and encoding) from specified streams.

#Declaration

Delphi
procedure LoadShapeFileFromStream(ASHPStream: TStream; ADBFStream: TStream; ACPGStream: TStream); overload;

#Parameters

Name Type Description
ASHPStream TStream

The file stream with SHP file content.

ADBFStream TStream

The file stream with DBF file content.

ACPGStream TStream

The file stream with CPG file content.

#Remarks

This method does the following:

  • Sets the FileType property to miftShape.

  • Loads shapes, their attributes, and a code page from the SHP, DBF, and CPG file streams passed as the AShpStream, ADbfStream, and ACpgStream parameters. The LoadShapeFileFromStream uses the loaded code page to interpret content of the loaded DBF file. If an exception occurs during this operation, the layer’s MapItems collection is cleared.

  • Populates the layer’s MapItems collection and map item Attributes collections with map items and attributes that are created based on the loaded data.

  • Sets the Active property to True if data loading succeeds.

See Also