Skip to content

Commit be1d264

Browse files
committed
[Map] Rework UxIconRenderer injection
1 parent 9976692 commit be1d264

File tree

12 files changed

+75
-38
lines changed

12 files changed

+75
-38
lines changed

src/Map/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
"symfony/framework-bundle": "^6.4|^7.0",
4141
"symfony/phpunit-bridge": "^6.4|^7.0",
4242
"symfony/twig-bundle": "^6.4|^7.0",
43-
"symfony/ux-twig-component": "^2.18"
43+
"symfony/ux-twig-component": "^2.18",
44+
"symfony/ux-icons": "^2.18"
4445
},
4546
"conflict": {
4647
"symfony/ux-twig-component": "<2.21"

src/Map/config/services.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
->abstract()
4040
->args([
4141
service('stimulus.helper'),
42-
service('.ux_map.ux_icons.renderer')->nullOnInvalid(),
42+
service('.ux_map.ux_icons.renderer'),
4343
])
4444

4545
->set('ux_map.renderer_factory', Renderer::class)

src/Map/src/Bridge/Google/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"symfony/ux-map": "^2.19"
2222
},
2323
"require-dev": {
24-
"symfony/phpunit-bridge": "^6.4|^7.0"
24+
"symfony/phpunit-bridge": "^6.4|^7.0",
25+
"symfony/ux-icons": "^2.18"
2526
},
2627
"autoload": {
2728
"psr-4": { "Symfony\\UX\\Map\\Bridge\\Google\\": "src/" },

src/Map/src/Bridge/Google/src/Renderer/GoogleRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
*/
3030
public function __construct(
3131
StimulusHelper $stimulusHelper,
32+
UxIconRenderer $uxIconRenderer,
3233
#[\SensitiveParameter]
3334
private string $apiKey,
3435
private ?string $id = null,
@@ -43,7 +44,6 @@ public function __construct(
4344
*/
4445
private array $libraries = [],
4546
private ?string $defaultMapId = null,
46-
?UxIconRenderer $uxIconRenderer = null,
4747
) {
4848
parent::__construct($stimulusHelper, $uxIconRenderer);
4949
}

src/Map/src/Bridge/Google/src/Renderer/GoogleRendererFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class GoogleRendererFactory extends AbstractRendererFactory implements Ren
2727
{
2828
public function __construct(
2929
StimulusHelper $stimulus,
30-
?UxIconRenderer $uxIconRenderer = null,
30+
UxIconRenderer $uxIconRenderer,
3131
private ?string $defaultMapId = null,
3232
) {
3333
parent::__construct($stimulus, $uxIconRenderer);
@@ -43,7 +43,8 @@ public function create(Dsn $dsn): RendererInterface
4343

4444
return new GoogleRenderer(
4545
$this->stimulus,
46-
$apiKey,
46+
$this->uxIconRenderer,
47+
apiKey: $apiKey,
4748
id: $dsn->getOption('id'),
4849
language: $dsn->getOption('language'),
4950
region: $dsn->getOption('region'),
@@ -53,7 +54,6 @@ public function create(Dsn $dsn): RendererInterface
5354
version: $dsn->getOption('version', 'weekly'),
5455
libraries: ['maps', 'marker', ...$dsn->getOption('libraries', [])],
5556
defaultMapId: $this->defaultMapId,
56-
uxIconRenderer: $this->uxIconRenderer,
5757
);
5858
}
5959

src/Map/src/Bridge/Google/tests/GoogleRendererFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\UX\Map\Bridge\Google\Tests;
1313

1414
use Symfony\UX\Map\Bridge\Google\Renderer\GoogleRendererFactory;
15+
use Symfony\UX\Map\Icon\UxIconRenderer;
1516
use Symfony\UX\Map\Renderer\RendererFactoryInterface;
1617
use Symfony\UX\Map\Test\RendererFactoryTestCase;
1718
use Symfony\UX\StimulusBundle\Helper\StimulusHelper;
@@ -20,7 +21,7 @@ final class GoogleRendererFactoryTest extends RendererFactoryTestCase
2021
{
2122
public function createRendererFactory(): RendererFactoryInterface
2223
{
23-
return new GoogleRendererFactory(new StimulusHelper(null));
24+
return new GoogleRendererFactory(new StimulusHelper(null), new UxIconRenderer(null));
2425
}
2526

2627
public static function supportsRenderer(): iterable

src/Map/src/Bridge/Google/tests/GoogleRendererTest.php

Lines changed: 36 additions & 18 deletions
Large diffs are not rendered by default.

src/Map/src/Bridge/Leaflet/composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"symfony/ux-map": "^2.19"
2222
},
2323
"require-dev": {
24-
"symfony/phpunit-bridge": "^6.4|^7.0"
24+
"symfony/phpunit-bridge": "^6.4|^7.0",
25+
"symfony/ux-icons": "^2.18"
2526
},
2627
"autoload": {
2728
"psr-4": { "Symfony\\UX\\Map\\Bridge\\Leaflet\\": "src/" },

src/Map/src/Bridge/Leaflet/tests/LeafletRendererFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\UX\Map\Bridge\Leaflet\Tests;
1313

1414
use Symfony\UX\Map\Bridge\Leaflet\Renderer\LeafletRendererFactory;
15+
use Symfony\UX\Map\Icon\UxIconRenderer;
1516
use Symfony\UX\Map\Renderer\RendererFactoryInterface;
1617
use Symfony\UX\Map\Test\RendererFactoryTestCase;
1718
use Symfony\UX\StimulusBundle\Helper\StimulusHelper;
@@ -20,7 +21,7 @@ final class LeafletRendererFactoryTest extends RendererFactoryTestCase
2021
{
2122
public function createRendererFactory(): RendererFactoryInterface
2223
{
23-
return new LeafletRendererFactory(new StimulusHelper(null));
24+
return new LeafletRendererFactory(new StimulusHelper(null), new UxIconRenderer(null));
2425
}
2526

2627
public static function supportsRenderer(): iterable

src/Map/src/Bridge/Leaflet/tests/LeafletRendererTest.php

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111

1212
namespace Symfony\UX\Map\Bridge\Leaflet\Tests;
1313

14+
use Symfony\UX\Map\Bridge\Google\Renderer\GoogleRenderer;
1415
use Symfony\UX\Map\Bridge\Leaflet\Renderer\LeafletRenderer;
1516
use Symfony\UX\Map\Icon\Icon;
17+
use Symfony\UX\Map\Icon\UxIconRenderer;
1618
use Symfony\UX\Map\InfoWindow;
1719
use Symfony\UX\Map\Map;
1820
use Symfony\UX\Map\Marker;
@@ -31,24 +33,25 @@ public function provideTestRenderMap(): iterable
3133
->zoom(12);
3234

3335
$marker1 = new Marker(position: new Point(48.8566, 2.3522), title: 'Paris', id: 'marker1');
34-
$marker2 = new Marker(position: new Point(48.8566, 2.3522), title: 'Lyon', infoWindow: new InfoWindow(content: 'Lyon'), id: 'marker2', icon: Icon::svg(html: '<svg></svg>'));
36+
$marker2 = new Marker(position: new Point(48.8566, 2.3522), title: 'Lyon', infoWindow: new InfoWindow(content: 'Lyon'), id: 'marker2');
3537
$marker3 = new Marker(position: new Point(45.8566, 2.3522), title: 'Dijon', id: 'marker3');
3638

3739
yield 'simple map' => [
3840
'expected_render' => '<div data-controller="symfony--ux-leaflet-map--map" data-symfony--ux-leaflet-map--map-provider-options-value="{}" 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-markers-value="[]" data-symfony--ux-leaflet-map--map-polygons-value="[]" data-symfony--ux-leaflet-map--map-polylines-value="[]"></div>',
39-
'renderer' => new LeafletRenderer(new StimulusHelper(null)),
41+
'renderer' => new LeafletRenderer(new StimulusHelper(null), new UxIconRenderer(null)),
4042
'map' => (clone $map),
4143
];
4244

4345
yield 'with custom attributes' => [
4446
'expected_render' => '<div data-controller="my-custom-controller symfony--ux-leaflet-map--map" data-symfony--ux-leaflet-map--map-provider-options-value="{}" 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-markers-value="[]" data-symfony--ux-leaflet-map--map-polygons-value="[]" data-symfony--ux-leaflet-map--map-polylines-value="[]" class="map"></div>',
45-
'renderer' => new LeafletRenderer(new StimulusHelper(null)),
47+
'renderer' => new LeafletRenderer(new StimulusHelper(null), new UxIconRenderer(null)),
4648
'map' => (clone $map),
4749
'attributes' => ['data-controller' => 'my-custom-controller', 'class' => 'map'],
4850
];
51+
4952
yield 'with markers and infoWindows' => [
5053
'expected_render' => '<div data-controller="symfony--ux-leaflet-map--map" data-symfony--ux-leaflet-map--map-provider-options-value="{}" 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-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="[]"></div>',
51-
'renderer' => new LeafletRenderer(new StimulusHelper(null)),
54+
'renderer' => new LeafletRenderer(new StimulusHelper(null), new UxIconRenderer(null)),
5255
'map' => (new Map())
5356
->center(new Point(48.8566, 2.3522))
5457
->zoom(12)
@@ -58,7 +61,7 @@ public function provideTestRenderMap(): iterable
5861

5962
yield 'with all markers removed' => [
6063
'expected_render' => '<div data-controller="symfony--ux-leaflet-map--map" data-symfony--ux-leaflet-map--map-provider-options-value="{}" 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-markers-value="[]" data-symfony--ux-leaflet-map--map-polygons-value="[]" data-symfony--ux-leaflet-map--map-polylines-value="[]"></div>',
61-
'renderer' => new LeafletRenderer(new StimulusHelper(null)),
64+
'renderer' => new LeafletRenderer(new StimulusHelper(null), new UxIconRenderer(null)),
6265
'map' => (new Map())
6366
->center(new Point(48.8566, 2.3522))
6467
->zoom(12)
@@ -70,7 +73,7 @@ public function provideTestRenderMap(): iterable
7073

7174
yield 'with marker remove and new ones added' => [
7275
'expected_render' => '<div data-controller="symfony--ux-leaflet-map--map" data-symfony--ux-leaflet-map--map-provider-options-value="{}" 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-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;:{&quot;content&quot;:&quot;&lt;svg&gt;&lt;\/svg&gt;&quot;,&quot;type&quot;:&quot;inline-svg&quot;,&quot;width&quot;:24,&quot;height&quot;:24},&quot;extra&quot;:[],&quot;id&quot;:&quot;marker2&quot;,&quot;@id&quot;:&quot;414a0455a0c33cf0&quot;}]" data-symfony--ux-leaflet-map--map-polygons-value="[]" data-symfony--ux-leaflet-map--map-polylines-value="[]"></div>',
73-
'renderer' => new LeafletRenderer(new StimulusHelper(null)),
76+
'renderer' => new LeafletRenderer(new StimulusHelper(null), new UxIconRenderer(null)),
7477
'map' => (new Map())
7578
->center(new Point(48.8566, 2.3522))
7679
->zoom(12)
@@ -82,7 +85,7 @@ public function provideTestRenderMap(): iterable
8285

8386
yield 'with polygons and infoWindows' => [
8487
'expected_render' => '<div data-controller="symfony--ux-leaflet-map--map" data-symfony--ux-leaflet-map--map-provider-options-value="{}" 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-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="[]"></div>',
85-
'renderer' => new LeafletRenderer(new StimulusHelper(null)),
88+
'renderer' => new LeafletRenderer(new StimulusHelper(null), new UxIconRenderer(null)),
8689
'map' => (new Map())
8790
->center(new Point(48.8566, 2.3522))
8891
->zoom(12)
@@ -92,12 +95,23 @@ public function provideTestRenderMap(): iterable
9295

9396
yield 'with polylines and infoWindows' => [
9497
'expected_render' => '<div data-controller="symfony--ux-leaflet-map--map" data-symfony--ux-leaflet-map--map-provider-options-value="{}" 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-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;}]"></div>',
95-
'renderer' => new LeafletRenderer(new StimulusHelper(null)),
98+
'renderer' => new LeafletRenderer(new StimulusHelper(null), new UxIconRenderer(null)),
9699
'map' => (new Map())
97100
->center(new Point(48.8566, 2.3522))
98101
->zoom(12)
99102
->addPolyline(new Polyline(points: [new Point(48.8566, 2.3522), new Point(48.8566, 2.3522), new Point(48.8566, 2.3522)], id: 'polyline1'))
100103
->addPolyline(new Polyline(points: [new Point(1.1, 2.2), new Point(3.3, 4.4), new Point(5.5, 6.6)], infoWindow: new InfoWindow(content: 'Polyline'), id: 'polyline2')),
101104
];
105+
106+
yield 'markers with icons' => [
107+
'expected_render' => '<div></div>',
108+
'renderer' => new GoogleRenderer(new StimulusHelper(null), new UxIconRenderer(null), 'my_api_key'),
109+
'map' => (new Map())
110+
->center(new Point(48.8566, 2.3522))
111+
->zoom(12)
112+
->addMarker(new Marker(position: new Point(48.8566, 2.3522), title: 'Paris', icon: Icon::url('https://cdn.jsdelivr.net/npm/[email protected]/icons/geo-alt.svg')->width(32)->height(32)))
113+
->addMarker(new Marker(position: new Point(45.7640, 4.8357), title: 'Lyon', icon: Icon::ux('fa:map-marker')->width(32)->height(32)))
114+
->addMarker(new Marker(position: new Point(45.8566, 2.3522), title: 'Dijon', icon: Icon::svg('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24">...</svg>'))),
115+
];
102116
}
103117
}

0 commit comments

Comments
 (0)