David, Make sure that you haven't turned off the Map Redraw and forget to turn it on again. This is done with the "Set Map Redraw Off" command. If you have used this remember to turn it on again with "Set Map Redraw On"
You could also try changing your "Update Window WindowID(WIN_MAPPER)" to "Update Window frontWindow()". I assume that the front window is the map window in question here I have seen this behaviour myselv a few times, and have also in some cases been desperate enough to do a change of zoom thru MapBasic to update the map. Peter Horsbøll Møller GIS Developer, MTM Geographical Information & IT COWI A/S Odensevej 95 DK-5260 Odense S. Denmark Tel +45 6311 4900 Direct +45 6311 4908 Mob +45 5156 1045 Fax +45 6311 4949 E-mail [EMAIL PROTECTED] http://www.cowi.dk/gis "For enden af regnbuen..." - hvordan kommer man dertil og er det overhovedet muligt? Læs mere om årets MapInfo konference på www.cowi.dk/mapinfokonference -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Baker Sent: Tuesday, July 18, 2006 2:12 PM To: [email protected] Subject: [MI-L] Refreshing a map after deleting objects 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 [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l _______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
