Trying to get WMTS layer in Leaflet, but get error 400 (out of range) The 2019 Stack Overflow...

Segmentation fault output is suppressed when piping stdin into a function. Why?

system() function string length limit

What aspect of planet Earth must be changed to prevent the industrial revolution?

I could not break this equation. Please help me

Python - Fishing Simulator

Did the new image of black hole confirm the general theory of relativity?

How many people can fit inside Mordenkainen's Magnificent Mansion?

Why does the Event Horizon Telescope (EHT) not include telescopes from Africa, Asia or Australia?

What information about me do stores get via my credit card?

Is above average number of years spent on PhD considered a red flag in future academia or industry positions?

What's the point in a preamp?

Can the prologue be the backstory of your main character?

Do warforged have souls?

Is every episode of "Where are my Pants?" identical?

Finding the path in a graph from A to B then back to A with a minimum of shared edges

What can I do if neighbor is blocking my solar panels intentionally?

Can smartphones with the same camera sensor have different image quality?

Scientific Reports - Significant Figures

Can the DM override racial traits?

Relations between two reciprocal partial derivatives?

Is it ethical to upload a automatically generated paper to a non peer-reviewed site as part of a larger research?

Single author papers against my advisor's will?

Can a novice safely splice in wire to lengthen 5V charging cable?

Change bounding box of math glyphs in LuaTeX



Trying to get WMTS layer in Leaflet, but get error 400 (out of range)



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Leaflet WMTS layerCreated custom tiles, added tile bounds to leaflet but it's still trying to load tiles outside of boundariesError with Leaflet Tutorial on adding Mapbox tile layerAdding particular WMTS layer makes ArcMap experience Serious Application Error?MarkerCluster don't work with geojson layer in leafletLeaflet get full extent of WMS layerAdd WMTS to Leaflet using its GetCapabilities URLHow to add Get Capabilties WMTS link from Geoserver to the map through LeafletOpenlayers WMTS GET request with Basic Authentication returns 401 ErrorWMTS Error when adding Mapbox Layer to QGIS: Failed to download capabilities?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I'm trying to use https://github.com/mylen/leaflet.TileLayer.WMTS to get a wmts layer into my leaflet map, but the error 400 is generated and when I look at the tile it says out of range.



While testing my wmts with Tile Layers preview on geoserver it works.



I get this error:



enter image description here



And the xml says:



<ExceptionReport xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd">
<Exception exceptionCode="TileOutOfRange" locator="TILECOLUMN">
<ExceptionText>
Column 153578 is out of range, min: 34192791178 max:34202250898
</ExceptionText>
</Exception>
</ExceptionReport>


So out of range. I have been trying different zoom levels and centres.



Here is my code:



<html>
<head>
<title>Demo leaflet.TileLayer.WMTS</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
<script src="https://rawgithub.com/mylen/leaflet.TileLayer.WMTS/master/leaflet-tilelayer-wmts.js"></script>
</head>
<body>
<div id="map" style="height: 100%; width: 100%"></div>
<script>

// You can get a key here: http://api.ign.fr/accueil (french)

/** Define the layer type
* GEOGRAPHICALGRIDSYSTEMS.MAPS
* GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.CLASSIQUE
* GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD
*/

// The WMTS URL
var url = "https://test/geoserver/gwc/service/wmts/";

var ign2 = new L.TileLayer.WMTS( url ,
{
layer: "2017-05-05",
style: "NDVI",
tilematrixSet: "EPSG:3857",
format: "image/png"
}
);

var map = L.map('map').setView([-10.346541321, 30.965654654], 20);
L.control.scale({'position':'bottomleft','metric':true,'imperial':false}).addTo(map);

map.addLayer(ign2);
var baseLayers = {"Carte IGN" : ign2};

L.control.layers(baseLayers, {}).addTo(map);


</script>
</body>
</html>









share|improve this question
















