Showing
1 changed file
with
0 additions
and
33 deletions
... | ... | @@ -233,39 +233,6 @@ export default class TbImageMap { |
233 | 233 | }); |
234 | 234 | } |
235 | 235 | |
236 | - /*updateMarkerImage(marker, settings, image, maxSize) { | |
237 | - var testImage = document.createElement('img'); // eslint-disable-line | |
238 | - testImage.style.visibility = 'hidden'; | |
239 | - testImage.onload = function() { | |
240 | - var width; | |
241 | - var height; | |
242 | - var aspect = testImage.width / testImage.height; | |
243 | - document.body.removeChild(testImage); //eslint-disable-line | |
244 | - if (aspect > 1) { | |
245 | - width = maxSize; | |
246 | - height = maxSize / aspect; | |
247 | - } else { | |
248 | - width = maxSize * aspect; | |
249 | - height = maxSize; | |
250 | - } | |
251 | - var icon = L.icon({ | |
252 | - iconUrl: image, | |
253 | - iconSize: [width, height], | |
254 | - iconAnchor: [marker.offsetX * width, marker.offsetY * height], | |
255 | - popupAnchor: [0, -height] | |
256 | - }); | |
257 | - marker.setIcon(icon); | |
258 | - if (settings.showLabel) { | |
259 | - marker.unbindTooltip(); | |
260 | - marker.tooltipOffset = [0, -height * marker.offsetY + 10]; | |
261 | - marker.bindTooltip('<div style="color: '+ settings.labelColor +';"><b>'+settings.labelText+'</b></div>', | |
262 | - { className: 'tb-marker-label', permanent: true, direction: 'top', offset: marker.tooltipOffset }); | |
263 | - } | |
264 | - } | |
265 | - document.body.appendChild(testImage); //eslint-disable-line | |
266 | - testImage.src = image; | |
267 | - }*/ | |
268 | - | |
269 | 236 | updateMarkerIcon(marker, settings) { |
270 | 237 | this.createMarkerIcon(marker, settings, (iconInfo) => { |
271 | 238 | marker.setIcon(iconInfo.icon); | ... | ... |