Infrastructure Map Server Forum
Welcome to Autodesk’s Infrastructure Map Server Forums. Share your knowledge, ask questions, and explore popular Infrastructure Map Server topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IT ONLY FUNCTIONS WITH THE TASKPANE BECAUSE?

0 REPLIES 0
Reply
Message 1 of 1
Trape
458 Views, 0 Replies

IT ONLY FUNCTIONS WITH THE TASKPANE BECAUSE?

 

 

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

 

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report