mirror of
https://github.com/symfony/ux-leaflet-map.git
synced 2026-03-23 16:42:19 +01:00
[Map][Leaflet] Add options attributionControl, attributionControlOptions, zoomControl and zoomControlOptions
This commit is contained in:
committed by
Hugo Alliaume
parent
7ea619f296
commit
6106ab6183
@@ -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`.
|
||||
|
||||
@@ -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
|
||||
|
||||
15
assets/dist/map_controller.d.ts
vendored
15
assets/dist/map_controller.d.ts
vendored
@@ -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;
|
||||
|
||||
8
assets/dist/map_controller.js
vendored
8
assets/dist/map_controller.js
vendored
@@ -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 }) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
48
src/Option/AttributionControlOptions.php
Normal file
48
src/Option/AttributionControlOptions.php
Normal 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,
|
||||
];
|
||||
}
|
||||
}
|
||||
23
src/Option/ControlPosition.php
Normal file
23
src/Option/ControlPosition.php
Normal 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';
|
||||
}
|
||||
55
src/Option/ZoomControlOptions.php
Normal file
55
src/Option/ZoomControlOptions.php
Normal 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">−</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,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -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">−</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">−</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">−</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()));
|
||||
|
||||
42
tests/Option/AttributionControlOptionsTest.php
Normal file
42
tests/Option/AttributionControlOptionsTest.php
Normal 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());
|
||||
}
|
||||
}
|
||||
34
tests/Option/ZoomControlOptionsTest.php
Normal file
34
tests/Option/ZoomControlOptionsTest.php
Normal 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">−</span>',
|
||||
'zoomOutTitle' => 'Zoom out',
|
||||
], $options->toArray());
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":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="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <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"},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-markers-value="[{"position":{"lat":48.8566,"lng":2.3522},"title":"Paris","infoWindow":null,"icon":{"type":"url","width":32,"height":32,"url":"https:\/\/cdn.jsdelivr.net\/npm\/bootstrap-icons@1.11.3\/icons\/geo-alt.svg"},"extra":[],"id":null,"@id":"217fa57668ad8e64"},{"position":{"lat":45.764,"lng":4.8357},"title":"Lyon","infoWindow":null,"icon":{"type":"ux-icon","width":32,"height":32,"name":"fa:map-marker","_generated_html":"<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\">...<\/svg>"},"extra":[],"id":null,"@id":"255b208136900fc0"},{"position":{"lat":45.8566,"lng":2.3522},"title":"Dijon","infoWindow":null,"icon":{"type":"svg","width":24,"height":24,"html":"<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\">...<\/svg>"},"extra":[],"id":null,"@id":"1a410e92214f770c"}]"
|
||||
data-symfony--ux-leaflet-map--map-polygons-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polylines-value="[]"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":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="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <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"},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-markers-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polygons-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polylines-value="[]"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":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="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <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"},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-markers-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polygons-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polylines-value="[]"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":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="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <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"},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-markers-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polygons-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polylines-value="[]"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":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="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <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"},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-markers-value="[{"position":{"lat":48.8566,"lng":2.3522},"title":"Paris","infoWindow":null,"icon":null,"extra":[],"id":"marker1","@id":"872feba9ebf3905d"},{"position":{"lat":48.8566,"lng":2.3522},"title":"Lyon","infoWindow":{"headerContent":null,"content":"Lyon","position":null,"opened":false,"autoClose":true,"extra":[]},"icon":null,"extra":[],"id":"marker2","@id":"6028bf5e41f644ab"}]"
|
||||
data-symfony--ux-leaflet-map--map-polygons-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polylines-value="[]"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":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="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <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"},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-markers-value="[{"position":{"lat":48.8566,"lng":2.3522},"title":"Paris","infoWindow":null,"icon":null,"extra":[],"id":"marker1","@id":"872feba9ebf3905d"},{"position":{"lat":48.8566,"lng":2.3522},"title":"Lyon","infoWindow":{"headerContent":null,"content":"Lyon","position":null,"opened":false,"autoClose":true,"extra":[]},"icon":null,"extra":[],"id":null,"@id":"bce206d73dc5c164"}]"
|
||||
data-symfony--ux-leaflet-map--map-polygons-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polylines-value="[]"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":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="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <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"},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-markers-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polygons-value="[{"points":[{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522}],"title":null,"infoWindow":null,"extra":[],"id":"polygon1","@id":"35bfa920335b849d"},{"points":[{"lat":1.1,"lng":2.2},{"lat":3.3,"lng":4.4},{"lat":5.5,"lng":6.6}],"title":null,"infoWindow":{"headerContent":null,"content":"Polygon","position":null,"opened":false,"autoClose":true,"extra":[]},"extra":[],"id":"polygon2","@id":"7be1fe9f10489d73"}]"
|
||||
data-symfony--ux-leaflet-map--map-polylines-value="[]"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
data-symfony--ux-leaflet-map--map-center-value="{"lat":48.8566,"lng":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="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <a href=\"https:\/\/www.openstreetmap.org\/copyright\">OpenStreetMap<\/a>","options":[]},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-options-value="{"tileLayer":{"url":"https:\/\/tile.openstreetmap.org\/{z}\/{x}\/{y}.png","attribution":"\u00a9 <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"},"@provider":"leaflet"}"
|
||||
data-symfony--ux-leaflet-map--map-markers-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polygons-value="[]"
|
||||
data-symfony--ux-leaflet-map--map-polylines-value="[{"points":[{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522},{"lat":48.8566,"lng":2.3522}],"title":null,"infoWindow":null,"extra":[],"id":"polyline1","@id":"823f6ee5acdb5db3"},{"points":[{"lat":1.1,"lng":2.2},{"lat":3.3,"lng":4.4},{"lat":5.5,"lng":6.6}],"title":null,"infoWindow":{"headerContent":null,"content":"Polyline","position":null,"opened":false,"autoClose":true,"extra":[]},"extra":[],"id":"polyline2","@id":"77fb0e390b5e91f1"}]"
|
||||
|
||||
Reference in New Issue
Block a user