mirror of
https://github.com/Esri/offline-editor-js.git
synced 2025-12-15 15:20:05 +00:00
correctly detect tile image type
This commit is contained in:
parent
48e314a072
commit
4e2e0a3994
@ -32,7 +32,8 @@ define([
|
||||
{
|
||||
console.log("extending layer", layer.url);
|
||||
|
||||
layer._lastTileUrl = "";
|
||||
layer._lastTileUrl = "";
|
||||
layer._imageType = "";
|
||||
|
||||
/* we add some methods to the layer object */
|
||||
/* we don't want to extend the tiled layer class, as it is a capability that we want to add only to one instance */
|
||||
@ -76,6 +77,7 @@ define([
|
||||
console.log("LIBRARY ONLINE " + this.offline.online)
|
||||
if( this.offline.online )
|
||||
{
|
||||
if(layer._imageType == "")layer._imageType = this.tileInfo.format.toLowerCase();
|
||||
console.log("fetching url online: ", url);
|
||||
layer._lastTileUrl = url;
|
||||
return url;
|
||||
@ -99,7 +101,7 @@ console.log("LIBRARY ONLINE " + this.offline.online)
|
||||
{
|
||||
img.style.borderColor = "blue";
|
||||
console.log("found tile offline", url);
|
||||
imgURL = "data:image;base64," + offlineTile.img;
|
||||
imgURL = "data:image/" + layer._imageType +";base64," + offlineTile.img;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user