<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3059" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=197225908-21092007><FONT face=Arial
color=#0000ff size=2>Kenneth,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=197225908-21092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=197225908-21092007><FONT face=Arial
color=#0000ff size=2>I'm trying to do something similar, and I'm puzzled by your
suggestion that the new scale will be the width or height of the box. surely
there must be a conversion between the current width and scale to get the new
scale? I'm assuming that the zoom-to will be accomplished with the Viewer API
ZoomToView method which requires a scale.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=197225908-21092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=197225908-21092007><FONT face=Arial
color=#0000ff size=2>What makes this difficult is that he Web API does not seem
to have a method for getting the current view width (map units), as opposed to
display width (pixels).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=197225908-21092007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=197225908-21092007><FONT face=Arial
color=#0000ff size=2>Keith</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mapguide-users-bounces@lists.osgeo.org
[mailto:mapguide-users-bounces@lists.osgeo.org] <B>On Behalf Of </B>Kenneth,
GEOGRAF A/S<BR><B>Sent:</B> 21 September 2007 09:09<BR><B>To:</B> MapGuide Users
Mail List<BR><B>Subject:</B> Re: [mapguide-users] Zoom to
selection<BR></FONT><BR></DIV>
<DIV></DIV>The only way I know of, is to issue a select of the objects on the
datasource.<BR>While reading the objects, you can get their envelope (aka mbr,
bbox, etc..).<BR>If you sum up alle the objects enevlopes, you can get the
minimum rectangle in which all objects fit.<BR>Once you have this box, your
center, will be the center of the box, and the scale will be the width or height
of the box.<BR><PRE class="moz-signature" defanghtml_cols="72">Regards, Kenneth, GEOGRAF A/S
</PRE><BR><BR>Ivan Milicevic skrev:
<BLOCKQUOTE cite=mid:9CAB6B340CCF9E44BE4ACFCF56E67B0705A451@supranet
type="cite"><PRE wrap="">Hello,
I wonder is it possible to calculate zoom extent on selected objects? For example, I have selected various type of objects (line, polygon, point) but I don't have any XY info in database on these objects. How can I calclate center point and scale in this case?
Any help-advices are wellcome.
Greetings,
Ivan.
</PRE><PRE wrap=""><HR width="90%" SIZE=4>
_______________________________________________
mapguide-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</A>
<A class=moz-txt-link-freetext href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</A>
</PRE></BLOCKQUOTE><BR><BR>
<P align=center><FONT face="Arial, Helvetica, sans-serif" color=#000000
size=2>This message has been scanned for viruses by </FONT><A
href="http://bluepages.wsatkins.co.uk/?6875772"><FONT
face="Arial, Helvetica, sans-serif" color=#000000
size=2>MailControl</FONT></A></P><br><br>
<CENTER><FONT face="Arial, Helvetica, sans-serif" size=2><B>This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.</B></FONT>
<P><FONT face="Arial, Helvetica, sans-serif" size=2>The ultimate parent company of the Atkins Group is WS Atkins plc. Registered in England No. 1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW.</FONT>
<P><FONT face=Webdings color=green size=5>P</FONT> <FONT face="Arial, Helvetica, sans-serif" color=green size=2><B>Consider the environment. Please don't print this e-mail unless you really need to.</B></FONT> </CENTER></P>
</body></HTML>