I am drawing some polylines in a layer called Predictions. When I toggle a 
button I want all the polylines to disappear. In fact I'm happy to kill the 
whole table.

I am using the following code where I have 4 lines of code that I thought 
would have wiped the polylines off my map. However, even with all these 
different methods, the polylines still stay in view on the map.

                For cownt = 1 to NumTables()
                        If TableInfo(cownt, TAB_INFO_NAME) = "Predictions" Then
                                Remove Map Layer "Predictions"   ' should 
remove the layer from the map
                                Drop Map Predictions ' should get rid of the 
map layer completely
                                Drop Table Predictions ' should delete the 
table/layer completely
                                Update Window  WindowID(WIN_MAPPER) ' should 
refresh the map window
                                Exit For
                        End If
                Next

If I zoom in or out, or even open the Layer Control box & press OK, the 
polylines from the Predictions layer on the map disappear, so the code 
above is actually working, but none of the methods will get rid of the 
polylines.

Does anyone know any more methods that will work? I'm almost desperate 
enough to force a zoom at the same scale as the map window is already, but 
only as a last resort.

I am using MI 8.0 & MB 8.0, but would prefer a solution that will work with 
MI 4.5 if possible.

Thanks,

Dave
_______________________________________________
MapInfo-L mailing list
MapInfo-L@lists.directionsmag.com
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to