My app lets users create a canned thematic map layer, and them lets them 
remove the thematic layer.

MapInfo names the first thematic layer created "Dealers(1)".  When it is 
removed, and the Create-Thematic-Layer sub is called again, the layer will be 
named Dealers(2), and so on.  This complicates removing the layer.     I loop 
through layer names, and remove any layer where  LAYER_INFO_TYPE = 
LAYER_INFO_TYPE_THEMATIC and Left$(layername,8) = "Dealers(".

This works, but seems a cumbersome and shotgun approach.  It works only 
because the app, not the user, controls the layers that appear on the map.  

Is there a better way to handle the layer removal?  Would it be better to 
create the thematic layers first, and let the user just turn the layer 
displays On/Off?  Would we wish for the ability to rename map layers for 
better control? Like: Shade Dealers... Title "Dealers by 2001 Sales"?


Mike

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 5060

Reply via email to