Allow data tile source loader to return a value or a promise
This commit is contained in:
@@ -32,7 +32,7 @@ const map = new Map({
|
||||
context.strokeRect(0, 0, size, size);
|
||||
const data = context.getImageData(0, 0, size, size).data;
|
||||
// converting to Uint8Array for increased browser compatibility
|
||||
return Promise.resolve(new Uint8Array(data.buffer));
|
||||
return new Uint8Array(data.buffer);
|
||||
},
|
||||
// disable opacity transition to avoid overlapping labels during tile loading
|
||||
transition: 0,
|
||||
|
||||
Reference in New Issue
Block a user