Load shape files into a map...
Posted: 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
---> ???
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
---> ???