/** * @see MapsLayer::getParameterDefinitions * * @since 0.7.2 * * @return array */ protected function getParameterDefinitions() { $params = parent::getParameterDefinitions(); $params['source'] = new Parameter('source'); $params['source']->addCriteria(new CriterionIsImage()); $params['source']->addManipulations(new MapsParamFile()); $params['maxdepth'] = new Parameter('maxdepth', Parameter::TYPE_INTEGER, 2); return $params; }
/** * @see MapsLayer::getParameterDefinitions * * @since 0.7.2 * * @return array */ protected function getParameterDefinitions() { $params = parent::getParameterDefinitions(); // map extent for extents bound object: $params['topextent'] = array('type' => 'float', 'aliases' => array('upperbound', 'topbound'), 'message' => 'maps-displaymap-par-coordinates'); $params['rightextent'] = array('type' => 'float', 'aliases' => array('rightbound'), 'message' => 'maps-displaymap-par-coordinates'); $params['bottomextent'] = array('type' => 'float', 'aliases' => array('lowerbound', 'bottombound'), 'message' => 'maps-displaymap-par-coordinates'); $params['leftextent'] = array('type' => 'float', 'aliases' => array('leftbound'), 'message' => 'maps-displaymap-par-coordinates'); // image-source information: $params['source'] = array('message' => 'maps-displaymap-par-coordinates', 'post-format' => function ($source) { $imageUrl = MapsMapper::getFileUrl($source); global $egMapsAllowExternalImages; if ($imageUrl === '' && $egMapsAllowExternalImages) { return $source; } return $imageUrl; }); $params['width'] = array('type' => 'float', 'message' => 'maps-displaymap-par-coordinates'); $params['height'] = array('type' => 'float', 'message' => 'maps-displaymap-par-coordinates'); return $params; }