Developer's Guide - MapGuide Open Source - OSGeo
Developer's Guide - MapGuide Open Source - OSGeo
Developer's Guide - MapGuide Open Source - OSGeo
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
function OnPageLoad()<br />
{<br />
parent.ZoomToView(,<br />
,<br />
, true);<br />
}<br />
<br />
<br />
<br />
To execute gotopoint.php from the task frame, insert code similar to the<br />
following:<br />
$xLocation = -87.7116768; // Or calculate values<br />
$yLocation = 43.7766789973;<br />
$mapScale = 2000;<br />
echo "Click to position map";<br />
Enumerating Map Layers<br />
Example<br />
Map layers are contained within an MgMap object. To list the layers in a map,<br />
use the MgMap::GetLayers() method. This returns an MgLayerCollection<br />
object.<br />
To retrieve a single layer, use the MgLayerCollection::GetItem method with<br />
either an integer index or a layer name. The layer name is the name as defined<br />
in the map, not the name of the layer definition in the repository.<br />
For example:<br />
$layer = $layers->GetItem('Roads');<br />
The following example lists the layers in a map, along with an indicator of<br />
the layer visibility setting.<br />
28 | Chapter 2 Interacting With Layers