selectionXml - 1.time fast..then very slow...ZoomToView

Maciej Skorczewski maciej.skorczewski at procad.pl
Fri Nov 24 03:09:31 EST 2006


hello all!

i use (in php) this code to make xml of selected object...it works creat 
when i use it first time(it is very fast)...then when i clik another 
search results(streets and home)- so i use this script one more time - 
my browser (FF and IE) stop working on 10-20 sec. user can't make any 
action... why it is so? hove can i reload selectionXml (it is xml file )
  any sucestion?


what is faster? use pomQuery and selectionXml

or

ZoomToView(x, y, scale, refresh) ?





<?
$pomQuery->SetFilter("NRBUDP_ID = '$nrbudp_id' and 
NUMER_DOMU='$numer_domu'");

$pomResId = new 
MgResourceIdentifier("Library://mymap/Data/Nrbudp.FeatureSource");
								$featureReader = $featureService->SelectFeatures($pomResId, 
"SDF_2_Schema:Nrbudp", $pomQuery);


$layer = $map->GetLayers()->GetItem('Nrbudp');
$selection = new MgSelection($map);
$selection->AddFeatures($layer, $featureReader, 0);
$selectionXml = $selection->ToXml();
echo "<script type='text/javascript'>\n function OnPageLoad() {\n";
echo "selectionXml = '$selectionXml';\n 
parent.SetSelectionXML(selectionXml);\n";
echo "}\n</script>";
?>
then

i call in <body onload="OnPageLoad()">
-- 
Maciej Skorczewski







More information about the Mapguide-users mailing list