<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    On #2, Brent basically covered it.  If the tile webserver is
    different from the GeoMoose webserver then the webserver serving the
    tiles needs to set a header to allow CORS requests otherwise the
    browser will block the request.<br>
    <br>
    And you probably also need the:<br>
    <br>
        <param name="cross-origin" value="anonymous"/><br>
    <br>
    parameter in the <map-source> so that OpenLayers will actually
    make the CORS request.<br>
    <br>
    Basically GeoMoose is just setting this in OpenLayers behind the
    scenes.<br>
    <br>
<a class="moz-txt-link-freetext" href="https://gis.stackexchange.com/questions/71715/enabling-cors-in-openlayers">https://gis.stackexchange.com/questions/71715/enabling-cors-in-openlayers</a><br>
<a class="moz-txt-link-freetext" href="http://dev.openlayers.org/apidocs/files/OpenLayers/Tile/Image-js.html#OpenLayers.Tile.Image.crossOriginKeyword">http://dev.openlayers.org/apidocs/files/OpenLayers/Tile/Image-js.html#OpenLayers.Tile.Image.crossOriginKeyword</a><br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 12/20/21 12:08 PM, Brent Fraser
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:a6104341a03c402ba61b85d926f104cd@geoanalytic.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div style="font-family: arial; font-size: 14px;">
        <div fr-original-style="box-sizing: border-box;" id="isPasted"
          style="box-sizing: border-box;">Hi Mark,</div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;"><br style="box-sizing:
            border-box;" fr-original-style="box-sizing: border-box;">
        </div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;">  Regarding Issue #1 (the tile
          id problem), try using</div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;"><br style="box-sizing:
            border-box;" fr-original-style="box-sizing: border-box;">
        </div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;"><url><a class="moz-txt-link-freetext" href="https://geomoose.lyonco.org/lyonmapcache/tms/1.0.0/LyonPictoPhotos2020@GoogleBingArcGISCompatible/">https://geomoose.lyonco.org/lyonmapcache/tms/1.0.0/LyonPictoPhotos2020@GoogleBingArcGISCompatible/</a>{z}/{x}/{-y}.jpg</url></div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;"><br style="box-sizing:
            border-box;" fr-original-style="box-sizing: border-box;">
        </div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;">Note the {x}/{-y} order and
          the minus sign.</div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;"><br style="box-sizing:
            border-box;" fr-original-style="box-sizing: border-box;">
        </div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;">As for Issue #2 (the
          cross-origin problem), Jim would be the expert.  If you are in
          control of the tile server (and it is running Apache as the
          web server) you could try adding</div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;">    <span
            fr-original-style="font-family: courier new;"
            style="font-family: courier new; box-sizing: border-box;">Header
            set Access-Control-Allow-Origin "*"</span></div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;">to the configuration (as an
          example see <a fr-original-style="box-sizing: border-box;
            color: rgb(0, 102, 147); text-decoration: underline;
            user-select: auto;"
href="https://github.com/geomoose/gm3-demo-data/blob/c29e41a341a300532984a4daeb26fa14bddc156a/docker/etc/000-default.conf#L14"
            rel="noopener noreferrer" style="box-sizing: border-box;
            color: rgb(0, 102, 147); text-decoration: underline;
            user-select: auto;" target="_blank" moz-do-not-send="true">https://github.com/geomoose/gm3-demo-data/blob/c29e41a341a300532984a4daeb26fa14bddc156a/docker/etc/000-default.conf#L14</a>
          )</div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;"><br style="box-sizing:
            border-box;" fr-original-style="box-sizing: border-box;">
        </div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;">Other possible solutions are:<br
            style="box-sizing: border-box;"
            fr-original-style="box-sizing: border-box;">
          -  serve the GeoMoose page from the same origin as the tiles,
          or</div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;">- put a proxy on the GeoMoose
          page server to get the tiles when requested and pass them to
          the Geomoose page.</div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;"><br style="box-sizing:
            border-box;" fr-original-style="box-sizing: border-box;">
        </div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;">Best Regards,</div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;">Brent Fraser</div>
        <div fr-original-style="box-sizing: border-box;"
          style="box-sizing: border-box;"><br fr-original-style="">
        </div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style="" contenteditable="false"><span
            fr-original-style="" style="box-sizing: border-box;"> </span></div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <hr id="previousmessagehr" fr-original-style=""
          style="box-sizing: border-box; clear: both; user-select:
          none;">
        <div fr-original-style=""><span fr-original-style=""
            style="box-sizing: border-box;"><strong fr-original-style=""
              style="box-sizing: border-box; font-weight: 700;">From</strong>:
            "Mark Volz" <a class="moz-txt-link-rfc2396E" href="mailto:MarkVolz@co.lyon.mn.us"><MarkVolz@co.lyon.mn.us></a><br
              fr-original-style="">
            <strong fr-original-style="" style="box-sizing: border-box;
              font-weight: 700;">Sent</strong>: 12/20/21 8:43 AM<br
              fr-original-style="">
            <strong fr-original-style="" style="box-sizing: border-box;
              font-weight: 700;">To</strong>:
            <a class="moz-txt-link-rfc2396E" href="mailto:geomoose-users@lists.osgeo.org">"geomoose-users@lists.osgeo.org"</a>
            <a class="moz-txt-link-rfc2396E" href="mailto:geomoose-users@lists.osgeo.org"><geomoose-users@lists.osgeo.org></a><br
              fr-original-style="">
            <strong fr-original-style="" style="box-sizing: border-box;
              font-weight: 700;">Subject</strong>: Re: [Geomoose-users]
            TMS layers in GeoMOOSE 3.x</span></div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style="">Brent and Jim,</div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style="">Thank you for your replies.</div>
        <div fr-original-style="">I am using MapCache to serve out
          imagery in Web Mercator (GoogleBingArcGISCompatible). The Web
          Mercator tiles are working correctly in ArcGIS as well as QGIS
          when using WMTS. Unfortunately, I am still having a couple
          issues:</div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style="">Issue 1:</div>
        <div fr-original-style="">*GeoMOOSE is requesting a tile that it
          out of range. I am not sure what is causing this issue:</div>
        <div fr-original-style="">GeoMOOSE is working with other XYZ
          tile servers such as OpenLayers.</div>
        <div fr-original-style="">MapCache is working with ArcGIS and
          QGIS clients.</div>
        <div fr-original-style="">The tiles requested and served are
          256*256.</div>
        <div fr-original-style="">I think the tiles should be working
          however I am still getting an error that my tiles are out of
          range even after I checked to make sure that I did not swap
          the X and Y. One error is that MapCache is reporting tile
          y=189759 is not within 334028 to 334954.</div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style="">Issue 2:</div>
        <div fr-original-style="">*Firefox is reporting that a
          cross-origin request is blocked.</div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style="">Please let me know if you might know
          how I can fix these problems. For reference I the public
          server and configuration information is below.</div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style="">Thank You!</div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style="">The public server is:</div>
        <div fr-original-style=""><a fr-original-style=""
