public function getJs()
    {
        $name = $this->getName();
        $reflection = new \ReflectionClass($this);
        $object = $reflection->getShortName();
        $js[] = "var {$name} = new google.maps.{$object}();";
        $js[] = "$name.setMap({$this->map});";

        return implode("\n", $js);
    }
public function getJs()
    {
        $name = $this->getName();
        $reflection = new \ReflectionClass($this);
        $object = $reflection->getShortName();
        $js[] = "var {$name} = new google.maps.{$object}();";
        $js[] = "$name.setMap({$this->map});";

        return implode("\n", $js);
    }
public function getJs ( ) { $ name = $ this -> getName ( ) ; $ reflection = new \ ReflectionClass ( $ this ) ; $ object = $ reflection -> getShortName ( ) ; $ js [ ] = "var {$name} = new google.maps.{$object}();" ; $ js [ ] = "$name.setMap({$this->map});" ; return implode ( "\n" , $ js ) ; }
Returns the javascript code required to initialize the object
@return mixed
Returns the javascript code required to initialize the object