Hi Mike,
Try this:
'*****************Code Begin*************************
sub zoom
dim i as float,
j As SmallInt
Run menu command 306 ' Browse to selected - usefull if you've got a
browser open
if SelectionInfo(SEL_INFO_TABLENAME)=""
then goto err
end if
for j=1 to NumWindows()
Onerror goto err
if windowinfo(j, WIN_INFO_TYPE)=1
then
i=WindowId(j)
Add Map
Window i
Layer Selection
Set Map
Window i
Zoom Entire Layer 1
'Exit Sub ' If you don't want all your map windows to zoom
to selected
end if
next
close table SelectionInfo( SEL_INFO_SELNAME)
err:
end sub
'************************Code End*******************
Ctrl+g zooms to selected, but only if your zoom level is to small to fit in
all selected objects.
HTH
Regards
S�ren Breddam
GIS- og IT-koordinator
Teknik og Erhvervsforvaltningen
Stevns Kommune - www.stevns.dk
* Tlf.: 5656 1800
* Dir.: 5656 1891
-----Oprindelig meddelelse-----
Fra: Mayer, Mike @ Vancouver [mailto:[EMAIL PROTECTED]
Sendt: 26. april 2005 22:56
Til: '[email protected]'
Emne: MI-L Zoom to selected Features
Hello Everyone,
Could anyone tell me how I can zoom in to features that are selected from a
table. I have a browser window that appears after a select statement has
executed, I want to take the features that are selected and zoom into them
on the map. I am trying to do this through MapBasic. Any ideas? Thanks in
advance.
Mike Mayer
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16237
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16238