Autodesk MapGuide Enterprise Developer
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Error: Resource was not found:
Options
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
336 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_7F 0000010AF20AF10AF0//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/M APA/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/Dat a/quadras.FeatureSource');
$layerFeatureClassName = $layer->GetFeatureClassName();
$FeatureReader=$featureService->SelectFeatures($Da taResId, $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?SES SION=<?php echo $sessionId; ?>&WEBLAYOUT=<?php echo $scimLayout; ?>"></iframe>
</html>
Thanks
Carla Trapé

