Upgrading

Home
Copyright & Disclaimer
Installation
Object Hierachy
Key Concepts
Main Features
Using the Component
Upgrading

If you are converting an existing program from Version 3 to Version 4 you will notice quite a few changes in the object hierarchy which will stop your application from compiling.

The most obvious change is the introduction of the Globe.Projection object. This object now encapsulates a lot of methods that used to be part of the Globe object itself, for example Scalefactor, DeviceXYtoLL, these should now be specified as Globe.Projection.Scalefactor etc.

A number of properties that have been moved to the Globe.Projection object are now specified in Decimal Degrees rather than GlobeUnits, these properties include XRotation, YRotation, ZRotation, CentralMeridian and CentralParallel

The Globe.ProjectionType property has been removed, instead you should use the Globe.Projection.ProjectionClass property. This is a string property and expects the name of a ProjectionModel class. The standard projections are called TSphericalPrj, TCartesianPrj and TMercatorPrj, therefore to set the globe to the cartesian projection :

  Globe.Projection.ProjectionClass := 'TCartesianPrj';

TGeoDataObjects now belong to a TGlobeObjectSource so when creating new objects call :

  TGeodataObject.Create( aLayer.Objects );

The Globe may not update automatically in some situations as it used to do under version 3. If this happens you can call Globe.RedrawLayers to force an update. Please let me know if you experience this problem.

To find the layer that an object is on you can use the LayerFromObject function which is in the GlobeUtils unit.

 TGeoDataObjects now contain multiple lists of points called chains therefore you now need to specify the chain as well as the point index when working with this object. e.g.

    Obj[3] := PointLL(0,0);

now becomes;

    Obj[0][3] := PointLL(0,0);

The GeoDataObjects now have a Closed property, this is used to control how the object is rendered. If Closed is True then the object will appear as a Polygon otherwise it will be rendered as a Polyline.

The TGlobe.DrawLLPolygon and TGlobe.DrawLLPolyline have been combined into the TGlobeCanvas.RenderPoly method. The State flags that are passed into the method have a osClosed member that is used to control if the data is rendered as a polyline or a polygon.

The TGlobeFont.GetTextHeight has been replaced by TGlobeCanvas.FontRenderHeight.

 
 

Email: tglobe@iname.com
Home Page: http://www.tglobe.com
Last Modified on: 01 January, 2001