some problem during show a geoserver tiff with openlayer The 2019 Stack Overflow Developer Survey Results Are InHow to serve tiff WMS imagery through GeoServerGeoserver - Connect to a SQL Server 2008 Express and fetch dataopen layer GetFeatureInfo proxy settingOpenLayers Map BoundingBox calculationgeoserver preview error when output format is openlayers and pngJavascript editing WFS from GeoServer using OpenLayersWFS Layer Not DisplayGeoserver sending empty vector tiles to OpenlayersTileLayerPreview:Failed to load resource: the server responded with a status of 400 (Bad Request)Geoserver WMS call not returning base map

For what reasons would an animal species NOT cross a *horizontal* land bridge?

Output the Arecibo Message

Delete all lines which don't have n characters before delimiter

Can one be advised by a professor who is very far away?

Right tool to dig six foot holes?

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

Does the shape of a die affect the probability of a number being rolled?

What is the motivation for a law requiring 2 parties to consent for recording a conversation

Why hard-Brexiteers don't insist on a hard border to prevent illegal immigration after Brexit?

Apparent duplicates between Haynes service instructions and MOT

Why did Acorn's A3000 have red function keys?

What tool would a Roman-age civilization have for the breaking of silver and other metals into dust?

One word riddle: Vowel in the middle

Can we generate random numbers using irrational numbers like π and e?

Why isn't the circumferential light around the M87 black hole's event horizon symmetric?

What did it mean to "align" a radio?

What do hard-Brexiteers want with respect to the Irish border?

If a Druid sees an animal’s corpse, can they wild shape into that animal?

slides for 30min~1hr skype tenure track application interview

Can a flute soloist sit?

Why can Shazam fly?

How to type this arrow in math mode?

Is there a symbol for a right arrow with a square in the middle?

FPGA - DIY Programming



some problem during show a geoserver tiff with openlayer



The 2019 Stack Overflow Developer Survey Results Are InHow to serve tiff WMS imagery through GeoServerGeoserver - Connect to a SQL Server 2008 Express and fetch dataopen layer GetFeatureInfo proxy settingOpenLayers Map BoundingBox calculationgeoserver preview error when output format is openlayers and pngJavascript editing WFS from GeoServer using OpenLayersWFS Layer Not DisplayGeoserver sending empty vector tiles to OpenlayersTileLayerPreview:Failed to load resource: the server responded with a status of 400 (Bad Request)Geoserver WMS call not returning base map



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I tried to use openlayer to show geoserver tif, but it shows not correctly. Here are my steps:

1. I choose a tif from local geoserver, for example(topp:states)

2. then trying to load it with openlayer api



const tifMap = (target) => 

new Map(
target,
pixelRatio: 1,
layers: [
new TileLayer(
source: new TileWMS(
url: 'http://localhost:8080/geoserver/topp/wms',
params: 'LAYERS': 'topp:states',
'BBOX': '-124.73142200000001,24.955967,-66.969849,49.371735',
'CRS': 'EPSG:4326',
'FORMAT': 'image/jpeg',
'VERSION': '1.1.0'
,
serverType: 'geoserver'
)

)
],
view: new View(
center: [741189, -3741196],
zoom: 4
)
)
;


3. unfortunately, several same image show on the div, I don't know why, actually I tried to open the link (openlayer tried to get) via browser, it shows normal.
enter image description here










