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: 

THEY HELP ME PLEASE.

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

THEY HELP ME PLEASE.

IT IS GIVING THIS ERROR: layerMap is null [Parar neste erro] var lyr = layerMap.getItem(layerId);

FOLLOWS THE CODE:

 

<html>

 

<body class="AppFrame">

 

<?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);

 

$resourceID = new MgResourceIdentifier("Library://GUARUJA/CTM_SCIM/MAPA/MAPA_SCIM.MapDefinition");

 

 

 

$mapName = $resourceID->GetName();

 

$map = new MgMap($siteConnection);

 

$map->Create($resourceID,$mapName);

 

$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);

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

$selection = new MgSelection($map);

$selection->AddFeatures($layer, $featureReader, 0);

$selectionXml = $selection->ToXml();

 

 

 

 

}

catch

{

echo

echo

echo

}

 

?>

 

 

<script language="javascript">

 

function Selecao()

{

selectionXml = '<?php echo $selectionXml; ?>';

quadras.SetSelectionXML(selectionXml);

quadras.ExecuteMapAction(10);  

</script>

</body>

 

<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>

 

 

$e->GetMessage().'<br>'; $e->GetDetails().'<br>'; $e->GetStackTrace().'<br>';

THANKS

CRLA

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