[mapguide-users] Zoom to selection

Ivan Milicevic Ivan.Milicevic at supranet.hr
Fri Sep 21 04:13:12 EDT 2007


Thanks Kenneth, I wll try to connect on SDF file and read it.
 
Any sample code for connection on SDF avaliable around here?

________________________________

From: mapguide-users-bounces at lists.osgeo.org on behalf of Kenneth, GEOGRAF A/S
Sent: pet 21.9.2007 10:08
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
	mapguide-users at lists.osgeo.org
	http://lists.osgeo.org/mailman/listinfo/mapguide-users
	  

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 4487 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/mapguide-users/attachments/20070921/1fb90600/attachment.bin


More information about the mapguide-users mailing list