Page 1 of 1

Question of TMapSeries Control

Posted: Thu Apr 23, 2009 12:09 pm
by 10050873
Hi all
I want to know if we can modifier in the TMapSeries the map added with the map by default, in fact, what i need is a french map, but i had a error when i tied to delete all the other maps but the France, the control was correctly show in the visual editor, but it shows Luxembourg and Australia instead of France at execution. The another question is if the background of chart can also zooming with the events of mouse, or replace a shape file with a image is possible or not?

Thank you
Regards

Posted: Thu Apr 23, 2009 1:42 pm
by yeray
Hi Calou,

1. Yes, you could load an europe map and delete the polygons with label different to "France":

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
  Series1: TWorldSeries;
begin
  Series1 := TWorldSeries.Create(self);
  Chart1.AddSeries(Series1);

  Series1.Map := TWorldMap(6);

  for i:=Series1.Count-1 downto 0 do
  begin
    if Series1.Labels[i] <> 'France' then
      Series1[i].Destroy;
  end;
end;
2. The easiest way to do this would be using Image Tool and assigning the series to the tool. Then the chart and the image should zoom together.

Posted: Thu Apr 23, 2009 2:57 pm
by 10050873
That works

Thx :)