DK11 for Delphi | GisShortestPath.TGIS_ShortestPath.Create | Constructors | Methods | Properties | Events
Create an instance.
// Delphi public constructor Create( const _viewer : IGIS_Viewer );
// C++ Builder Create ( IGIS_Viewer* const _viewer );
Name | Type | Description |
---|---|---|
_viewer | IGIS_Viewer | viewer on which class will be operating. |
This is a simple example to create a TGIS_ShortestPath object.
var rtrObj : TGIS_ShortestPath ; layerSrc : TGIS_LayerVector ; GIS: TGIS_ViewerWnd; begin // let's get a source layer layerSrc := TGIS_LayerVector( TGIS_LayerSHP( GIS.Items[0] ) ) ; if not Assigned( layerSrc ) then exit ; // create a TGIS_ShortestPath object and attatch data from the source layer rtrObj := TGIS_ShortestPath.Create( GIS ) ; rtrObj.LoadTheData( layerSrc ) ; rtrObj.RoadName := 'NAME'; end ;