예제 #1
0
 /**
  * Renders and returns the output.
  * @see ParserHook::render
  * 
  * @since 0.7
  * 
  * @param array $parameters
  * 
  * @return string
  */
 public function render(array $parameters)
 {
     // Get the instance of the service class.
     $service = MapsMappingServices::getServiceInstance($parameters['mappingservice'], $this->getName());
     $mapClass = new MapsDisplayMapRenderer($service);
     $fullParams = $this->validator->getParameters();
     if (array_key_exists('zoom', $fullParams) && $fullParams['zoom']->wasSetToDefault() && count($parameters['coordinates']) > 1) {
         $parameters['zoom'] = false;
     }
     global $egMapsEnableCategory;
     if ($egMapsEnableCategory) {
         $this->parser->addTrackingCategory('maps-tracking-category');
     }
     return $mapClass->renderMap($parameters, $this->parser);
 }