How to code for Thematic map in Mapbasic?

المشرف العام

Administrator
طاقم الإدارة
I would like to write code for creating a thematic map.

The GUI command in Mapbasic window shows many lines in order to set up the different colours which will be used on the different polygons (i.e. Brush (2, 16760, 2300)).

Is it possible to generate this part automatically provided the user gives some parameters ?

Any help would be appreciated.

Part of the code would look like the following:

Declare Sub Main()Declare Sub sThematicSub Main() Call sThematicEnd SubDim nStep As IntegerDim sSymbole As BrushDim sSymbol(300) As FloatDim counter As IntegerDim sTableName As StringDim sDataCol As IntegerDim nBreak As StringDim sStatement As StringDim sStatementStart As StringDim sStatementMid As StringDim sStatementEnd As StringSUB sThematicsSymbol(1) = MakeBrush (49, 12632256, 12) sSymbol(2) = MakeBrush ("+sDefaultSymbol+", 16752895, 8) sSymbol(3) = MakeBrush ("+sDefaultSymbol+", 9445631, 8) sSymbol(4) = MakeBrush ("+sDefaultSymbol+", 255, 8) sSymbol(5) = MakeBrush ("+sDefaultSymbol+", 65280, 12) sSymbol(6) = MakeBrush ("+sDefaultSymbol+", 16776960, 12)sSymbol(7) = MakeBrush ("+sDefaultSymbol+", 16744448, 12)sSymbol(8) = MakeBrush ("+sDefaultSymbol+", 16711680, 12) sStatementStart = "shade window " + winID + " " + sTableName + " with " + sDataCol + " ranges apply all use all Symbol (49,12632256,12) "sStatementMid = ""sStatementEnd = " default Brush (2,8421504,16777215) # use 2 round 1 inflect off Symbol (0,0,0) at 5 by 0 color 1 #"nStep = 8 For counter = 1 to nStep sStatementMid = sStatementMid + nBreak(counter) + ": " + nBreak(counter + 1) + sSymbol(counter)NextsStatement = sStatementStart + sStatementMid + sStatementEndRun Command sStatementEnd Sub



أكثر...
 
أعلى