[Map][Leaflet] Add options attributionControl, attributionControlOptions, zoomControl and zoomControlOptions

This commit is contained in:
Danny van Wijk
2025-05-28 13:33:59 +02:00
committed by Hugo Alliaume
parent 7ea619f296
commit 6106ab6183
20 changed files with 380 additions and 15 deletions

View File

@@ -1,5 +1,12 @@
# CHANGELOG
## 2.27
- Add `attributionControl` and `attributionControlOptions` to `LeafletOptions`,
to configure [attribution control](https://leafletjs.com/reference.html#map-attributioncontrol) and its options
- Add `zoomControl` and `zoomControlOptions` to `LeafletOptions`,
to configure [zoom control](https://leafletjs.com/reference.html#map-zoomcontrol) and its options
## 2.26
- Using `new LeafletOptions(tileLayer: false)` will now disable the default `TileLayer`.

View File

@@ -33,7 +33,10 @@ You can use the `LeafletOptions` class to configure your `Map`::
```php
use Symfony\UX\Map\Bridge\Leaflet\LeafletOptions;
use Symfony\UX\Map\Bridge\Leaflet\Option\AttributionControlOptions;
use Symfony\UX\Map\Bridge\Leaflet\Option\ControlPosition;
use Symfony\UX\Map\Bridge\Leaflet\Option\TileLayer;
use Symfony\UX\Map\Bridge\Leaflet\Option\ZoomControlOptions;
use Symfony\UX\Map\Point;
use Symfony\UX\Map\Map;
@@ -50,6 +53,10 @@ $leafletOptions = (new LeafletOptions())
'maxZoom' => 10,
]
))
->attributionControl(false)
->attributionControlOptions(new AttributionControlOptions(ControlPosition::BOTTOM_LEFT))
->zoomControl(false)
->zoomControlOptions(new ZoomControlOptions(ControlPosition::TOP_LEFT))
;
// Add the custom options to the map

View File

@@ -2,8 +2,19 @@ import AbstractMapController from '@symfony/ux-map';
import type { Icon, InfoWindowWithoutPositionDefinition, MarkerDefinition, Point, PolygonDefinition, PolylineDefinition } from '@symfony/ux-map';
import 'leaflet/dist/leaflet.min.css';
import * as L from 'leaflet';
import type { MapOptions as LeafletMapOptions, MarkerOptions, PolylineOptions as PolygonOptions, PolylineOptions, PopupOptions } from 'leaflet';
type MapOptions = Pick<LeafletMapOptions, 'center' | 'zoom'> & {
import type { ControlPosition, MapOptions as LeafletMapOptions, MarkerOptions, PolylineOptions as PolygonOptions, PolylineOptions, PopupOptions } from 'leaflet';
type MapOptions = Pick<LeafletMapOptions, 'center' | 'zoom' | 'attributionControl' | 'zoomControl'> & {
attributionControlOptions?: {
position: ControlPosition;
prefix: string | false;
};
zoomControlOptions?: {
position: ControlPosition;
zoomInText: string;
zoomInTitle: string;
zoomOutText: string;
zoomOutTitle: string;
};
tileLayer: {
url: string;
attribution: string;

View File

@@ -144,6 +144,8 @@ class map_controller extends default_1 {
...options,
center: center === null ? undefined : center,
zoom: zoom === null ? undefined : zoom,
attributionControl: false,
zoomControl: false,
});
if (options.tileLayer) {
L.tileLayer(options.tileLayer.url, {
@@ -151,6 +153,12 @@ class map_controller extends default_1 {
...options.tileLayer.options,
}).addTo(map);
}
if (typeof options.attributionControlOptions !== 'undefined') {
L.control.attribution({ ...options.attributionControlOptions }).addTo(map);
}
if (typeof options.zoomControlOptions !== 'undefined') {
L.control.zoom({ ...options.zoomControlOptions }).addTo(map);
}
return map;
}
doCreateMarker({ definition }) {

View File

@@ -10,6 +10,7 @@ import type {
import 'leaflet/dist/leaflet.min.css';
import * as L from 'leaflet';
import type {
ControlPosition,
LatLngBoundsExpression,
MapOptions as LeafletMapOptions,
MarkerOptions,
@@ -18,7 +19,15 @@ import type {
PopupOptions,
} from 'leaflet';
type MapOptions = Pick<LeafletMapOptions, 'center' | 'zoom'> & {
type MapOptions = Pick<LeafletMapOptions, 'center' | 'zoom' | 'attributionControl' | 'zoomControl'> & {
attributionControlOptions?: { position: ControlPosition; prefix: string | false };
zoomControlOptions?: {
position: ControlPosition;
zoomInText: string;
zoomInTitle: string;
zoomOutText: string;
zoomOutTitle: string;
};
tileLayer: { url: string; attribution: string; options: Record<string, unknown> } | false;
};
@@ -79,6 +88,8 @@ export default class extends AbstractMapController<
...options,
center: center === null ? undefined : center,
zoom: zoom === null ? undefined : zoom,
attributionControl: false,
zoomControl: false,
});
if (options.tileLayer) {
@@ -88,6 +99,14 @@ export default class extends AbstractMapController<
}).addTo(map);
}
if (typeof options.attributionControlOptions !== 'undefined') {
L.control.attribution({ ...options.attributionControlOptions }).addTo(map);
}
if (typeof options.zoomControlOptions !== 'undefined') {
L.control.zoom({ ...options.zoomControlOptions }).addTo(map);
}
return map;
}

View File

@@ -11,7 +11,9 @@
namespace Symfony\UX\Map\Bridge\Leaflet;
use Symfony\UX\Map\Bridge\Leaflet\Option\AttributionControlOptions;
use Symfony\UX\Map\Bridge\Leaflet\Option\TileLayer;
use Symfony\UX\Map\Bridge\Leaflet\Option\ZoomControlOptions;
use Symfony\UX\Map\MapOptionsInterface;
/**
@@ -24,6 +26,10 @@ final class LeafletOptions implements MapOptionsInterface
url: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
),
private bool $attributionControl = true,
private AttributionControlOptions $attributionControlOptions = new AttributionControlOptions(),
private bool $zoomControl = true,
private ZoomControlOptions $zoomControlOptions = new ZoomControlOptions(),
) {
}
@@ -34,14 +40,58 @@ final class LeafletOptions implements MapOptionsInterface
return $this;
}
public function attributionControl(bool $enable = true): self
{
$this->attributionControl = $enable;
return $this;
}
public function attributionControlOptions(AttributionControlOptions $attributionControlOptions): self
{
$this->attributionControl = true;
$this->attributionControlOptions = $attributionControlOptions;
return $this;
}
public function zoomControl(bool $enable = true): self
{
$this->zoomControl = $enable;
return $this;
}
public function zoomControlOptions(ZoomControlOptions $zoomControlOptions): self
{
$this->zoomControl = true;
$this->zoomControlOptions = $zoomControlOptions;
return $this;
}
/**
* @internal
*/
public static function fromArray(array $array): MapOptionsInterface
{
return new self(
tileLayer: $array['tileLayer'] ? TileLayer::fromArray($array['tileLayer']) : false,
);
$array += ['attributionControl' => false, 'zoomControl' => false, 'tileLayer' => false];
if ($array['tileLayer']) {
$array['tileLayer'] = TileLayer::fromArray($array['tileLayer']);
}
if (isset($array['attributionControlOptions'])) {
$array['attributionControl'] = true;
$array['attributionControlOptions'] = AttributionControlOptions::fromArray($array['attributionControlOptions']);
}
if (isset($array['zoomControlOptions'])) {
$array['zoomControl'] = true;
$array['zoomControlOptions'] = ZoomControlOptions::fromArray($array['zoomControlOptions']);
}
return new self(...$array);
}
/**
@@ -49,8 +99,18 @@ final class LeafletOptions implements MapOptionsInterface
*/
public function toArray(): array
{
return [
$array = [
'tileLayer' => $this->tileLayer ? $this->tileLayer->toArray() : false,
];
if ($this->attributionControl) {
$array['attributionControlOptions'] = $this->attributionControlOptions->toArray();
}
if ($this->zoomControl) {
$array['zoomControlOptions'] = $this->zoomControlOptions->toArray();
}
return $array;
}
}

View File

@@ -0,0 +1,48 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\UX\Map\Bridge\Leaflet\Option;
/**
* Options for the rendering of the attribution control.
*
* @see https://leafletjs.com/reference.html#control-zoom
*/
final class AttributionControlOptions
{
public function __construct(
private readonly ControlPosition $position = ControlPosition::BOTTOM_RIGHT,
private readonly string|false $prefix = 'Leaflet',
) {
}
/**
* @internal
*/
public static function fromArray(array $array): self
{
return new self(
position: ControlPosition::from($array['position']),
prefix: $array['prefix'],
);
}
/**
* @internal
*/
public function toArray(): array
{
return [
'position' => $this->position->value,
'prefix' => $this->prefix,
];
}
}

View File

@@ -0,0 +1,23 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\UX\Map\Bridge\Leaflet\Option;
/**
* @see https://leafletjs.com/reference.html#control-position
*/
enum ControlPosition: string
{
case TOP_LEFT = 'topleft';
case TOP_RIGHT = 'topright';
case BOTTOM_LEFT = 'bottomleft';
case BOTTOM_RIGHT = 'bottomright';
}

View File

@@ -0,0 +1,55 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\UX\Map\Bridge\Leaflet\Option;
/**
* Options for the rendering of the zoom control.
*
* @see https://leafletjs.com/reference.html#control-zoom
*/
final class ZoomControlOptions
{
public function __construct(
private readonly ControlPosition $position = ControlPosition::TOP_LEFT,
private readonly string $zoomInText = '<span aria-hidden="true">+</span>',
private readonly string $zoomInTitle = 'Zoom in',
private readonly string $zoomOutText = '<span aria-hidden="true">&#x2212;</span>',
private readonly string $zoomOutTitle = 'Zoom out',
) {
}
/**
* @internal
*/
public static function fromArray(array $array): self
{
if (isset($array['position'])) {
$array['position'] = ControlPosition::from($array['position']);
}
return new self(...$array);
}
/**
* @internal
*/
public function toArray(): array
{
return [
'position' => $this->position->value,
'zoomInText' => $this->zoomInText,
'zoomInTitle' => $this->zoomInTitle,
'zoomOutText' => $this->zoomOutText,
'zoomOutTitle' => $this->zoomOutTitle,
];
}
}

View File

@@ -27,6 +27,17 @@ class LeafletOptionsTest extends TestCase
'attribution' => '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
'options' => [],
],
'attributionControlOptions' => [
'position' => 'bottomright',
'prefix' => 'Leaflet',
],
'zoomControlOptions' => [
'position' => 'topleft',
'zoomInText' => '<span aria-hidden="true">+</span>',
'zoomInTitle' => 'Zoom in',
'zoomOutText' => '<span aria-hidden="true">&#x2212;</span>',
'zoomOutTitle' => 'Zoom out',
],
], $leafletOptions->toArray());
self::assertEquals($leafletOptions, LeafletOptions::fromArray($leafletOptions->toArray()));
@@ -58,6 +69,17 @@ class LeafletOptionsTest extends TestCase
'zoomOffset' => 0,
],
],
'attributionControlOptions' => [
'position' => 'bottomright',
'prefix' => 'Leaflet',
],
'zoomControlOptions' => [
'position' => 'topleft',
'zoomInText' => '<span aria-hidden="true">+</span>',
'zoomInTitle' => 'Zoom in',
'zoomOutText' => '<span aria-hidden="true">&#x2212;</span>',
'zoomOutTitle' => 'Zoom out',
],
], $leafletOptions->toArray());
self::assertEquals($leafletOptions, LeafletOptions::fromArray($leafletOptions->toArray()));
@@ -69,6 +91,35 @@ class LeafletOptionsTest extends TestCase
self::assertSame([
'tileLayer' => false,
'attributionControlOptions' => [
'position' => 'bottomright',
'prefix' => 'Leaflet',
],
'zoomControlOptions' => [
'position' => 'topleft',
'zoomInText' => '<span aria-hidden="true">+</span>',
'zoomInTitle' => 'Zoom in',
'zoomOutText' => '<span aria-hidden="true">&#x2212;</span>',
'zoomOutTitle' => 'Zoom out',
],
], $leafletOptions->toArray());
self::assertEquals($leafletOptions, LeafletOptions::fromArray($leafletOptions->toArray()));
}
public function testWithoutControls(): void
{
$leafletOptions = new LeafletOptions(
attributionControl: false,
zoomControl: false,
);
self::assertSame([
'tileLayer' => [
'url' => 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
'attribution' => '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
'options' => [],
],
], $leafletOptions->toArray());
self::assertEquals($leafletOptions, LeafletOptions::fromArray($leafletOptions->toArray()));

View File

@@ -0,0 +1,42 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\UX\Map\Bridge\Leaflet\Tests\Option;
use PHPUnit\Framework\TestCase;
use Symfony\UX\Map\Bridge\Leaflet\Option\AttributionControlOptions;
use Symfony\UX\Map\Bridge\Leaflet\Option\ControlPosition;
class AttributionControlOptionsTest extends TestCase
{
public function testToArray(): void
{
$options = new AttributionControlOptions();
self::assertSame([
'position' => ControlPosition::BOTTOM_RIGHT->value,
'prefix' => 'Leaflet',
], $options->toArray());
}
public function testToArrayWithDifferentConfiguration(): void
{
$options = new AttributionControlOptions(
position: ControlPosition::BOTTOM_LEFT,
prefix: 'Leaflet prefix',
);
self::assertSame([
'position' => ControlPosition::BOTTOM_LEFT->value,
'prefix' => 'Leaflet prefix',
], $options->toArray());
}
}

View File

@@ -0,0 +1,34 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\UX\Map\Bridge\Leaflet\Tests\Option;
use PHPUnit\Framework\TestCase;
use Symfony\UX\Map\Bridge\Leaflet\Option\ControlPosition;
use Symfony\UX\Map\Bridge\Leaflet\Option\ZoomControlOptions;
class ZoomControlOptionsTest extends TestCase
{
public function testToArray(): void
{
$options = new ZoomControlOptions(
position: ControlPosition::TOP_LEFT,
);
self::assertSame([
'position' => ControlPosition::TOP_LEFT->value,
'zoomInText' => '<span aria-hidden="true">+</span>',
'zoomInTitle' => 'Zoom in',
'zoomOutText' => '<span aria-hidden="true">&#x2212;</span>',
'zoomOutTitle' => 'Zoom out',
], $options->toArray());
}
}

View File

@@ -6,7 +6,7 @@
data-symfony--ux-leaflet-map--map-center-value="{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522}"
data-symfony--ux-leaflet-map--map-zoom-value="12"
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;attributionControlOptions&quot;:{&quot;position&quot;:&quot;bottomright&quot;,&quot;prefix&quot;:&quot;Leaflet&quot;},&quot;zoomControlOptions&quot;:{&quot;position&quot;:&quot;topleft&quot;,&quot;zoomInText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;+&lt;\/span&gt;&quot;,&quot;zoomInTitle&quot;:&quot;Zoom in&quot;,&quot;zoomOutText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;#x2212;&lt;\/span&gt;&quot;,&quot;zoomOutTitle&quot;:&quot;Zoom out&quot;},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-markers-value="[{&quot;position&quot;:{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522},&quot;title&quot;:&quot;Paris&quot;,&quot;infoWindow&quot;:null,&quot;icon&quot;:{&quot;type&quot;:&quot;url&quot;,&quot;width&quot;:32,&quot;height&quot;:32,&quot;url&quot;:&quot;https:\/\/cdn.jsdelivr.net\/npm\/bootstrap-icons@1.11.3\/icons\/geo-alt.svg&quot;},&quot;extra&quot;:[],&quot;id&quot;:null,&quot;@id&quot;:&quot;217fa57668ad8e64&quot;},{&quot;position&quot;:{&quot;lat&quot;:45.764,&quot;lng&quot;:4.8357},&quot;title&quot;:&quot;Lyon&quot;,&quot;infoWindow&quot;:null,&quot;icon&quot;:{&quot;type&quot;:&quot;ux-icon&quot;,&quot;width&quot;:32,&quot;height&quot;:32,&quot;name&quot;:&quot;fa:map-marker&quot;,&quot;_generated_html&quot;:&quot;&lt;svg xmlns=\&quot;http:\/\/www.w3.org\/2000\/svg\&quot; width=\&quot;24\&quot; height=\&quot;24\&quot;&gt;...&lt;\/svg&gt;&quot;},&quot;extra&quot;:[],&quot;id&quot;:null,&quot;@id&quot;:&quot;255b208136900fc0&quot;},{&quot;position&quot;:{&quot;lat&quot;:45.8566,&quot;lng&quot;:2.3522},&quot;title&quot;:&quot;Dijon&quot;,&quot;infoWindow&quot;:null,&quot;icon&quot;:{&quot;type&quot;:&quot;svg&quot;,&quot;width&quot;:24,&quot;height&quot;:24,&quot;html&quot;:&quot;&lt;svg xmlns=\&quot;http:\/\/www.w3.org\/2000\/svg\&quot; width=\&quot;24\&quot; height=\&quot;24\&quot;&gt;...&lt;\/svg&gt;&quot;},&quot;extra&quot;:[],&quot;id&quot;:null,&quot;@id&quot;:&quot;1a410e92214f770c&quot;}]"
data-symfony--ux-leaflet-map--map-polygons-value="[]"
data-symfony--ux-leaflet-map--map-polylines-value="[]"

View File

@@ -6,7 +6,7 @@
data-symfony--ux-leaflet-map--map-center-value="{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522}"
data-symfony--ux-leaflet-map--map-zoom-value="12"
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;attributionControlOptions&quot;:{&quot;position&quot;:&quot;bottomright&quot;,&quot;prefix&quot;:&quot;Leaflet&quot;},&quot;zoomControlOptions&quot;:{&quot;position&quot;:&quot;topleft&quot;,&quot;zoomInText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;+&lt;\/span&gt;&quot;,&quot;zoomInTitle&quot;:&quot;Zoom in&quot;,&quot;zoomOutText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;#x2212;&lt;\/span&gt;&quot;,&quot;zoomOutTitle&quot;:&quot;Zoom out&quot;},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-markers-value="[]"
data-symfony--ux-leaflet-map--map-polygons-value="[]"
data-symfony--ux-leaflet-map--map-polylines-value="[]"

View File

@@ -6,7 +6,7 @@
data-symfony--ux-leaflet-map--map-center-value="{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522}"
data-symfony--ux-leaflet-map--map-zoom-value="12"
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;attributionControlOptions&quot;:{&quot;position&quot;:&quot;bottomright&quot;,&quot;prefix&quot;:&quot;Leaflet&quot;},&quot;zoomControlOptions&quot;:{&quot;position&quot;:&quot;topleft&quot;,&quot;zoomInText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;+&lt;\/span&gt;&quot;,&quot;zoomInTitle&quot;:&quot;Zoom in&quot;,&quot;zoomOutText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;#x2212;&lt;\/span&gt;&quot;,&quot;zoomOutTitle&quot;:&quot;Zoom out&quot;},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-markers-value="[]"
data-symfony--ux-leaflet-map--map-polygons-value="[]"
data-symfony--ux-leaflet-map--map-polylines-value="[]"

View File

@@ -6,7 +6,7 @@
data-symfony--ux-leaflet-map--map-center-value="{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522}"
data-symfony--ux-leaflet-map--map-zoom-value="12"
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;attributionControlOptions&quot;:{&quot;position&quot;:&quot;bottomright&quot;,&quot;prefix&quot;:&quot;Leaflet&quot;},&quot;zoomControlOptions&quot;:{&quot;position&quot;:&quot;topleft&quot;,&quot;zoomInText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;+&lt;\/span&gt;&quot;,&quot;zoomInTitle&quot;:&quot;Zoom in&quot;,&quot;zoomOutText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;#x2212;&lt;\/span&gt;&quot;,&quot;zoomOutTitle&quot;:&quot;Zoom out&quot;},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-markers-value="[]"
data-symfony--ux-leaflet-map--map-polygons-value="[]"
data-symfony--ux-leaflet-map--map-polylines-value="[]"

View File

@@ -6,7 +6,7 @@
data-symfony--ux-leaflet-map--map-center-value="{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522}"
data-symfony--ux-leaflet-map--map-zoom-value="12"
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;attributionControlOptions&quot;:{&quot;position&quot;:&quot;bottomright&quot;,&quot;prefix&quot;:&quot;Leaflet&quot;},&quot;zoomControlOptions&quot;:{&quot;position&quot;:&quot;topleft&quot;,&quot;zoomInText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;+&lt;\/span&gt;&quot;,&quot;zoomInTitle&quot;:&quot;Zoom in&quot;,&quot;zoomOutText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;#x2212;&lt;\/span&gt;&quot;,&quot;zoomOutTitle&quot;:&quot;Zoom out&quot;},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-markers-value="[{&quot;position&quot;:{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522},&quot;title&quot;:&quot;Paris&quot;,&quot;infoWindow&quot;:null,&quot;icon&quot;:null,&quot;extra&quot;:[],&quot;id&quot;:&quot;marker1&quot;,&quot;@id&quot;:&quot;872feba9ebf3905d&quot;},{&quot;position&quot;:{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522},&quot;title&quot;:&quot;Lyon&quot;,&quot;infoWindow&quot;:{&quot;headerContent&quot;:null,&quot;content&quot;:&quot;Lyon&quot;,&quot;position&quot;:null,&quot;opened&quot;:false,&quot;autoClose&quot;:true,&quot;extra&quot;:[]},&quot;icon&quot;:null,&quot;extra&quot;:[],&quot;id&quot;:&quot;marker2&quot;,&quot;@id&quot;:&quot;6028bf5e41f644ab&quot;}]"
data-symfony--ux-leaflet-map--map-polygons-value="[]"
data-symfony--ux-leaflet-map--map-polylines-value="[]"

View File

@@ -6,7 +6,7 @@
data-symfony--ux-leaflet-map--map-center-value="{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522}"
data-symfony--ux-leaflet-map--map-zoom-value="12"
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;attributionControlOptions&quot;:{&quot;position&quot;:&quot;bottomright&quot;,&quot;prefix&quot;:&quot;Leaflet&quot;},&quot;zoomControlOptions&quot;:{&quot;position&quot;:&quot;topleft&quot;,&quot;zoomInText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;+&lt;\/span&gt;&quot;,&quot;zoomInTitle&quot;:&quot;Zoom in&quot;,&quot;zoomOutText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;#x2212;&lt;\/span&gt;&quot;,&quot;zoomOutTitle&quot;:&quot;Zoom out&quot;},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-markers-value="[{&quot;position&quot;:{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522},&quot;title&quot;:&quot;Paris&quot;,&quot;infoWindow&quot;:null,&quot;icon&quot;:null,&quot;extra&quot;:[],&quot;id&quot;:&quot;marker1&quot;,&quot;@id&quot;:&quot;872feba9ebf3905d&quot;},{&quot;position&quot;:{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522},&quot;title&quot;:&quot;Lyon&quot;,&quot;infoWindow&quot;:{&quot;headerContent&quot;:null,&quot;content&quot;:&quot;Lyon&quot;,&quot;position&quot;:null,&quot;opened&quot;:false,&quot;autoClose&quot;:true,&quot;extra&quot;:[]},&quot;icon&quot;:null,&quot;extra&quot;:[],&quot;id&quot;:null,&quot;@id&quot;:&quot;bce206d73dc5c164&quot;}]"
data-symfony--ux-leaflet-map--map-polygons-value="[]"
data-symfony--ux-leaflet-map--map-polylines-value="[]"

View File

@@ -6,7 +6,7 @@
data-symfony--ux-leaflet-map--map-center-value="{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522}"
data-symfony--ux-leaflet-map--map-zoom-value="12"
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;attributionControlOptions&quot;:{&quot;position&quot;:&quot;bottomright&quot;,&quot;prefix&quot;:&quot;Leaflet&quot;},&quot;zoomControlOptions&quot;:{&quot;position&quot;:&quot;topleft&quot;,&quot;zoomInText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;+&lt;\/span&gt;&quot;,&quot;zoomInTitle&quot;:&quot;Zoom in&quot;,&quot;zoomOutText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;#x2212;&lt;\/span&gt;&quot;,&quot;zoomOutTitle&quot;:&quot;Zoom out&quot;},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-markers-value="[]"
data-symfony--ux-leaflet-map--map-polygons-value="[{&quot;points&quot;:[{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522},{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522},{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522}],&quot;title&quot;:null,&quot;infoWindow&quot;:null,&quot;extra&quot;:[],&quot;id&quot;:&quot;polygon1&quot;,&quot;@id&quot;:&quot;35bfa920335b849d&quot;},{&quot;points&quot;:[{&quot;lat&quot;:1.1,&quot;lng&quot;:2.2},{&quot;lat&quot;:3.3,&quot;lng&quot;:4.4},{&quot;lat&quot;:5.5,&quot;lng&quot;:6.6}],&quot;title&quot;:null,&quot;infoWindow&quot;:{&quot;headerContent&quot;:null,&quot;content&quot;:&quot;Polygon&quot;,&quot;position&quot;:null,&quot;opened&quot;:false,&quot;autoClose&quot;:true,&quot;extra&quot;:[]},&quot;extra&quot;:[],&quot;id&quot;:&quot;polygon2&quot;,&quot;@id&quot;:&quot;7be1fe9f10489d73&quot;}]"
data-symfony--ux-leaflet-map--map-polylines-value="[]"

View File

@@ -6,7 +6,7 @@
data-symfony--ux-leaflet-map--map-center-value="{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522}"
data-symfony--ux-leaflet-map--map-zoom-value="12"
data-symfony--ux-leaflet-map--map-fit-bounds-to-markers-value="false"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-options-value="{&quot;tileLayer&quot;:{&quot;url&quot;:&quot;https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png&quot;,&quot;attribution&quot;:&quot;\u00a9 &lt;a href=\&quot;https:\/\/www.openstreetmap.org\/copyright\&quot;&gt;OpenStreetMap&lt;\/a&gt;&quot;,&quot;options&quot;:[]},&quot;attributionControlOptions&quot;:{&quot;position&quot;:&quot;bottomright&quot;,&quot;prefix&quot;:&quot;Leaflet&quot;},&quot;zoomControlOptions&quot;:{&quot;position&quot;:&quot;topleft&quot;,&quot;zoomInText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;+&lt;\/span&gt;&quot;,&quot;zoomInTitle&quot;:&quot;Zoom in&quot;,&quot;zoomOutText&quot;:&quot;&lt;span aria-hidden=\&quot;true\&quot;&gt;&amp;#x2212;&lt;\/span&gt;&quot;,&quot;zoomOutTitle&quot;:&quot;Zoom out&quot;},&quot;@provider&quot;:&quot;leaflet&quot;}"
data-symfony--ux-leaflet-map--map-markers-value="[]"
data-symfony--ux-leaflet-map--map-polygons-value="[]"
data-symfony--ux-leaflet-map--map-polylines-value="[{&quot;points&quot;:[{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522},{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522},{&quot;lat&quot;:48.8566,&quot;lng&quot;:2.3522}],&quot;title&quot;:null,&quot;infoWindow&quot;:null,&quot;extra&quot;:[],&quot;id&quot;:&quot;polyline1&quot;,&quot;@id&quot;:&quot;823f6ee5acdb5db3&quot;},{&quot;points&quot;:[{&quot;lat&quot;:1.1,&quot;lng&quot;:2.2},{&quot;lat&quot;:3.3,&quot;lng&quot;:4.4},{&quot;lat&quot;:5.5,&quot;lng&quot;:6.6}],&quot;title&quot;:null,&quot;infoWindow&quot;:{&quot;headerContent&quot;:null,&quot;content&quot;:&quot;Polyline&quot;,&quot;position&quot;:null,&quot;opened&quot;:false,&quot;autoClose&quot;:true,&quot;extra&quot;:[]},&quot;extra&quot;:[],&quot;id&quot;:&quot;polyline2&quot;,&quot;@id&quot;:&quot;77fb0e390b5e91f1&quot;}]"