<div>Hi!</div> <div> </div> <div>Why don't you use mapguide studio to create a webLayout and then define its address in your library by PHP?(As the code you've written for the mapDefinition)<BR><BR><B><I>mates <reklamama@centrum.sk></I></B> wrote:</div> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>I create a map and then i add a layer. Now i need it to show the map in the<BR>browser, but i don't know how to do it using PHP :( <BR>Can you help me pls?<BR><BR><?php<br><BR>include "constants.php";<BR>MgInitializeWebTier('webconfig.ini');<BR><BR>$site = new MgSite();<BR>$userInfo = new MgUserInformation("Administrator", "admin");<BR><BR>$site->Open($userInfo);<BR><BR>$id = $site->CreateSession();<BR><BR>$siteConnection = new MgSiteConnection();<BR>$siteConnection->Open($userInfo);<BR>$resourceService =<BR>$siteConnection->CreateService(MgServiceType::ResourceService);<BR><BR>$mapDefId = new
MgResourceIdentifier("Library://22/mapa.MapDefinition");<BR>$map = new MgMap();<BR>$mapName = $mapDefId->GetName();<BR>$map->Create($resourceService, $mapDefId, $mapName);<BR><BR>$LayID = new MgResourceIdentifier("Library://22/kraje.LayerDefinition");<BR><BR>$newLayer = new MgLayer($LayID, $resourceService);<BR><BR>$newLayer->SetVisible(true);<BR>$newLayer->SetLegendLabel($newLayer->GetName());<BR>$newLayer->SetDisplayInLegend(true);<BR><BR>$layerCollection->Insert(0, $newLayer);<BR><BR>$mapId = new MgResourceIdentifier("Session:$id//$name." .<BR>MgResourceType::Map);<BR>$map->Save($resourceService, $mapId);<BR><BR>And what now? :)<BR>-- <BR>View this message in context: http://www.nabble.com/How-to-show-a-map-%28PHP%29-tf3973550s16610.html#a11279107<BR>Sent from the MapGuide Users mailing list archive at Nabble.com.<BR><BR>_______________________________________________<BR>mapguide-users mailing
list<BR>mapguide-users@lists.osgeo.org<BR>http://lists.osgeo.org/mailman/listinfo/mapguide-users<BR></BLOCKQUOTE><BR><p> 
<hr size=1>Need a vacation? <a href="http://us.rd.yahoo.com/evt=48256/*http://travel.yahoo.com/;_ylc=X3oDMTFhN2hucjlpBF9TAzk3NDA3NTg5BHBvcwM1BHNlYwNncm91cHMEc2xrA2VtYWlsLW5jbQ--">Get great deals
to amazing places </a>on Yahoo! Travel.