Update legacytilesource.js

Remove check for filetype based on uri or mimetype strings (maybe the filetype is not known before actually downloading the resource).
This commit is contained in:
Andreas Wagner 2016-10-20 11:32:13 +02:00 committed by GitHub
parent bcd093e3e6
commit e50beb435b

View File

@ -204,12 +204,7 @@ function filterFiles( files ){
file = files[ i ]; file = files[ i ];
if( file.height && if( file.height &&
file.width && file.width &&
file.url && ( file.url ){
file.url.toLowerCase().match(/^.*\.(png|jpg|jpeg|gif)(?:\?.*)?$/) || (
file.mimetype &&
file.mimetype.toLowerCase().match(/^.*\/(png|jpg|jpeg|gif)$/)
)
) ){
//This is sufficient to serve as a level //This is sufficient to serve as a level
filtered.push({ filtered.push({
url: file.url, url: file.url,