bumped to the homepage by Community 25 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.






















    0















    I'm trying to use https://github.com/mylen/leaflet.TileLayer.WMTS to get a wmts layer into my leaflet map, but the error 400 is generated and when I look at the tile it says out of range.



    While testing my wmts with Tile Layers preview on geoserver it works.



    I get this error:



    enter image description here



    And the xml says:



    <ExceptionReport xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd">
    <Exception exceptionCode="TileOutOfRange" locator="TILECOLUMN">
    <ExceptionText>
    Column 153578 is out of range, min: 34192791178 max:34202250898
    </ExceptionText>
    </Exception>
    </ExceptionReport>


    So out of range. I have been trying different zoom levels and centres.



    Here is my code:



    <html>
    <head>
    <title>Demo leaflet.TileLayer.WMTS</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width">
    <link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" />
    <script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
    <script src="https://rawgithub.com/mylen/leaflet.TileLayer.WMTS/master/leaflet-tilelayer-wmts.js"></script>
    </head>
    <body>
    <div id="map" style="height: 100%; width: 100%"></div>
    <script>

    // You can get a key here: http://api.ign.fr/accueil (french)

    /** Define the layer type
    * GEOGRAPHICALGRIDSYSTEMS.MAPS
    * GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.CLASSIQUE
    * GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD
    */

    // The WMTS URL
    var url = "https://test/geoserver/gwc/service/wmts/";

    var ign2 = new L.TileLayer.WMTS( url ,
    {
    layer: "2017-05-05",
    style: "NDVI",
    tilematrixSet: "EPSG:3857",
    format: "image/png"
    }
    );

    var map = L.map('map').setView([-10.346541321, 30.965654654], 20);
    L.control.scale({'position':'bottomleft','metric':true,'imperial':false}).addTo(map);

    map.addLayer(ign2);
    var baseLayers = {"Carte IGN" : ign2};

    L.control.layers(baseLayers, {}).addTo(map);


    </script>
    </body>
    </html>









    share|improve this question
















    bumped to the homepage by Community 25 mins ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      I'm trying to use https://github.com/mylen/leaflet.TileLayer.WMTS to get a wmts layer into my leaflet map, but the error 400 is generated and when I look at the tile it says out of range.



      While testing my wmts with Tile Layers preview on geoserver it works.



      I get this error:



      enter image description here



      And the xml says:



      <ExceptionReport xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd">
      <Exception exceptionCode="TileOutOfRange" locator="TILECOLUMN">
      <ExceptionText>
      Column 153578 is out of range, min: 34192791178 max:34202250898
      </ExceptionText>
      </Exception>
      </ExceptionReport>


      So out of range. I have been trying different zoom levels and centres.



      Here is my code:



      <html>
      <head>
      <title>Demo leaflet.TileLayer.WMTS</title>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width">
      <link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" />
      <script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
      <script src="https://rawgithub.com/mylen/leaflet.TileLayer.WMTS/master/leaflet-tilelayer-wmts.js"></script>
      </head>
      <body>
      <div id="map" style="height: 100%; width: 100%"></div>
      <script>

      // You can get a key here: http://api.ign.fr/accueil (french)

      /** Define the layer type
      * GEOGRAPHICALGRIDSYSTEMS.MAPS
      * GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.CLASSIQUE
      * GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD
      */

      // The WMTS URL
      var url = "https://test/geoserver/gwc/service/wmts/";

      var ign2 = new L.TileLayer.WMTS( url ,
      {
      layer: "2017-05-05",
      style: "NDVI",
      tilematrixSet: "EPSG:3857",
      format: "image/png"
      }
      );

      var map = L.map('map').setView([-10.346541321, 30.965654654], 20);
      L.control.scale({'position':'bottomleft','metric':true,'imperial':false}).addTo(map);

      map.addLayer(ign2);
      var baseLayers = {"Carte IGN" : ign2};

      L.control.layers(baseLayers, {}).addTo(map);


      </script>
      </body>
      </html>









      share|improve this question
















      I'm trying to use https://github.com/mylen/leaflet.TileLayer.WMTS to get a wmts layer into my leaflet map, but the error 400 is generated and when I look at the tile it says out of range.



      While testing my wmts with Tile Layers preview on geoserver it works.



      I get this error:



      enter image description here



      And the xml says:



      <ExceptionReport xmlns="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://geowebcache.org/schema/ows/1.1.0/owsExceptionReport.xsd">
      <Exception exceptionCode="TileOutOfRange" locator="TILECOLUMN">
      <ExceptionText>
      Column 153578 is out of range, min: 34192791178 max:34202250898
      </ExceptionText>
      </Exception>
      </ExceptionReport>


      So out of range. I have been trying different zoom levels and centres.



      Here is my code:



      <html>
      <head>
      <title>Demo leaflet.TileLayer.WMTS</title>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width">
      <link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" />
      <script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
      <script src="https://rawgithub.com/mylen/leaflet.TileLayer.WMTS/master/leaflet-tilelayer-wmts.js"></script>
      </head>
      <body>
      <div id="map" style="height: 100%; width: 100%"></div>
      <script>

      // You can get a key here: http://api.ign.fr/accueil (french)

      /** Define the layer type
      * GEOGRAPHICALGRIDSYSTEMS.MAPS
      * GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.CLASSIQUE
      * GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD
      */

      // The WMTS URL
      var url = "https://test/geoserver/gwc/service/wmts/";

      var ign2 = new L.TileLayer.WMTS( url ,
      {
      layer: "2017-05-05",
      style: "NDVI",
      tilematrixSet: "EPSG:3857",
      format: "image/png"
      }
      );

      var map = L.map('map').setView([-10.346541321, 30.965654654], 20);
      L.control.scale({'position':'bottomleft','metric':true,'imperial':false}).addTo(map);

      map.addLayer(ign2);
      var baseLayers = {"Carte IGN" : ign2};

      L.control.layers(baseLayers, {}).addTo(map);


      </script>
      </body>
      </html>






      geoserver leaflet wms tiles wmts






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 8 '18 at 7:46









      Damini Jain

      1,560217




      1,560217










      asked Jun 28 '18 at 19:16









      studentstudent

      1511212




      1511212





      bumped to the homepage by Community 25 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 25 mins ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          It looks like you are zooming into an area very close to Null Island.



          If your map is in EPSG:3857, then the area you want to look at is unlikely to be centred on (-10,30) as that is on the (imaginary) Null Island, so assuming you are really interested in Zambia you should centre the map at (3447080 -1158083).






          share|improve this answer
























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "79"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f287884%2ftrying-to-get-wmts-layer-in-leaflet-but-get-error-400-out-of-range%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            It looks like you are zooming into an area very close to Null Island.



            If your map is in EPSG:3857, then the area you want to look at is unlikely to be centred on (-10,30) as that is on the (imaginary) Null Island, so assuming you are really interested in Zambia you should centre the map at (3447080 -1158083).






            share|improve this answer




























              0














              It looks like you are zooming into an area very close to Null Island.



              If your map is in EPSG:3857, then the area you want to look at is unlikely to be centred on (-10,30) as that is on the (imaginary) Null Island, so assuming you are really interested in Zambia you should centre the map at (3447080 -1158083).






              share|improve this answer


























                0












                0








                0







                It looks like you are zooming into an area very close to Null Island.



                If your map is in EPSG:3857, then the area you want to look at is unlikely to be centred on (-10,30) as that is on the (imaginary) Null Island, so assuming you are really interested in Zambia you should centre the map at (3447080 -1158083).






                share|improve this answer













                It looks like you are zooming into an area very close to Null Island.



                If your map is in EPSG:3857, then the area you want to look at is unlikely to be centred on (-10,30) as that is on the (imaginary) Null Island, so assuming you are really interested in Zambia you should centre the map at (3447080 -1158083).







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jun 29 '18 at 8:11









                Ian TurtonIan Turton

                50.3k548118




                50.3k548118






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f287884%2ftrying-to-get-wmts-layer-in-leaflet-but-get-error-400-out-of-range%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Щит и меч (фильм) Содержание Названия серий | Сюжет |...

                    is 'sed' thread safeWhat should someone know about using Python scripts in the shell?Nexenta bash script uses...

                    Meter-Bus Содержание Параметры шины | Стандартизация |...