I'm querying an ArcGIS Server in OpenLayers v5.2.0 to try to get a single tile WMS returned to minimize requests to the server. I have been able to get the data to plot, but it's displaying in the wrong location. I've checked the bbox and imagery size and those appear to be ok - just the positioning is off. I'm monkeyed with the ratio, adding server types, but haven't found the right combination to get it to properly return and place the image in the right location. Is this a bug or am I doing something wrong? P.S. I'm using the export option of ESRI rather than the WMS since the layer is time-enabled (I've excluded the times below, but the service should still return an image).

enter image description here

I'm using this call:

 var testESRI = new ol.layer.Image(
    source : new ol.source.ImageWMS(
      params :
        'LAYERS' : 'show:1,3',
        'F' : 'image',
        'FORMAT' : 'png8',
        'TRANSPARENT' : true,
        'BBOXSR' : '102100',
        'IMAGESR' : '102100',
        'DPI' : 96
      ratio: 1,
      url : 'https://nowcoast.noaa.gov/arcgis/rest/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/export',
      serverType: 'mapserver'

The call that worked in OpenLayers 2 was this:

new OpenLayers.Layer.ArcGIS93Rest("ESRI", "https://nowcoast.noaa.gov/arcgis/rest/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/export",
    layers : "show:1,3",
    transparent : true,
    format : 'png8'
  }, {
    singleTile : true

1 Answer 1


The WMSServer url seems to work correctly with ImageWMS or TileWMS:

source: new ol.source.ImageWMS({
    url: 'https://nowcoast.noaa.gov/arcgis/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer/WMSServer',
    params: {'LAYERS': '1,3'},

also OpenLayers has ImageArcGISRest and TileArcGISRest sources. /export is not needed on the url and causes an error.

source: new ol.source.ImageArcGISRest({
   url: 'https://nowcoast.noaa.gov/arcgis/rest/services/nowcoast/radar_meteo_imagery_nexrad_time/MapServer',
   params: {
        'LAYERS' : 'show:1,3',
        'FORMAT' : 'png8',

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.