<P>Greetings all,<BR><BR>First time user of this forum.<BR><BR>We use a sql server db to store data including x, y values. and using ASP on the front end to retrieve data<BR><BR>Currently, we are do have a summary report laid out thus:<BR><BR>incident id   first name     last name  incident type, incident location<BR><BR>1                John           Doe            vehicular          amber street<BR>...<BR>...<BR><BR>Our issue arises because we want to be able to click on incident id to zoom directly to the extent of the map where the incident occurred.<BR><BR>so far, we are struggling with this. any ideas would greatly appreciated.<BR><BR>Here is what we have got so far:<BR><BR><BR><script><BR>function zoomToExtent(box)
{<BR>   box_array = box.split(" ");<BR>   minx = box_array[0]*1;<BR>   miny = box_array[1]*1;<BR>   maxx = box_array[2]*1;<BR>   maxy = box_array[3]*1;<BR>   width = (maxx - minx) + 200;<BR>   height = maxy - miny;<BR>   centerx = minx + (width / 2.0);<BR>   centery = miny + (height / 2.0);<BR>  lonlatPt = map.mcsToLonLat(centerx, centery);<BR>  lon = lonlatPt.getX();<BR>   lat = lonlatPt.getY();<BR>   map.zoomWidth(lat, lon, width, 'FT');<BR>}<BR></script><BR><%</P> <P>Set cn=Server.CreateObject("ADODB.Connection")<BR>nID = Request("RecordID")<BR>'response.write nID<BR>'response.end</P> <P>cn.Open "Driver={SQL Server};" & _<BR>           "Server=haoi;" & _<BR>           "Address=haoi,1433;" &
_<BR>           "Network=DBMSSOCN;" & _<BR>           "Database=incidentsDB;" & _<BR>           "Uid=sa;" & _<BR>           "Pwd="</P> <P>SQL = "select incident_LOC, id,minlat,minlon,maxlat,maxlon from Incidents where id =" & nID<BR>Set rs = cn.Execute( SQL )<BR>'response.write SQL<BR>'response.end<BR>%><BR><div align="center"><BR><table><BR><%<BR>cnt = 0<BR>Do Until cur.EOF<BR>    cnt = cnt + 1<BR>    incidentlocation = cur(0).Value<BR> recnum = CLng(cur(1).Value)<BR>    ileft = CLng(cur(2).value) - 250<BR>    ibottom = CLng(cur(3).Value) - 250<BR>    iright = CLng(cur(4).Value) + 250<BR>    itop = CLng(cur(5).Value) + 250</P> <P>    tan =
ileft & " " & ibottom & " " & iright & " " & itop</P> <P>%>             <tr><BR>                <td><BR>                  <a href="#" onClick="zoomToExtent('<%=tan%>');return false;"><BR>                  <font size="-1"><%=incidentlocation%></font><BR>                  </a><BR>                 </td><BR>                </tr><BR>  
<%<BR>       cur.MoveNext<BR>   Loop<BR>   %><BR>   </table><BR><%<BR>if cnt = 0 Then<BR>%><BR>    <Center><B>No results</center><BR><%<BR>End If<BR>rs.Close()<BR>cn.Close()<BR>%></P>