Load shape files into a map...

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Nils
Newbie
Newbie
Posts: 1
Joined: Mon Nov 12, 2007 12:00 am

Load shape files into a map...

Post by Nils » Tue Nov 13, 2007 3:40 pm

Hallo All,

I want to load a map of Greece into a chart (unfortunately, "only" the world, all continents, the eu27, eu25, eu and spain seem to be pre-defined within the TeeChart Map-Charts). So, no Spain yet.

I therefore tried to use the example from TeeMaps (using C++ builder v6 and TeeChart Pro v8 ) to load a shape file (have a .dbf, .shp and .shx file for Greece) into the map series, however, this does not work at all, as the example program does not find the Greece shape files, and there does not seem a way to tell the function that is used where the shape files are stored...

Furthermore, I cannot find the world, eu, spain etc. shape files that are pre-defined anywhere, i.e., in order to adapt the code...

Finally, I wonder whether the example I used so far (from TeeMaps) is available in C++ as well, i.e., is it possible to program this in C++, yet only this Pascal example is available (which I don't know / therefore dislike...).

Thanks a lot in advance!




P.S. Maybe some code to explain...:

The function call in the Pascal example is:

TWorldSeries.LoadMapFromResource(Series1,'TeeGreeceShp','TeeGreeceShx');

--> Series1 is just the Series, i.e., it works depicting Spain, the world, australia using this Series1.
--> Greece, however, is not implemented, and this example therefore does not work...


I (therefore) tried the following in C++ (which does not work, but at least compiles without an error)

TMetaClass* myTClass;
TWorldSeries::LoadMapFromResource(myTClass,Series3,"shapeFile.shp","shapeFile.shx");

--> the files are not found when the function calls
--> the TMetaClass* myTClass; declaration is a kind of useless dummy only


---> ???

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

Post by Yeray » Thu Nov 22, 2007 12:05 pm

Hi Nils,

I've translated the GIS/Mapping demo to your environment (BCB6 + TeeChart Pro v8.02).

Please, take a look at the demo I've attached at the newsgroups:
news://www.steema.net/steema.public.attachments
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