share|improve this question






























    0















    I tried to use openlayer to show geoserver tif, but it shows not correctly. Here are my steps:

    1. I choose a tif from local geoserver, for example(topp:states)

    2. then trying to load it with openlayer api



    const tifMap = (target) => 

    new Map(
    target,
    pixelRatio: 1,
    layers: [
    new TileLayer(
    source: new TileWMS(
    url: 'http://localhost:8080/geoserver/topp/wms',
    params: 'LAYERS': 'topp:states',
    'BBOX': '-124.73142200000001,24.955967,-66.969849,49.371735',
    'CRS': 'EPSG:4326',
    'FORMAT': 'image/jpeg',
    'VERSION': '1.1.0'
    ,
    serverType: 'geoserver'
    )

    )
    ],
    view: new View(
    center: [741189, -3741196],
    zoom: 4
    )
    )
    ;


    3. unfortunately, several same image show on the div, I don't know why, actually I tried to open the link (openlayer tried to get) via browser, it shows normal.
    enter image description here










    share|improve this question


























      0












      0








      0








      I tried to use openlayer to show geoserver tif, but it shows not correctly. Here are my steps:

      1. I choose a tif from local geoserver, for example(topp:states)

      2. then trying to load it with openlayer api



      const tifMap = (target) => 

      new Map(
      target,
      pixelRatio: 1,
      layers: [
      new TileLayer(
      source: new TileWMS(
      url: 'http://localhost:8080/geoserver/topp/wms',
      params: 'LAYERS': 'topp:states',
      'BBOX': '-124.73142200000001,24.955967,-66.969849,49.371735',
      'CRS': 'EPSG:4326',
      'FORMAT': 'image/jpeg',
      'VERSION': '1.1.0'
      ,
      serverType: 'geoserver'
      )

      )
      ],
      view: new View(
      center: [741189, -3741196],
      zoom: 4
      )
      )
      ;


      3. unfortunately, several same image show on the div, I don't know why, actually I tried to open the link (openlayer tried to get) via browser, it shows normal.
      enter image description here










      share|improve this question
















      I tried to use openlayer to show geoserver tif, but it shows not correctly. Here are my steps:

      1. I choose a tif from local geoserver, for example(topp:states)

      2. then trying to load it with openlayer api



      const tifMap = (target) => 

      new Map(
      target,
      pixelRatio: 1,
      layers: [
      new TileLayer(
      source: new TileWMS(
      url: 'http://localhost:8080/geoserver/topp/wms',
      params: 'LAYERS': 'topp:states',
      'BBOX': '-124.73142200000001,24.955967,-66.969849,49.371735',
      'CRS': 'EPSG:4326',
      'FORMAT': 'image/jpeg',
      'VERSION': '1.1.0'
      ,
      serverType: 'geoserver'
      )

      )
      ],
      view: new View(
      center: [741189, -3741196],
      zoom: 4
      )
      )
      ;


      3. unfortunately, several same image show on the div, I don't know why, actually I tried to open the link (openlayer tried to get) via browser, it shows normal.
      enter image description here







      openlayers geoserver






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 8 at 10:00









      Tonechas

      7,20392353




      7,20392353










      asked Mar 8 at 9:43









      benson chenbenson chen

      1




      1






















          1 Answer
          1






          active

          oldest

          votes


















          0














          OpenLayers automatically creates BBOX and CRS parameters based on the projection set in the source options and the tile grid for TileWMS or viewport for ImageWMS. A maximum extent can be set either in the tilegrid (in server projection units) or on the layer (in view projection units). Assuming the server only supported EPSG:4326 and you wished to display a tiled output as EPSG:3857 either of these would work:



           new TileLayer(
          source: new TileWMS(
          url: 'http://localhost:8080/geoserver/topp/wms',
          params: 'LAYERS': 'topp:states',
          'FORMAT': 'image/jpeg',
          'VERSION': '1.1.0'
          ,
          serverType: 'geoserver',
          projection: 'EPSG:4326'
          ),
          extent: transformExtent([-124.73142200000001,24.955967,-66.969849,49.371735], 'EPSG:4326', 'EPSG:3857')
          )


          .



           new TileLayer(
          source: new TileWMS(
          url: 'http://localhost:8080/geoserver/topp/wms',
          params: 'LAYERS': 'topp:states',
          'FORMAT': 'image/jpeg',
          'VERSION': '1.1.0'
          ,
          serverType: 'geoserver',
          projection: 'EPSG:4326',
          tilegrid: createXYZ(extent: [-124.73142200000001,24.955967,-66.969849,49.371735])
          )
          )





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            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: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            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%2fstackoverflow.com%2fquestions%2f55060494%2fsome-problem-during-show-a-geoserver-tiff-with-openlayer%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














            OpenLayers automatically creates BBOX and CRS parameters based on the projection set in the source options and the tile grid for TileWMS or viewport for ImageWMS. A maximum extent can be set either in the tilegrid (in server projection units) or on the layer (in view projection units). Assuming the server only supported EPSG:4326 and you wished to display a tiled output as EPSG:3857 either of these would work:



             new TileLayer(
            source: new TileWMS(
            url: 'http://localhost:8080/geoserver/topp/wms',
            params: 'LAYERS': 'topp:states',
            'FORMAT': 'image/jpeg',
            'VERSION': '1.1.0'
            ,
            serverType: 'geoserver',
            projection: 'EPSG:4326'
            ),
            extent: transformExtent([-124.73142200000001,24.955967,-66.969849,49.371735], 'EPSG:4326', 'EPSG:3857')
            )


            .



             new TileLayer(
            source: new TileWMS(
            url: 'http://localhost:8080/geoserver/topp/wms',
            params: 'LAYERS': 'topp:states',
            'FORMAT': 'image/jpeg',
            'VERSION': '1.1.0'
            ,
            serverType: 'geoserver',
            projection: 'EPSG:4326',
            tilegrid: createXYZ(extent: [-124.73142200000001,24.955967,-66.969849,49.371735])
            )
            )





            share|improve this answer



























              0














              OpenLayers automatically creates BBOX and CRS parameters based on the projection set in the source options and the tile grid for TileWMS or viewport for ImageWMS. A maximum extent can be set either in the tilegrid (in server projection units) or on the layer (in view projection units). Assuming the server only supported EPSG:4326 and you wished to display a tiled output as EPSG:3857 either of these would work:



               new TileLayer(
              source: new TileWMS(
              url: 'http://localhost:8080/geoserver/topp/wms',
              params: 'LAYERS': 'topp:states',
              'FORMAT': 'image/jpeg',
              'VERSION': '1.1.0'
              ,
              serverType: 'geoserver',
              projection: 'EPSG:4326'
              ),
              extent: transformExtent([-124.73142200000001,24.955967,-66.969849,49.371735], 'EPSG:4326', 'EPSG:3857')
              )


              .



               new TileLayer(
              source: new TileWMS(
              url: 'http://localhost:8080/geoserver/topp/wms',
              params: 'LAYERS': 'topp:states',
              'FORMAT': 'image/jpeg',
              'VERSION': '1.1.0'
              ,
              serverType: 'geoserver',
              projection: 'EPSG:4326',
              tilegrid: createXYZ(extent: [-124.73142200000001,24.955967,-66.969849,49.371735])
              )
              )





              share|improve this answer

























                0












                0








                0







                OpenLayers automatically creates BBOX and CRS parameters based on the projection set in the source options and the tile grid for TileWMS or viewport for ImageWMS. A maximum extent can be set either in the tilegrid (in server projection units) or on the layer (in view projection units). Assuming the server only supported EPSG:4326 and you wished to display a tiled output as EPSG:3857 either of these would work:



                 new TileLayer(
                source: new TileWMS(
                url: 'http://localhost:8080/geoserver/topp/wms',
                params: 'LAYERS': 'topp:states',
                'FORMAT': 'image/jpeg',
                'VERSION': '1.1.0'
                ,
                serverType: 'geoserver',
                projection: 'EPSG:4326'
                ),
                extent: transformExtent([-124.73142200000001,24.955967,-66.969849,49.371735], 'EPSG:4326', 'EPSG:3857')
                )


                .



                 new TileLayer(
                source: new TileWMS(
                url: 'http://localhost:8080/geoserver/topp/wms',
                params: 'LAYERS': 'topp:states',
                'FORMAT': 'image/jpeg',
                'VERSION': '1.1.0'
                ,
                serverType: 'geoserver',
                projection: 'EPSG:4326',
                tilegrid: createXYZ(extent: [-124.73142200000001,24.955967,-66.969849,49.371735])
                )
                )





                share|improve this answer













                OpenLayers automatically creates BBOX and CRS parameters based on the projection set in the source options and the tile grid for TileWMS or viewport for ImageWMS. A maximum extent can be set either in the tilegrid (in server projection units) or on the layer (in view projection units). Assuming the server only supported EPSG:4326 and you wished to display a tiled output as EPSG:3857 either of these would work:



                 new TileLayer(
                source: new TileWMS(
                url: 'http://localhost:8080/geoserver/topp/wms',
                params: 'LAYERS': 'topp:states',
                'FORMAT': 'image/jpeg',
                'VERSION': '1.1.0'
                ,
                serverType: 'geoserver',
                projection: 'EPSG:4326'
                ),
                extent: transformExtent([-124.73142200000001,24.955967,-66.969849,49.371735], 'EPSG:4326', 'EPSG:3857')
                )


                .



                 new TileLayer(
                source: new TileWMS(
                url: 'http://localhost:8080/geoserver/topp/wms',
                params: 'LAYERS': 'topp:states',
                'FORMAT': 'image/jpeg',
                'VERSION': '1.1.0'
                ,
                serverType: 'geoserver',
                projection: 'EPSG:4326',
                tilegrid: createXYZ(extent: [-124.73142200000001,24.955967,-66.969849,49.371735])
                )
                )






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 8 at 13:41









                MikeMike

                2,8702211




                2,8702211





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • 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%2fstackoverflow.com%2fquestions%2f55060494%2fsome-problem-during-show-a-geoserver-tiff-with-openlayer%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

                    1928 у кіно

                    Захаров Федір Захарович

                    Ель Греко