Skip to content

Commit fbe1c48

Browse files
committed
[Map] Add warning if customize icon is defined alongside with marker icon
1 parent b40c59c commit fbe1c48

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

src/Map/src/Bridge/Google/assets/dist/map_controller.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ var map_controller_default = class extends abstract_map_controller_default {
248248
this.createInfoWindow({ definition: infoWindow, element: marker });
249249
}
250250
if (icon) {
251+
if (rawOptions.hasOwnProperty("content") || bridgeOptions.hasOwnProperty("content")) {
252+
console.warn('The "content" parameter is also defined in the "rawOptions" or "bridgeOptions" of the marker and will be ignored.');
253+
}
251254
this.doCreateIcon({ definition: icon, element: marker });
252255
}
253256
return marker;

src/Map/src/Bridge/Google/assets/src/map_controller.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,10 @@ export default class extends AbstractMapController<
188188
}
189189

190190
if (icon) {
191+
if (rawOptions.hasOwnProperty('content') || bridgeOptions.hasOwnProperty('content')) {
192+
console.warn('The "content" parameter is also defined in the "rawOptions" or "bridgeOptions" of the marker and will be ignored.');
193+
}
194+
191195
this.doCreateIcon({ definition: icon, element: marker });
192196
}
193197

src/Map/src/Bridge/Leaflet/assets/dist/map_controller.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ var map_controller_default = class extends abstract_map_controller_default {
228228
this.createInfoWindow({ definition: infoWindow, element: marker2 });
229229
}
230230
if (icon2) {
231+
if (rawOptions.hasOwnProperty("icon") || bridgeOptions.hasOwnProperty("icon")) {
232+
console.warn('The "icon" parameter is also defined in the "rawOptions" or "bridgeOptions" of the marker and will be ignored.');
233+
}
231234
this.doCreateIcon({ definition: icon2, element: marker2 });
232235
}
233236
return marker2;

src/Map/src/Bridge/Leaflet/assets/src/map_controller.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ export default class extends AbstractMapController<
154154
}
155155

156156
if (icon) {
157+
if (rawOptions.hasOwnProperty('icon') || bridgeOptions.hasOwnProperty('icon')) {
158+
console.warn('The "icon" parameter is also defined in the "rawOptions" or "bridgeOptions" of the marker and will be ignored.');
159+
}
160+
157161
this.doCreateIcon({ definition: icon, element: marker });
158162
}
159163

0 commit comments

Comments
 (0)