Skip to content

農地圖層即時改寫: 把農地的遮罩換成國土測繪雲 -> 疑似工廠的圖層 #67

@Yukaii

Description

@Yukaii

https://stackoverflow.com/questions/37447457/dynamically-reload-leaflet-tiles

L.TileLayer.CustomLayer = L.TileLayer.extend({
    getTileUrl: (coords) => {
        var test = some_function_deciding_test_based_on_tile(coords);
        return `http://example.com/tile_${coords.x}_${coords.y}.png?test=${test}`;
    }
});

vs openlayer https://github.com/Disfactory/frontend/blob/df24ba632041d9f39bb5360a62e88c953b7ebaa9/src/lib/map.ts#L391-L397

      tileLoadFunction: function (imageTile, src) {
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
        const image: HTMLImageElement = (imageTile as any).getImage()
        flipArgriculturalLand(src).then(newSrc => {
          image.src = newSrc
        })
      },

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions