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

Hi all,
 
Am trying to create a batch to print off a series of maps automatically, I need it to cycle through a series of mapped objects, print, then move to the next object. I can get it to center at each object but the zoom extent stays the same. Trying below code;
 
Select * From ObjectsToMap

    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?

Regards...

 

Morgan Ellingham

Citywide Service Solutions

GIS Technician

Level 1, 150 Jolimont Rd, East Melbourne

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

Reply via email to