Morgan
What I do is select the area that I'd like to zoom on into a different (dummy) cursor ( say, csrInterestArea, being all objects within a certain radius). The selected area doesn't even need to be visible. Then:
Add Map Layer csrInterestArea
Set Map Layer csrInterestArea '... whatever display options, such as invisible if necessary
Set map Zoom entire layer csrInterestArea on the cursor.
HTH
Terry
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ellingham
Morgan
Sent: 16 June 2006 08:31
To: Terry
McDonnell
Subject: [MI-L] Zoom to Extents of Selection - MapBasic
Code
Fetch first From ObjectsToMap
Do Until EOT(ObjectsToMap)
Set Map Center (CentroidX(Selection.obj), CentroidY(Selection.obj)) 'center map on selected object
Set Map Window WindowID(1) Zoom Entire Layer SelectionInfo(SEL_INFO_SELNAME) 'THIS IS WHERE THE ERROR IS "INVALID VIEW LAYER" TRIED Layer Selection et al
Run Menu Command 112 'Print Command
Fetch next from ObjectsToMap
Loop
Any ideas?
Morgan Ellingham
GIS Technician
Level 1,
Ph: (03) 9261
5065
Mob: 0419 145
666
Email: [EMAIL PROTECTED]
_______________________________________________ MapInfo-L mailing list [email protected] http://www.directionsmag.com/mailman/listinfo/mapinfo-l
