Ian,
You can use a bounding rectangle of the features to get x/y and zoom level.
Then use the map object's ZoomTo method to center and zoom the map.
<%
'----------------------------------------------
Set objFeatures = objLayer.AllFeatures
Set objRectangle = objFeatures.Bounds
mapx = (objRectangle.XMax + objRectangle.XMin)/2
mapy = (objRectangle.YMax + objRectangle.YMin)/2
zoomlevel =
objMap.Distance(objRectangle.XMax,objRectangle.YMax,objRectangle.XMin,objRec
tangle.YMin)
objMap.ZoomTo zoomlevel, mapx, mapy
'----------------------------------------------
%>
You'll need to change "objLayer" to whatever reference you're using for your
Oracle BindLayer and "objMap" to the reference you're using for the map
object. The line that begins with "zoomlevel = objMap.Distance(objRec..."
is one line, if your email client happens to wrap it.
Hope that helps,
Jeff Koncz
Directions Magazine
[EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Ian Cazabat
Sent: Friday, June 09, 2000 10:25 AM
To: mapinfo-l (E-mail)
Subject: MI MapXtreme Help Centering Map
Hello, I'm new to the list, so I apologize if this is the wrong place t post
this question. I'm using an ASP to search for a list of locations from an
Oracle 7.345 database. I limit the results returned by the SQL statement by
city & state. Is there any way to get the map centered on only the results
returned? Right now, it just centers on the United States. I'm using the
"United States" Geoset. I could post my ASP if necessary.
Thank You,
Ian Cazabat
[EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]