TWorldSeries - Pacific centered map
TWorldSeries - Pacific centered map
How can I use the TWorldSeries for a Pacific centered map, so that it uses 0 to 360 degrees instead of -180 to +180 degrees?
Re: TWorldSeries - Pacific centered map
Hello,
You could use two TWorldSeries. The first one to draw from 0 to 180 and the second one to draw from -180 to 0. Ie:
You could use two TWorldSeries. The first one to draw from 0 to 180 and the second one to draw from -180 to 0. Ie:
Code: Select all
uses TeeWorldSeries;
var Series1: TWorldSeries;
procedure TForm1.FormCreate(Sender: TObject);
var tmpSeries: TWorldSeries;
begin
Chart1.View3D:=False;
Chart1.Legend.Hide;
Series1:=Chart1.AddSeries(TWorldSeries) as TWorldSeries;
Series1.FillSampleValues();
with Chart1.Axes.Bottom do
begin
EndPosition:=50;
SetMinMax(0, 180);
end;
tmpSeries:=CloneChartSeries(Series1) as TWorldSeries;
with Chart1.CustomAxes.Add do
begin
Horizontal:=True;
StartPosition:=50;
SetMinMax(-180, 0);
end;
tmpSeries.CustomHorizAxis:=Chart1.CustomAxes[0];
tmpSeries.ParentChart:=nil;
Chart1.AddSeries(tmpSeries);
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: TWorldSeries - Pacific centered map
Thanks,
How can I add a shortest distance line from a position in Australia to a position on the west coast of the US, for example from Sydney to San Francisco, using this Pacific centered map?
How can I add a shortest distance line from a position in Australia to a position on the west coast of the US, for example from Sydney to San Francisco, using this Pacific centered map?
Re: TWorldSeries - Pacific centered map
Hello,
Do you mean how to calculate the great-circle distance or do you mean how to choose between the distance of two points in the same series or from a series to the other? For the later, once you have both distances you only have to take the shortest.
If you still find problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Do you mean how to calculate the great-circle distance or do you mean how to choose between the distance of two points in the same series or from a series to the other? For the later, once you have both distances you only have to take the shortest.
If you still find problems with it, please try to arrange a simple example project we can run as-is to reproduce the problem here.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |