Hi, How can I set the Default range of zoom level for the Zoom in/out button ? I mean if I just want only 4 zooming level whenever I click the Zoom in/out button, for example : I work with a workspace which already have the default view at the Zoom level 100km, and I only need 3 more level of viewing, 10km, 5km and 1 km. Is it possible for me to have and setting to the Zoom in/out button which can allow me to zoom to the preferred level. Hence, for zoom in, 1st click - 10km, 2nd click - 5km, ..... and for zoom out, if I'm at the level of 5km, then when ever I click zoom out, it will go to 10km. Currently, I'm just using the change view for doing so, but my boss hope I can set the above setting for him, neither the "Display zoom level" from "Layer control" nor the "Named View" functions still can't satisfy him. I'd gone through the user guide of MI and the Messages in MapInfo-L, but still can't find the answer. I just found a message from MapInfo-L which containing the following, but I don't know how to use it : Include "mapbasic.def" Declare Sub Main Declare Sub zoomer Sub Main Create Menu "Zoomer" As "Zoom In" +Chr$(9)+ "+/W+" ID 10 Calling zoomer, "Zoom Out" +Chr$(9)+ "-/W-" ID 20 Calling zoomer Alter Menu Bar Add "Zoomer" End Sub ' This procedure zooms in at a factor of .5 (miles). ' Alter mzoomfactor to desired zoom/ Sub Zoomer Dim mmenu, mzoomfactor As Integer If WindowInfo(FrontWindow(),WIN_INFO_TYPE) <> WIN_MAPPER Then Exit Sub End if mmenu = CommandInfo(CMD_INFO_MENUITEM) mzoomfactor = .5 Do Case mmenu Case 10 ' Zoom In Set Map Zoom MapperInfo(FrontWindow(),1) - mzoomfactor Case 20 ' Zoom Out Set Map Zoom MapperInfo(FrontWindow(),1) + mzoomfactor End Case End Sub I tried the above on the MapBasic window but it display the warning message : "Found [sub] on searching [MapInfo]" I don't know whether it's because I used the above code in a wrong way or I don't have "mapbasic.def" in my computer. Actually, I don't know whether the above code can help me, but it seems something related to zooming. BTW, Sorry for my silly question and poor English. Looking forward for your precious advice. Thanks ! M.Ho Email : [EMAIL PROTECTED] Home Page : come.to/gg911 ICQ UIN : 6721292 ( For Public ) ---------------------------------------------------------------------- To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
