All,
I am having some trouble with ordering layers in a mapper window using MapBasic.
I have some layers that are added to a mapper by pushing a tool button in
MapInfo. The button adds the layers, and then puts them to the bottom layer of
the mapper window as they are base mapping data.
The code I have written creates a string of the layers that are in the map
window, and then adds the layer i want at the bottom of the mapper window to
the end of this string. I then use Run Command to run this string. For example,
the code looks something like this:
---------------------------
layer = layer i want moved to bottom of mapper window
Dim tmpCmdStr As String
tmpCmdStr = "Set Map Order "
Dim i As Integer
For i = 1 To iNoLayers
If LayerInfo(FrontWindow(), i, LAYER_INFO_NAME) = layer Then
Else
tmpCmdStr = tmpCmdStr + LayerInfo(FrontWindow(), i, LAYER_INFO_NAME)+
","
End If
Next
tmpCmdStr = tmpCmdStr + layer
Run Command tmpCmdStr
---------
This works fine until I encounter a thematic layer, and the set map order
command falls over complaining of Unrecognised Command ( , which is when i gets
to the thematic layer.
Does anyone have any idea as to why this is happening, and how it can be fixed.
Regards,
James
This Electronic Transmission is intended only for the attention of the
addressee. It may contain privileged and confidential information. If you are
not the person for whom it is intended, you must not copy, distribute or take
any action in reliance on it. If you have received this electronic transmission
in error please notify us immediately by telephone, delete the transmission and
destroy any hard copies.
Nicholas Pearson Associates has used all reasonable efforts to ensure that this
message and any attachments are free from viruses.
Nicholas Pearson Associates
Environmental Planners - Landscape Architects - Ecologists
30 Brock Street, Bath,BA1 2LN
Tel: +44 (0) 1225 445548 Fax: +44 (0) 1225 312387
www.npaconsult.co.uk
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l