From ashley_c_mort at raytheon.com Thu Oct 1 19:31:42 2020 From: ashley_c_mort at raytheon.com (Ashley Mort) Date: Fri, 2 Oct 2020 02:31:42 +0000 Subject: [OpenLayers-Users] extending ol.Tile in OpenLayers 6? In-Reply-To: References: Message-ID: I am upgrading my app from OpenLayers 4.6.4 to 6.1.1 and I can't figure out how to extend Tile in OL6. My code is as follows which works in OL 4.6.4. What would I do to achieve the same thing in OpenLayers 6? My error is: Uncaught TypeError: Class extends value undefined is not a constructor or null index.html that includes OL6.1.1 is:
My map view class contains the following (which works in OpenLayers 4): class CanvasTile extends ol.Tile { constructor(tileCoord, state, src, crossOrigin, tileLoadFunction, options) { super(tileCoord, state, options); this.canvas = document.createElement('canvas'); this.tileLoadFunction = tileLoadFunction; this.src = src; } getCanvas() { return this.canvas; } } Ashley Mort Sr. Software Engineer 972-638-6317 office 814-571-3039 cell -------------- next part -------------- An HTML attachment was scrubbed... URL: