[OpenLayers-Trac] [OpenLayers] #3060: SingleFile.js - Improvement of RegExp in _getScriptLocation function

OpenLayers trac-20090302 at openlayers.org
Mon Feb 14 11:48:12 EST 2011


#3060: SingleFile.js - Improvement of RegExp in _getScriptLocation function
---------------------+------------------------------------------------------
 Reporter:  neumann  |       Owner:              
     Type:  feature  |      Status:  new         
 Priority:  minor    |   Milestone:  2.11 Release
Component:  general  |     Version:  2.10        
 Keywords:           |       State:              
---------------------+------------------------------------------------------
 I noticed that OpenLayers does not work if the file is named
 OpenLayers.js.gz rather than OpenLayers.js

 To fix this, one has to change the RegExp object in the function
 _getScriptLocation of the file SingleFile.js

 old:
 var r = new RegExp("(^|(.*?\\/))(OpenLayers\.js)(\\?|$)"),
             s = document.getElementsByTagName('script'),
             src, m, l = "";

 new:
 var r = new RegExp("(^|(.*?\\/))(OpenLayers\.js)(\.gz)*(\\?|$)"),
             s = document.getElementsByTagName('script'),
             src, m, l = "";

 Could this be included in the trunk so one can use OpenLayers.js.gz in the
 future, please?

 Thanks,
 Andreas

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3060>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list