Infrastructure Map Server Developer

Infrastructure Map Server Developer

Reply
Contributor
19 Posts
0 Kudos
Registered: ‎12-16-2009
Post 1 of 1

IT ONLY FUNCTIONS WITH THE TASKPANE BECAUSE?

278 Views, 0 Replies
01-12-2011 04:18 AM
 

 

I HAVE THE ARCHIVE IN .PHP TO MAKE THE FILTER, AS CODE BELOW:

 <html>
 
 <body class="AppFrame" onLoad="Selecao()">
 
 <?php
    include '/mapguide2010/mapviewerphp/common.php';
    include 'chamando_mapa.php';
    include '/mapguide2010/mapviewerphp/constants.php';

  //  $args = ($_SERVER['REQUEST_METHOD'] == "POST")? $_POST : $_GET;
  //  $sessionId = $args['SESSION'];
  //  $mapName = $args['MAPNAME'];
   
    
    try
    {
      MgInitializeWebTier ($configFilePath);

      $userInfo = new MgUserInformation($sessionId);
      $siteConnection = new MgSiteConnection();
      $siteConnection->Open($userInfo);
      
      $resourceID = new MgResourceIdentifier("Library://GUARUJA/CTM_SCIM/MAPA/MAPA_SCIM.MapDefinition"); 
      
      
      
      $mapName = $resourceID->GetName();

      $map = new MgMap($siteConnection);
      
      $map->Create($resourceID,$mapName);
     // $map->Open($map);
      
      $layerFeatureResource = new MgResourceIdentifier("Library://GUARUJA/LAYERS/Data/quadras.FeatureSource");
      
      $queryOptions = new MgFeatureQueryOptions();
      $queryOptions->SetFilter("ZONA='0' AND SETOR='0077'");

      $layer = $map->GetLayers()->GetItem('quadras');

            
      $featureReader = $layer->SelectFeatures($queryOptions);

      $selection = new MgSelection($map);
      $selection->AddFeatures($layer, $featureReader, 0);
      $selectionXml = $selection->ToXml();
      

   
    
    }
catch (MgException $e)
{
echo $e->GetMessage().'<br>';
echo $e->GetDetails().'<br>';
echo $e->GetStackTrace().'<br>';
echo $sessionId.'<br>';
echo $mapName.'<br>';
}
   
    ?>

    
    <script language="javascript">
     
    function Selecao()
    {
   //   alert ('Passou Aqui');
     selectionXml = '<?php echo $selectionXml; ?>';
     quadras.SetSelectionXML(selectionXml);
     quadras.ExecuteMapAction(10);   
     }

    
        
  </script>
  </body>
       <br />


     <iframe id="quadras" name="quadras" style="width:800px;height:600px" src="/mapguide2010/mapviewerphp/ajaxviewer.php?SESSION=<?php echo $sessionId; ?>&WEBLAYOUT=<?php echo $scimLayout; ?>"></iframe>
     </html>
    
    

 BECAUSE THE SAME IT FUNCTIONS ONLY WITH THE TASKPANE? I PLACE THE LINK BELOW AND IT DOES NOT FUNCTION BECAUSE?

Link:

a href="ctm_quadras.php" target="_parent">FILTRAR</a>

 

THANKS

CARLA

 

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are you interested in helping shape the future of the Autodesk Community? To participate in this brief usability study, please click here. Your time and input is greatly appreciated!