Page 1 of 1
TWorldSeries: using new maps
Posted: Mon Aug 03, 2009 4:01 pm
by 9350505
Hello. Could you please redrect me on some TWorldSeries tutorials? How to insert new maps?
Thanks.
Re: TWorldSeries: using new maps
Posted: Tue Aug 04, 2009 8:46 am
by yeray
Hi Brace,
Have you seen the TeeMaps example at Examples folder into TeeChart installation installation path?
Re: TWorldSeries: using new maps
Posted: Tue Aug 04, 2009 10:54 am
by 9350505
This could be of help... But after insallation of TeeChart 8 I don't have any Examples folder, all I have is in attached pictured.
How can I get those?
Re: TWorldSeries: using new maps
Posted: Tue Aug 04, 2009 12:04 pm
by yeray
Hi Brace,
Yes, help and examples are not included in the source installers. That why we recommend to the source code customers to download both the binaries and the sources. Then install the binaries and after that, the sources.
Excuse us if you haven't found enough clear instructions.
Re: TWorldSeries: using new maps
Posted: Fri Aug 07, 2009 12:16 pm
by 9350505
Hello,
is it possible you send me the demo directly? I am getting problems with uninstalling and at present it would be better to just have that example.
I thank you in advance.
Re: TWorldSeries: using new maps
Posted: Fri Aug 07, 2009 2:53 pm
by yeray
Hi Brace,
Just sent to your registered mail.
Re: TWorldSeries: using new maps
Posted: Fri Aug 14, 2009 8:48 am
by 9350505
I was away for 1 week. Thanks for the demo but you sent me the .NET version, I have Delphi win 32!
Is it possible you send it to me the VCL version? Thanks.
Re: TWorldSeries: using new maps
Posted: Fri Aug 14, 2009 9:38 am
by 9350505
I have one more question: is it possible to add maps i the Dialog (see attachment)?
My application is distibuted in Italy and I would like to have something like you have for spain, ideally with different groupings (by region and by province).
I use TeeChart with ReportBuilder, so I leave my users to create their own reports, so of course a simple procedure would be better!
So my original post question can be translated in a more practical one:
1) how do I create an Italy map?
2) how can I publish it (or give the users a simple way to load from file into the report)?
Thanks.
Re: TWorldSeries: using new maps
Posted: Fri Aug 14, 2009 3:23 pm
by yeray
Hi Brace,
I've resent the Maps demo again. But note that I've revised the file sent before and it seems to be ok: a delphi project, not a Visual Studio one.
And note that basically there is a button that loads the maps from a shp+shx shape. And this button is calling the function:
Code: Select all
class procedure TWorldSeries.LoadMapFromResource(Series:TMapSeries; const ShpName,ShxName:String);
Re: TWorldSeries: using new maps
Posted: Wed Aug 19, 2009 9:45 am
by 9350505
When I try to open the example I get:
---------------------------
CodeGear Delphi for Microsoft Windows
---------------------------
The project can not be loaded because the required personality DelphiDotNet.Personality is not available.
---------------------------
OK
---------------------------
Anyway I was able to make a simple program in which I can load from resource an Italian map using TWorldSeries.LoadFromResource.
Anyway the following points are still not clear to me
1) considering an existing map in TWorldSeries (like Europe 15). how do I popuplate the map? Imagine I have a table with country code on one field and a number on another field.
2) Is it possible to load shp and shx files from the TChart Editor? I say this because I am using this with Report Builder so I would like to give my end user the possibility to load any kind of map.
Can you provide a sample application for achieveing that result? Thanks.
Re: TWorldSeries: using new maps
Posted: Wed Aug 19, 2009 12:17 pm
by yeray
Hi Bruce,
Brace wrote:1) considering an existing map in TWorldSeries (like Europe 15). how do I popuplate the map? Imagine I have a table with country code on one field and a number on another field.
I'm not sure to understand what does it mean "populate" here. The map is loaded from a resource or from a shape file that contains a list of polygons.
Brace wrote:2) Is it possible to load shp and shx files from the TChart Editor? I say this because I am using this with Report Builder so I would like to give my end user the possibility to load any kind of map.
It is possible to load the map from the shp but I'm afraid that not through the editor. Instead of this, I think you could use for example a combobox to show the list of possible maps and load the chose shp with a button.
Brace wrote:Can you provide a sample application for achieveing that result?
Here it is:
Code: Select all
uses Series, TeeMapSeries, TeeWorldSeries, TeeSHP;
var series1: TMapSeries;
procedure TForm1.FormCreate(Sender: TObject);
var
SHPFile : string;
begin
Chart1.View3D := false;
Chart1.Legend.Visible := false;
series1 := TMapSeries.Create(self);
Chart1.AddSeries(series1);
end;
procedure TForm1.Button1Click(Sender: TObject);
var
SHPFile : string;
begin
series1.Clear;
SHPFile := '???.shp'; //choose your shp file for example depending of the item shown in a combobox
try
LoadMap(Series1, SHPFile);
finally
end;
Series1.ColorEachPoint := true;
end;