/**
  * {@inheritdoc}
  */
 protected function buildConstructArguments(\Model $model, DefinitionMapper $mapper, Filter $filter = null, $elementId = null)
 {
     $layer = new GeoJson($this->getElementId($model, $elementId));
     $layer->setOptions($this->getLayerOptions($model));
     $request = RequestUrl::create($model->id);
     $elementId = $this->getElementId($model, $elementId);
     $arguments = array($elementId, $request, array(), $layer);
     return $arguments;
 }
 /**
  * {@inheritdoc}
  */
 protected function buildConstructArguments(\Model $model, DefinitionMapper $mapper, Filter $filter = null, $elementId = null)
 {
     if ($model->deferred) {
         $options = array();
         if ($model->pointToLayer) {
             $options['pointToLayer'] = new Expression($model->pointToLayer);
         }
         if ($model->onEachFeature) {
             $options['onEachFeature'] = new Expression($model->onEachFeature);
         }
         if ($model->boundsMode) {
             $options['boundsMode'] = $model->boundsMode;
         }
         if (!empty($options)) {
             $layer = new GeoJson($this->getElementId($model, $elementId));
             $layer->setOptions($options);
             return array($this->getElementId($model, $elementId), RequestUrl::create($model->id, null, null, $filter), array(), $layer);
         }
         return array($this->getElementId($model, $elementId), RequestUrl::create($model->id, null, null, $filter));
     }
     return parent::buildConstructArguments($model, $mapper, $filter, $elementId);
 }