Map Charts - Loading another map

TeeChart for ActiveX, COM and ASP

Map Charts - Loading another map

Postby 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
JPTP
Newbie
Newbie
 
Posts: 7
Joined: Tue May 09, 2017 12:00 am

Re: Map Charts - Loading another map

Postby 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 ImagePlease read our Bug Fixing Policy
Yeray
Site Admin
Site Admin
 
Posts: 8117
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Re: Map Charts - Loading another map

Postby 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
JPTP
Newbie
Newbie
 
Posts: 7
Joined: Tue May 09, 2017 12:00 am

Re: Map Charts - Loading another map

Postby 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 ImagePlease read our Bug Fixing Policy
Yeray
Site Admin
Site Admin
 
Posts: 8117
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Re: Map Charts - Loading another map

Postby 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.
JPTP
Newbie
Newbie
 
Posts: 7
Joined: Tue May 09, 2017 12:00 am

Re: Map Charts - Loading another map

Postby 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 ImagePlease read our Bug Fixing Policy
Yeray
Site Admin
Site Admin
 
Posts: 8117
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia


Return to Activex

Who is online

Users browsing this forum: No registered users and 6 guests

cron