Skip to content

Projection negotiation / layer src loads the remote mapml resource twice #807

@prushforth

Description

@prushforth

Steps to reproduce:

Get a local clone of the experiments repo.
Put the following html file in the change-projection/projection-negotiation folder:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width,initial-scale=1">
        <title>&lt;layer- src&gt; projection negotiation bug</title>
        <script type="module" src="../../dist/mapml-viewer.js"></script>
        <link rel="stylesheet" href="../../global.css">
        <style>
          mapml-viewer:defined { 
            display: inline-block;
            width: 100%;
          }
        </style>
    </head>
  <body>
  <mapml-viewer projection="CBMTILE" zoom="4" lat="60" lon="-90" controls>
    <layer- label="CBMT" src="/experiments/refactoring-temporary/cbmtile-cbmt.mapml" checked hidden></layer->
     <layer- src="msi-tiles-osmtile.mapml" checked></layer->
  </mapml-viewer>
  </body>
</html>

Run the html file in a Web server/browser tab, open devtools Network tab. If necessary, reload to observe network activity:

image

Observed behaviour:

The CBMTILE-projected file, msi-tiles.mapml is loaded twice over the network

Expected behaviour:

msi-tiles.mapml should be loaded once over the network, as it represents the content with the same projection as the source mapml-viewer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions