Skip to content

fix(web): raster and raster-dem source#486

Merged
josxha merged 1 commit intomainfrom
fix/raster-and-raster-dem-source-on-web
Feb 25, 2026
Merged

fix(web): raster and raster-dem source#486
josxha merged 1 commit intomainfrom
fix/raster-and-raster-dem-source-on-web

Conversation

@josxha
Copy link
Owner

@josxha josxha commented Feb 24, 2026

RasterSource and RasterDemSource send null for tiles or url if not set since recently. This throws an error in maplibre gl js. This pr only sets those parameters if not null.

@josxha josxha added this to the v0.3.4+1 milestone Feb 24, 2026
Copilot AI review requested due to automatic review settings February 24, 2026 21:14
@github-project-automation github-project-automation bot moved this to Backlog in maplibre dev Feb 24, 2026
@cloudflare-workers-and-pages
Copy link

Deploying flutter-maplibre with  Cloudflare Pages  Cloudflare Pages

Latest commit: f6fd0c8
Status: ✅  Deploy successful!
Preview URL: https://35a013b0.flutter-maplibre.pages.dev
Branch Preview URL: https://fix-raster-and-raster-dem-so.flutter-maplibre.pages.dev

View logs

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where RasterSource and RasterDemSource were sending null values for tiles or url parameters to MapLibre GL JS, which was throwing errors. The solution splits each factory constructor into two separate private constructors - one for URL-based sources and one for tiles-based sources, conditionally selecting between them based on which parameter is non-null.

Changes:

  • Refactored SourceSpecification.rasterDem from an external factory to a regular factory that delegates to either _rasterDemUrl or _rasterDemTiles based on whether url is non-null
  • Refactored SourceSpecification.raster from an external factory to a regular factory that delegates to either _rasterUrl or _rasterTiles based on whether url is non-null

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Feb 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 34.33%. Comparing base (1a0b042) to head (f6fd0c8).
⚠️ Report is 1 commits behind head on main.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@josxha josxha merged commit 30560f4 into main Feb 25, 2026
54 of 55 checks passed
@josxha josxha deleted the fix/raster-and-raster-dem-source-on-web branch February 25, 2026 00:02
@github-project-automation github-project-automation bot moved this from Backlog to Done in maplibre dev Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants