Adding geotiff through WMS produced by GeoServer

407
0
05-20-2020 12:10 PM
MatheusSereno
New Contributor II

Hello, community

I am trying to add a geotiff to my webmap created with ArcGIS JS API 4.x. Since it needs to be a service to serve the image, I installed a local instance of GeoServer on my computer and published a WMS for the image in question. However, everytime I try to call the service via URL, the console shows the following errors:

  • [esri.layers.WMSLayer] #load() Failed to load layer (title: 'Layer', id: '172336bbd33-layer-0') 
    • message: "XML Parse Error"
  • [esri.views.LayerViewManager] Failed to create view for layer 'Layer, id:172336bbd33-layer-0' of type 'wms'

The following piece of code is what I am using:

var layer = new WMSLayer({
url: "http://localhost:8080/geoserver/Test/wms?service=WMS&version=1.1.0&request=GetMap&layers=ProjectT%3AFAA_UTM18N_NAD83&bbox=223586.23651964564%2C4184720.1300687897%2C259261.49928124566%2C4217906.977453323&width=768&height=714&srs=EPSG%3A26918&format=image%2Fgeotiff",
});
map.add(layer);

The API seems to expect a XML and not a geotiff. Any suggestions?

Thanks and have a nice day!

0 Kudos
0 Replies