Showing
1 changed file
with
5 additions
and
1 deletions
... | ... | @@ -539,10 +539,14 @@ export default class TbMapWidgetV2 { |
539 | 539 | } |
540 | 540 | } |
541 | 541 | if (locationsChanged && tbMap.initBounds) { |
542 | - tbMap.initBounds = !datasources.every( | |
542 | + let dataReceived = datasources.every( | |
543 | 543 | function (ds) { |
544 | 544 | return ds.dataReceived === true; |
545 | 545 | }); |
546 | + let dataValid = dataReceived && dataMap.dsDataMap.every(function (ds) { | |
547 | + return !(!ds[tbMap.locationSettings.latKeyName] && !ds[tbMap.locationSettings.lngKeyName]); | |
548 | + }); | |
549 | + tbMap.initBounds = !dataValid; | |
546 | 550 | tbMap.map.fitBounds(bounds); |
547 | 551 | } |
548 | 552 | } | ... | ... |