[OpenLayers-Users] CORB problem with TileArcGISRest layer in OpenLayers 5 client

Alex Rice rice.guido at gmail.com
Wed Sep 25 09:08:14 PDT 2019


The tiles.arcgis.com URL seems to be invalid because it's returning
content-type: text/html instead of a tile, as you observed. I would try to
solve that before even thinking about CORB/CORS problem. Maybe that problem
will go away when you are getting a tiles response (the http headers will
likely be different as well).

On Wed, Sep 25, 2019 at 8:37 AM Benjamin Krepp <bkrepp at ctps.org> wrote:

> Dear colleagues,
>
>
>
> I’m running into difficulty using a tiled basemap layer with an
> TileArcGISRest data source in an OpenLayers 5 client.
>
> I’ve able to successfully use this layer in OpenLayers 2 clients, and
> don’t’ understand the problem I’m running into and what needs to be done to
> address it.
>
> The layer in question is one of MassGIS’s (the Massachusetts State GIS
> Agency’s) tiled basemaps. It is described here:
> https://www.mass.gov/service-details/massgis-base-map
>
>
>
> My sample OL 2 client, which works just fine, may be found here:
> https://www.ctps.org/geoserver/www/apps/MassGIS_basemap_OL_v2/index.html
>
> My sample OL 5 client, which runs into errors, may be found here:
> https://www.ctps.org/geoserver/www/apps/MassGIS_basemap_OL_v5/index.html
>
> The code for my OL 5 client is based on a sample on the OpenLayers
> website:  https://openlayers.org/en/latest/examples/arcgis-tiled.html
>
>
>
> When run in the Chrome browser, the OL 5 client gets cross-origin read
> blocking (CORB) errors, reported in the developer’s console:
>
>
>
> Cross-Origin Read Blocking (CORB) blocked cross-origin response
> https://tiles.arcgis.com/tiles/hGdibHYSPO59RG1h/arcgis/rest/services/MassGIS_Basemap_Detailed_Features/MapServer/export?F=image&FORMAT=PNG32&TRANSPARENT=true&SIZE=256%2C256&BBOX=-71.103515625%2C42.275390625%2C-71.015625%2C42.36328125&BBOXSR=4326&IMAGESR=4326&DPI=90
> with MIME type text/html. See
> https://www.chromestatus.com/feature/5629709824032768 for more details.
>
>
>
> The layer also fails to render when the sample client is run in Firefox,
> IE, Edge, and Opera.
>
> I checked the developer’s console in Firefox, and there no CORB errors are
> reported. Looking at the responses to the requests for tiles in the
> ‘Network’ tab, I see the following:
>
> <html>
>
> <body>
>
> <h2>Error</h2>
>
> <div class=”restbody”>
>
> <h3>Operation not supported.</h3><br/>
>
> <b> Code: <b>404<br/><br/>
>
> </div>
>
> </body>
>
> </html>
>
> So, in spite of the lack of an error message in the console, it’s clear
> that the server isn’t sending tiles back in response to requests.
>
>
>
> Due to the big changes in the OpenLayers API between versions 2 and 3, my
> first hypothesis is that I’ve not correctly “translated” my OL 2 code into
> OL 3/4/5.
>
> This having been said, it’s not clear to me what a “correct” translation
> might look like – the sample on the OL site noted above is the only thing
> I’ve been able to find to use as a model.
>
>
>
> If anyone can shed light on what I might be doing wrong here, it would be
> much appreciated.
>
>
>
> Thanks and best regards,
>
> Ben
>
>
>
>
>
> *Benjamin Krepp*  |  Chief GIS Programmer/Analyst
>
> CENTRAL TRANSPORTATION PLANNING STAFF
>
> 857.702.3670  | *bkrepp at ctps.org <bkrepp at ctps.org>*
>
> www.ctps.org
>
>
>
> [image: email_logos_2015]
>
>
>
>
>
> *Please be advised that the Massachusetts Secretary of State considers
> e-mail to be a public record, and therefore subject to the Massachusetts
> Public Records Law, M.G.L. c. 66 § 10. *
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/openlayers-users



-- 
Alex G Rice
rice.guido at gmail.com
+1 505-603-5639
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20190925/f2ebd571/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 6312 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20190925/f2ebd571/attachment-0001.jpg>


More information about the Users mailing list