Browse Source

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

[3.4.1] UI: Fixed custom marker size for map widgets
pull/7084/head
Igor Kulikov 4 years ago
committed by GitHub
parent
commit
8730e6a913
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts

3
ui-ngx/src/app/modules/home/components/widget/lib/maps/leaflet-map.ts

@ -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)

Loading…
Cancel
Save