href="https://geomoose.lyonco.org/lyonmapcache/tms/1.0.0/LyonPictoPhotos2020@GoogleBingArcGISCompatible"
            rel="noopener noreferrer" style="box-sizing: border-box;
            color: rgb(0, 102, 147); text-decoration: underline;
            user-select: auto;" target="_blank" moz-do-not-send="true">https://geomoose.lyonco.org/lyonmapcache/tms/1.0.0/LyonPictoPhotos2020@GoogleBingArcGISCompatible</a>/</div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style="">GeoMOOSE Configuration:</div>
        <div fr-original-style=""><map-source
          name="Picto2020BackgroundTMS" type="xyz"
          transitionEffect="resize"></div>
        <div fr-original-style=""><layer
          name="LyonPictoPhotos2020"/></div>
        <div fr-original-style=""><url><a class="moz-txt-link-freetext" href="https://geomoose.lyonco.org/lyonmapcache/tms/1.0.0/LyonPictoPhotos2020@GoogleBingArcGISCompatible/">https://geomoose.lyonco.org/lyonmapcache/tms/1.0.0/LyonPictoPhotos2020@GoogleBingArcGISCompatible/</a>{z}/{y}/{x}.jpg</url></div>
        <div fr-original-style=""><type>"jpeg"</type></div>
        <div fr-original-style=""></map-source></div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style="">MapCache Configuration:</div>
        <div fr-original-style=""><grid
          name="GoogleBingArcGISCompatible"></div>
        <div fr-original-style=""><metadata></div>
        <div fr-original-style=""><title>GoogleBingArcGISCompatible</title></div>
        <div fr-original-style=""><WellKnownScaleSet>urn:ogc:def:wkss:OGC:1.0:GoogleMapsCompatible</WellKnownScaleSet></div>
        <div fr-original-style=""></metadata></div>
        <div fr-original-style=""><extent>-20037508.3427892480
          -20037508.3427892480 20037508.3427892480
          20037508.3427892480</extent></div>
        <div fr-original-style=""><srs>EPSG:3857</srs></div>
        <div fr-original-style=""><srsalias>EPSG:900913</srsalias></div>
        <div fr-original-style=""><units>m</units></div>
        <div fr-original-style=""><size>256 256</size></div>
        <div fr-original-style=""><resolutions>156543.0339280410
          78271.51696402048 39135.75848201023 19567.87924100512
          9783.939620502561 4891.969810251280 2445.984905125640
          1222.992452562820 611.4962262814100 305.7481131407048
          152.8740565703525 76.43702828517624 38.21851414258813
          19.10925707129406 9.554628535647032 4.777314267823516
          2.388657133911758 1.194328566955879 0.5971642834779395
          0.29858214173896975 0.149291070869484875</resolutions></div>
        <div fr-original-style=""></grid></div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
        <div fr-original-style=""><br fr-original-style="">
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Geomoose-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Geomoose-users@lists.osgeo.org">Geomoose-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/geomoose-users">https://lists.osgeo.org/mailman/listinfo/geomoose-users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>