private function LeafletDefaultFormatter::setExistingZoomSettings in Leaflet 2.1.x
Same name and namespace in other branches
- 8 src/Plugin/Field/FieldFormatter/LeafletDefaultFormatter.php \Drupal\leaflet\Plugin\Field\FieldFormatter\LeafletDefaultFormatter::setExistingZoomSettings()
- 2.0.x src/Plugin/Field/FieldFormatter/LeafletDefaultFormatter.php \Drupal\leaflet\Plugin\Field\FieldFormatter\LeafletDefaultFormatter::setExistingZoomSettings()
Sets possibly existing previous settings for the Zoom Form Element.
1 call to LeafletDefaultFormatter::setExistingZoomSettings()
- LeafletDefaultFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ LeafletDefaultFormatter.php - This function is called from parent::view().
File
- src/
Plugin/ Field/ FieldFormatter/ LeafletDefaultFormatter.php, line 462
Class
- LeafletDefaultFormatter
- Plugin implementation of the 'leaflet_default' formatter.
Namespace
Drupal\leaflet\Plugin\Field\FieldFormatterCode
private function setExistingZoomSettings() {
$settings = $this
->getSettings();
if (isset($settings['zoom'])) {
$settings['map_position']['zoom'] = (int) $settings['zoom'];
$settings['map_position']['minZoom'] = (int) $settings['minZoom'];
$settings['map_position']['maxZoom'] = (int) $settings['maxZoom'];
$this
->setSettings($settings);
}
}