Skip to content

Commit

Permalink
Add detailed logging to map 'load' event handler in template.html
Browse files Browse the repository at this point in the history
  • Loading branch information
devin-ai-integration[bot] committed May 18, 2024
1 parent ed7a671 commit cf6b6d7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@
});
// Log the bounds of the map to confirm it is set correctly
console.log('Map bounds after load event:', map.getBounds().toBBoxString());
// Additional check to confirm the map is rendered
if (map._tilesToLoad === 0 && map.hasLayer(backgroundLayer)) {
console.log('Map rendering confirmed, tiles loaded and background layer present.');
} else {
console.error('Map rendering issue detected, tiles or background layer not loaded correctly.');
}
}).on('error', function(e) {
console.error('backgroundLayer error event fired', e);
// Log the error to understand why the background layer failed to load
Expand Down

0 comments on commit cf6b6d7

Please sign in to comment.