Page 1 of 1

Map Charts - Loading another map

Posted: Thu May 11, 2017 7:57 am
by 16680934
Hi

How does one load a custom map, one which is not included in TeeCharts? What format does the map file have to be in and how does one specify to use it ?

Thanks

Re: Map Charts - Loading another map

Posted: Thu May 11, 2017 2:18 pm
by yeray
Hello,

I'm afraid this is not possible in TeeChart ActiveX. I've added the request in the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=1859

Re: Map Charts - Loading another map

Posted: Thu May 11, 2017 4:12 pm
by 16680934
Yeray

That is indeed unfortunate ... a show stopper for us. How sad. Do you think it likely this will be implemented in the ActiveX version and if yes, any idea how long these things take?

Thank you

Re: Map Charts - Loading another map

Posted: Fri May 12, 2017 11:13 am
by yeray
Hello,

There's actually a demo implementing the required function LoadMap (and other functions also required) in a module.
Find the demo at the "Examples\Visual Basic\TeeMaps" folder in the TeeChart ActiveX installation.

Re: Map Charts - Loading another map

Posted: Sat May 13, 2017 12:44 pm
by 16680934
Hi Yeray

I have tried to have a look at these examples but I am not a VB programmer so its hard to understand what is going on. I understand that one needs ESRI format files (incl. SHP, .SHX, and .DBF) but I do not understand at all how to load that file into TeeChartX. Any suggestions with specific function calls required would be very appreciated.

Thank you.

Re: Map Charts - Loading another map

Posted: Mon May 15, 2017 8:01 am
by yeray
Hello,
JPTP wrote:I understand that one needs ESRI format files (incl. SHP, .SHX, and .DBF) but I do not understand at all how to load that file into TeeChartX. Any suggestions with specific function calls required would be very appreciated.
LoadMap and LoadShape functions in TeeSHP.bas do the most part of the job (LoadMap calls LoadShape), but they call other small functions also defined in TeeSHP.bas. So I'd suggest you to translate all the functions and types in TeeSHP.bas to the language you program with:

Code: Select all

Public Sub LoadMap(Series As Integer, FileName As String, _
                  ByVal rst2 As ADODB.Recordset, FieldName As String, _
                  FieldValue As String)
Being "Series" the index of the Map series, "FileName" your .SHP file name, rst2 the ADODB.Recordset of the .DBF, FieldName the field for the shape labels (can be an empty string), and FieldValue the field for the shape value (can be an empty string). Ie:

Code: Select all

LoadMap 0, Combo1.Text, rst, EditText.Text, EditValue.Text
When you'll have these functions translated to your language, then you'll be able to simplify them a little bit according to your needs. Ie, if you want to always use a .dbf you don't need to verify the state of the .dbf CheckBox ("Check1.Value") at LoadShape.

Re: Map Charts - Loading another map

Posted: Thu Jan 18, 2018 2:05 pm
by 9525607
Hi, Yeray,

Regarding to add ESRI shp map, the example code can load only the polygon. Could you provide more codes for adding the line and point shp file?

Looking forward to receiving your support.

Thanks

Re: Map Charts - Loading another map

Posted: Tue Jan 23, 2018 8:48 am
by yeray
Hello,

I see you've posted the same question here. I'll reply you there.