On Mon, 22 Oct 2007 08:45:22 -0700, ruivilanova <[EMAIL PROTECTED]>
wrote:
I'm selecting a point and then I zoom to it (with SetSelectionXML and
ExecuteMapAction(10) functions), but mapguide zooms to a scale of 0.01
because the selection is a point. I need to zoom to a bigger scale.
If I do the following code, it zooms to the center of the map before do
ExecuteMapAction(10), not to the place I want. It seems that Refresh()
isn't working.
function zoom2point(xml)
{
parent.parent.SetSelectionXML(xml);
parent.parent.mapFrame.ExecuteMapAction(10);
parent.parent.mapFrame.Refresh();
parent.parent.Refresh();
var x= parent.parent.mapFrame.GetCenter().X;
var y= parent.parent.mapFrame.GetCenter().Y;
parent.parent.mapFrame.ZoomToView(x,y,2500,true);
}
Is it possible the Refresh hasn't completed yet when the code reaches your
ZoomToView?
I usually resolve this by changing the minScale variable in
ajaxmappane.templ, but this affects all applications on the server and
gets overwritten when I installed a new version of MapGuide. The better
way would be to override that function in code that loads separately.
--
James Card
209-578-5580
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users