Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Map/src/Bridge/Google/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 2.31

- Display a warning when trying to define `bridgeOptions.content` for a `Marker` that already has an `Icon`

## 2.30

- Ensure compatibility with PHP 8.5
Expand Down
5 changes: 5 additions & 0 deletions src/Map/src/Bridge/Google/assets/dist/map_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,11 @@ var map_controller_default = class extends abstract_map_controller_default {
this.createInfoWindow({ definition: infoWindow, element: marker });
}
if (icon) {
if (Object.prototype.hasOwnProperty.call(bridgeOptions, "content")) {
console.warn('[Symfony UX Map] Defining "bridgeOptions.content" for a marker with a custom icon is not supported and will be ignored.');
} else if (Object.prototype.hasOwnProperty.call(rawOptions, "content")) {
console.warn('[Symfony UX Map] Defining "rawOptions.content" for a marker with a custom icon is not supported and will be ignored.');
}
this.doCreateIcon({ definition: icon, element: marker });
}
return marker;
Expand Down
6 changes: 6 additions & 0 deletions src/Map/src/Bridge/Google/assets/src/map_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ export default class extends AbstractMapController<
}

if (icon) {
if (Object.prototype.hasOwnProperty.call(bridgeOptions, 'content')) {
console.warn('[Symfony UX Map] Defining "bridgeOptions.content" for a marker with a custom icon is not supported and will be ignored.');
} else if (Object.prototype.hasOwnProperty.call(rawOptions, 'content')) {
console.warn('[Symfony UX Map] Defining "rawOptions.content" for a marker with a custom icon is not supported and will be ignored.');
}

this.doCreateIcon({ definition: icon, element: marker });
}

Expand Down
4 changes: 4 additions & 0 deletions src/Map/src/Bridge/Leaflet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## 2.31

- Display a warning when trying to define `bridgeOptions.icon` for a `Marker` that already has an `Icon`

## 2.30

- Ensure compatibility with PHP 8.5
Expand Down
5 changes: 5 additions & 0 deletions src/Map/src/Bridge/Leaflet/assets/dist/map_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,11 @@ var map_controller_default = class extends abstract_map_controller_default {
this.createInfoWindow({ definition: infoWindow, element: marker2 });
}
if (icon2) {
if (Object.prototype.hasOwnProperty.call(bridgeOptions, "icon")) {
console.warn('[Symfony UX Map] Defining "bridgeOptions.icon" for a marker with a custom icon is not supported and will be ignored.');
} else if (Object.prototype.hasOwnProperty.call(rawOptions, "icon")) {
console.warn('[Symfony UX Map] Defining "rawOptions.icon" for a marker with a custom icon is not supported and will be ignored.');
}
this.doCreateIcon({ definition: icon2, element: marker2 });
}
return marker2;
Expand Down
6 changes: 6 additions & 0 deletions src/Map/src/Bridge/Leaflet/assets/src/map_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ export default class extends AbstractMapController<
}

if (icon) {
if (Object.prototype.hasOwnProperty.call(bridgeOptions, 'icon')) {
console.warn('[Symfony UX Map] Defining "bridgeOptions.icon" for a marker with a custom icon is not supported and will be ignored.');
} else if (Object.prototype.hasOwnProperty.call(rawOptions, 'icon')) {
console.warn('[Symfony UX Map] Defining "rawOptions.icon" for a marker with a custom icon is not supported and will be ignored.');
}

this.doCreateIcon({ definition: icon, element: marker });
}

Expand Down
Loading