class Toolkit_Maps_Map
{
private $googleMapScript = 'google-map.js';
- // {{{ __construct()
+ // {{{ __construct()
/**
* Class constructor
*
* @access public
*/
- public function __construct()
- {
- }
+ public function __construct()
+ {
+ }
- // }}}
+ // }}}
public function setGoogleMapScript($script)
{
$this->googleMapScript = $script;
}
- // {{{ getMemberXML()
+ // {{{ getMemberXML()
/**
* Description of getMemberXML
* @return DOMDocument
* @access public
*/
- public function getMemberXML(array $members)
- {
- $dom = new DOMDocument("1.0");
+ public function getMemberXML(array $members)
+ {
+ $dom = new DOMDocument("1.0");
- $node = $dom->createElement("markers");
- $parNode = $dom->appendChild($node);
+ $node = $dom->createElement("markers");
+ $parNode = $dom->appendChild($node);
- foreach ($members as $i) {
- $node = $dom->createElement("marker");
- $newNode = $parNode->appendChild($node);
+ foreach ($members as $i) {
+ $node = $dom->createElement("marker");
+ $newNode = $parNode->appendChild($node);
- foreach ($i as $k => $v) {
- $newNode->setAttribute($k, $v);
- }
- }
+ foreach ($i as $k => $v) {
+ $newNode->setAttribute($k, $v);
+ }
+ }
- return $dom->saveXML();
- }
+ return $dom->saveXML();
+ }
- // }}}
+ // }}}
- // {{{ toHtml()
+ // {{{ toHtml()
/**
* Description for toHtml
*
* @return string
*/
- public function toHtml($id = "map-canvas", $w = "100%", $h = "400px")
- {
- $GLOBALS['scripts'][]
- = 'http://maps.google.com/maps/api/js?sensor=false';
- $GLOBALS['scripts'][]
- = BASE_URL . 'Toolkit/Maps/js/' . $this->googleMapScript;
+ public function toHtml($id = "map-canvas", $w = "100%", $h = "400px")
+ {
+ $GLOBALS['topScripts'][]
+ = 'http://maps.google.com/maps/api/js?sensor=false';
+ $GLOBALS['bottomScripts'][]
+ = BASE_URL . 'Toolkit/Maps/js/' . $this->googleMapScript;
- $format = '<div id="%s" style="width: %s;height: %s"></div>';
+ $format = '<div id="%s" style="width: %s;height: %s"></div>';
- return sprintf($format, $id, $w, $h);
- }
+ return sprintf($format, $id, $w, $h);
+ }
- // }}}
+ // }}}
}