Map Charts - Loading another map

TeeChart for ActiveX, COM and ASP
Post Reply
JPTP
Newbie
Newbie
Posts: 7
Joined: Tue May 09, 2017 12:00 am

Map Charts - Loading another map

Post by JPTP » Thu May 11, 2017 7:57 am

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

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

Re: Map Charts - Loading another map

Post by Yeray » Thu May 11, 2017 2:18 pm

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
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

JPTP
Newbie
Newbie
Posts: 7
Joined: Tue May 09, 2017 12:00 am

Re: Map Charts - Loading another map

Post by JPTP » Thu May 11, 2017 4:12 pm

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

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

Re: Map Charts - Loading another map

Post by Yeray » Fri May 12, 2017 11:13 am

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.
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

JPTP
Newbie
Newbie
Posts: 7
Joined: Tue May 09, 2017 12:00 am

Re: Map Charts - Loading another map

Post by JPTP » Sat May 13, 2017 12:44 pm

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.

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

Re: Map Charts - Loading another map

Post by Yeray » Mon May 15, 2017 8:01 am

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.
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

SPR
Newbie
Newbie
Posts: 6
Joined: Fri Jan 14, 2005 5:00 am
Contact:

Re: Map Charts - Loading another map

Post by SPR » Thu Jan 18, 2018 2:05 pm

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

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

Re: Map Charts - Loading another map

Post by Yeray » Tue Jan 23, 2018 8:48 am

Hello,

I see you've posted the same question here. I'll reply you there.
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