Tatukgis, save and load layer properties

If anyone has experience with TatukGIS developer core product, can you explain how to programmatically save and load layer properties, such as in their free TatukGIS viewer product?

I used Delphi 7 environment and BDS 2006

thank

Edit this code doesn't work:


var
  lyrPeta: TGIS_LayerSHP;
begin
  MapPath:= ExtractFilePath(Application.ExeName) + '\maps\';
  lyrPeta:= TGIS_LayerSHP.Create;
  lyrPeta.Path:= MapPath + 'jabodetabek'+'_asjalan.shp';
  lyrPeta.Name:= 'jabodetabek'+'_asjalan.shp';
  lyrPeta.IgnoreShapeParams:= True;
  lyrPeta.UseConfig:= True;
  lyrPeta.ConfigName:= MapPath + 'jalan.ini';
  lyrPeta.ReadConfig;
  GIS_Viewer.Add(lyrPeta);

      



+2


source to share


1 answer


We do this as shown below in VB6. I think our code was originally based on this FAQ entry . It makes a Tatuk control by saving an INI file with layer properties. I believe it will automatically reload the layer properties when the application starts up again. If you only want one file, rather than one file per layer, you can try the TTKGP file.

With layer ' the layer is an XGIS_LayerVector '
  .StoreParamsInProject = False
  .ConfigName = "c:\test\mylayer.ini" ' a separate INI file for each layer '
  .WriteConfig
  .SaveAll
End With

      

EDIT: and loading again - I think this is after the layer is added to the GIS control.



With layer ' the layer is an XGIS_LayerVector '
  .StoreParamsInProject = False
  .ConfigName = "c:\test\mylayer.ini" ' a separate INI file for each layer '
  .RereadConfig
End With

      

IMHO Tatuk's help and samples are hard to understand, although the product itself is quite powerful. It's worth trying the forum for Tatuk questions, although you need a support agreement to access it :(

+3


source







All Articles