Make mapper interface independent from Contao models.

This commit is contained in:
David Molineus
2015-01-08 22:56:23 +01:00
parent 46d261a7a1
commit 082ba4f568
4 changed files with 14 additions and 10 deletions

View File

@@ -16,7 +16,6 @@ use Netzmacht\Contao\Leaflet\Mapper\AbstractTypeMapper;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\LeafletPHP\Definition;
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
use Netzmacht\LeafletPHP\Definition\Vector\Path;
class AbstractVectorMapper extends AbstractTypeMapper
{
@@ -49,7 +48,7 @@ class AbstractVectorMapper extends AbstractTypeMapper
) {
parent::build($definition, $model, $builder, $bounds);
if ($model->addPopup) {
if ($definition instanceof Definition\HasPopup && $model->addPopup) {
$definition->bindPopup($model->popupContent);
}
}