open-pioneer / trails-openlayers-base-packages

Common OpenLayers packages for the Open Pioneer Trails client framework.
Apache License 2.0
8 stars 6 forks source link

Update to OpenLayers 8 #120

Closed dpayk closed 1 year ago

dpayk commented 1 year ago

Because of the breaking change (New StadiaMaps source replaces the Stamen source) we have to replace all Stamen-usages from our code after updating OpenLayers.

See:

jny-k commented 1 year ago

A short skimming over the changelog only indicates a change needed in the map-sample, (stamen sources github.com/openlayers/openlayers/issues/14963).

I couldn't see other breaking changes that might affect our code base as it currently is.

bierett commented 1 year ago

Updating OpenLayers from v7.5.1 to v8.1.0 was successfully done with commit f9ad6df96c782d5b6ba5121d5dff16f11f732532.

Because of the breaking chance I've create a further class BkgTopPlusOpen and replaced all Stamen-usages with BkgTopPlusOpen (see 27cecbd2d0144ed8e237cc7ff8b5cb83ee9f1369).

It can be used for our unit tests (or demo app) like:

{
    title: "TopPlus Open",
    visible: false,
    layer: new TileLayer({
        source: new BkgTopPlusOpen()
    })
},
{
    title: "TopPlus Open Grau",
    visible: true,
    layer: new TileLayer({
        source: new BkgTopPlusOpen({ layer: "web_grau" })
    })
},
{
    title: "TopPlus Open Light",
    visible: false,
    layer: new TileLayer({
        source: new BkgTopPlusOpen({ layer: "web_light" })
    })
}

BkgTopPlusOpen is locate in the map package besides the map anchor / map container component.

jny-k commented 1 year ago

For context:

the chosen WMTS "TopPlusOpen" is offered by the german Bundesamt für Kartogrtaphie and Geodäsie (https://gdz.bkg.bund.de/index.php/default/wmts-topplusopen-wmts-topplus-open.html), can be used freely (license). As it is close to some of the services that will be implemented (WMTS; also being offered in a more specific projection other than Web Mercator), and currently being well-maintained, we chose this as a good test/example case.

bierett commented 1 year ago

PR: #134

bierett commented 1 year ago

For our tests we can use the class BkgTopPlusOpen. For our demo app we use the predefined configuration.