Drawing ellipses on TMapSeries

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
James
Newbie
Newbie
Posts: 1
Joined: Tue Mar 30, 2010 12:00 am

Drawing ellipses on TMapSeries

Post by James » Thu Sep 02, 2010 9:58 am

Hello there,

I would like to draw some ellipses on a TMapSeries. The user should be able to zoom the map as usual and they should stick to the map and zoom as expected.
Do I need to do this using some sort of ownerdraw functionality, or is there a series i can make use of?
I would also like to draw a small arrow on the map, which should not change size with zoom.

Lastly I would eventually like to do this in the .NET version of TeeChart also.

Could somebody point me in the right direction of what i should be doto accomplish this.
Any help much appreciated!

James

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Drawing ellipses on TMapSeries

Post by Yeray » Fri Sep 03, 2010 2:32 pm

Hi James,

In VCL you could do something as follows. I'm not sure if that's the behaviour you would like to have. If you want your arrow not to zoom at all you should draw it manually at OnAfterDraw event.

Code: Select all

uses TeeWorldSeries, TeeShape, ArrowCha;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.View3D:=false;
  Chart1.Legend.Visible:=false;

  with Chart1.AddSeries(TWorldSeries) do
    FillSampleValues();

  with Chart1.AddSeries(TChartShape) as TChartShape do
  begin
    Gradient.Visible:=true;
    X0:=-20;
    X1:=0;
    Y0:=-40;
    Y1:=0;
    Transparency:=20;
  end;

  with Chart1.AddSeries(TArrowSeries) as TArrowSeries do
  begin
    AddArrow(-40, 50, -20, 0);
    ArrowWidth:=10;
    ArrowHeight:=20;
    Pointer.Pen.Width:=2;
  end;
end;
In .NET it should be too different. If you find troubles with it, don't hesitate to let us know.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply