Kenneth, 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. 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). Keith
________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kenneth, GEOGRAF A/S Sent: 21 September 2007 09:09 To: MapGuide Users Mail List Subject: Re: [mapguide-users] Zoom to selection The only way I know of, is to issue a select of the objects on the datasource. While reading the objects, you can get their envelope (aka mbr, bbox, etc..). If you sum up alle the objects enevlopes, you can get the minimum rectangle in which all objects fit. 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. Regards, Kenneth, GEOGRAF A/S Ivan Milicevic skrev: 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. ________________________________ _______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users This message has been scanned for viruses by MailControl <http://bluepages.wsatkins.co.uk/?6875772> 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. 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. Consider the environment. Please don't print this e-mail unless you really need to.
_______________________________________________ mapguide-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapguide-users
