Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lambda-tiler): Remove the stylejson metadata, sprite, glphys if no required. #3280

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

Wentao-Kuang
Copy link
Contributor

@Wentao-Kuang Wentao-Kuang commented Jun 12, 2024

Motivation

We should remove metadata, sprite, glphys if not defined from style config. empty sprite or glphys will broken the maplire.

{
  "version": 8,
  "id": "st_aerial",
  "name": "aerial",
  "sources": {
    "basemaps-aerial": {
      "tileSize": 256,
      "tiles": [
        "[https://dev.basemaps.linz.govt.nz/v1/tiles/aerial/WebMercatorQuad/{z}/{x}/{y}.webp?api=c01hzzbj62y83k27kw7pd89jsw1&config=TmVmbYRQjL9T2JWgyaSie193b4D1qZnBD8hjaSqPFYSsEvEYYhaGYKrcnYE9V7NUW5A8WmuM3FpWejcebdKmVDGzTMLXbMvmCSs2XouTFdCmeHCAfTLyzMmr3YxANL1"
      ],
      "type": "raster"
    },
    "basemaps-terrian": {
      "tileSize": 256,
      "tiles": [
        "https://dev.basemaps.linz.govt.nz/v1/tiles/elevation/WebMercatorQuad/{z}/{x}/{y}.png?api=c01hzzbj62y83k27kw7pd89jsw1&config=TmVmbYRQjL9T2JWgyaSie193b4D1qZnBD8hjaSqPFYSsEvEYYhaGYKrcnYE9V7NUW5A8WmuM3FpWejcebdKmVDGzTMLXbMvmCSs2XouTFdCmeHCAfTLyzMmr3YxANL1"
      ],
      "type": "raster-dem"
    }
  },
  "layers": [
    {
      "id": "basemaps-aerial",
      "source": "basemaps-aerial",
      "type": "raster"
    }
  ],
  "metadata": {},
  "glyphs": "",
  "sprite": ""
}

Modification

Only add these optional filed if defined in the getStyleJSON Api

Checklist

If not applicable, provide explanation of why.

  • Tests updated
  • Docs updated
  • Issue linked in Title

@Wentao-Kuang Wentao-Kuang requested a review from a team as a code owner June 12, 2024 01:41
@Wentao-Kuang Wentao-Kuang requested a review from blacha June 12, 2024 01:41
@blacha blacha added this pull request to the merge queue Jun 12, 2024
Merged via the queue into master with commit edaf034 Jun 12, 2024
14 of 15 checks passed
@blacha blacha deleted the feat/get-aerial-style branch June 12, 2024 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants