示例#1
0
<?php 
require '_system/nav.php';
?>

<p>As of now only markers are able to be placed on a static map. Paths and polygons coming soon.</p>

<p>Static maps are created in the same way that regular maps are. The only difference is you call <em>printStaticMap()</em> instead of <em>printMap()</em>. You can pass static options to markers with the initialization array or via <em>$marker->setStaticVar()</em>. Both methods are included in this example.</p>

<p>This example uses the first letter of the city and a random color/size for each marker added to the map.</p>

<img src="<?php 
$map->printStaticMap();
?>
">
<p>This example uses the same markers as the first but has Alaska, and Brazil passed as a viewport.</p>

<img src="<?php 
$map2->printStaticMap(null, array('Alaska', 'Brazil'));
?>
">

<p>This example uses 2 custom icons (one flat marker). Flat markers are anchored using the center of the image.</p>
<img src="<?php 
$map3->printStaticMap();
?>
">

</body>

</html>