Infrastructure Map Server Developer

Infrastructure Map Server Developer

Reply
Contributor
Trape
Posts: 19
Registered: ‎12-16-2009
Message 1 of 1 (464 Views)

Error: Resource was not found:

464 Views, 0 Replies
01-18-2011 05:48 AM
Please, somebody knows because of this error:
Error: Resource was not found: Session:35bee22e-0531-102e-8000-000c2927b627_en_7F0000010AF20AF10AF0//MAPA_SCIM.Map.
my code:
 <html>
 
 <body class="AppFrame" onLoad="Selecao()">
 
 <?php
    include '/mapguide2010/mapviewerphp/common.php';
    include 'chamando_mapa.php';
    include '/mapguide2010/mapviewerphp/constants.php';
    try
    {
      MgInitializeWebTier ($configFilePath);

      $userInfo = new MgUserInformation($sessionId);
      $siteConnection = new MgSiteConnection();
      $siteConnection->Open($userInfo);
 
      $featureService=$siteConnection->CreateService(2);
     $resourceID = new MgResourceIdentifier("Library://GUARUJA/CTM_SCIM/MAPA/MAPA_SCIM.MapDefinition");
      //$resourceID->Validade();
      $mapName = $resourceID->GetName();
      $map = new MgMap($siteConnection);
      $map->Create($resourceID,$mapName);
      $map->Open($mapName);
      $map->Save($featureService,$resourceID);
      $resourceID->Validade(); 
     
     
     $query=new MgFeatureQueryOptions();
     $query->SetFilter("ZONA='0' AND SETOR='0077'");
      
     $DataResId= new MgResourceIdentifier('Library://GUARUJA/LAYERS/Data/quadras.FeatureSource');
     $layerFeatureClassName = $layer->GetFeatureClassName();
     $FeatureReader=$featureService->SelectFeatures($DataResId, $layerFeatureClassName,$query);
     $layer=$map->GetLayers()->GetItem('quadras');
     $selection=new MgSelection($featureService,$resourceID);
     $selection->AddFeatures($layer,$FeatureReader,0);
     $selectionXml=$selection->ToXml();
    
    }
    catch (MgException $e)
    {
      echo $e->GetMessage().'<br>';
      echo $e->GetDetails().'<br>';
   }
?>

    
    <script language="javascript">
     
    function Selecao()
    {
   //   alert ('Passou Aqui');
     selectionXml = '<?php echo $selectionXml; ?>';
     quadras.SetSelectionXML(selectionXml);
     quadras.ExecuteMapAction(10);   
     }
  </script>
  </body>
    <input type="button" name="Filtar" value="Filtrar" onclick="Selecao()" />
   <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>
    
    

 

Thanks
Carla Trapé
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!