<?php
namespace Website\Widgets\Map; use Moto; class Widget extends Moto\System\Widgets\AbstractWidget { protected $_name = 'map'; protected static $_defaultProperties = array( 'preset' => 'default', 'height' => 200, 'animation' => '', 'visible_on' => 'mobile-v', 'spacing' => array( 'top' => 'auto', 'right' => 'auto', 'bottom' => 'auto', 'left' => 'auto', ), 'api' => array( 'geoLoc' => 'New York, USA', 'zoom' => '10', ), ); protected static $_protectedProperties = array( 'api' => array( 'url' => '//maps.google.com/maps?', ), ); protected $_templateType = 'templates'; protected $_widgetId = true; public function getApiSrc() { return $this->getPropertyValue('api.url') . 'q=' . $this->getPropertyValue('api.geoLoc') . '&z=' . $this->getPropertyValue('api.zoom') . '&t=m&output=embed'; } } 