Merge pull request #7011 from ArtemDzhereleiko/AD/bug-fix/trip-map-marker-size

[3.4.1] UI: Fixed custom marker size for map widgets
This commit is contained in:
Igor Kulikov 2022-08-15 13:30:58 +03:00 committed by GitHub
commit 8730e6a913
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -808,7 +808,8 @@ export default abstract class LeafletMap {
const currentImage: MarkerImageInfo = this.options.useMarkerImageFunction ?
safeExecute(this.options.parsedMarkerImageFunction,
[data, this.options.markerImages, markersData, data.dsIndex]) : this.options.currentImage;
const style = currentImage ? 'background-image: url(' + currentImage.url + ');' : '';
const imageSize = `height: ${this.options.markerImageSize || 34}px; width: ${this.options.markerImageSize || 34}px;`;
const style = currentImage ? 'background-image: url(' + currentImage.url + '); ' + imageSize : '';
this.options.icon = { icon: L.divIcon({
html: `<div class="arrow"
style="transform: translate(-10px, -10px)