[OpenLayers-Trac] Re: [OpenLayers] #2873: Build: Compressed code "OpenLayers.js" can be reduced by 9k

OpenLayers trac-20090302 at openlayers.org
Wed Oct 13 17:52:59 EDT 2010

#2873: Build: Compressed code "OpenLayers.js" can be reduced by 9k
  Reporter:  jorix    |       Owner:  jorix       
      Type:  feature  |      Status:  reopened    
  Priority:  minor    |   Milestone:  2.11 Release
 Component:  general  |     Version:  2.10        
Resolution:           |    Keywords:              
     State:  Review   |  

Comment(by jorix):

 Replying to [comment:15 erilem]:
 > And thanks a lot jorix for bringing up the issue.
 Thanks, I'm surprised to see much movement in one of my tickets, I am glad
 it is useful.

 Precautions to consider:

 The '''cache''' introduced in #2389 for "_getScriptLocation" '''has been
 lost'''. It is used in Map.js and in "Util.getImagesLocation"

 My first solution was to copy _getScriptLocation in singleFile.js, once
 prepared, I dismissed it because I thought it would be rejected, ups!
 I worked with some premises that can serve:
  * Put  bold comments in both files warning to future developers of
 duplicity (missing).
  * Can copy and paste the code of _getScriptLocation function to
 singleFile.js if changes are made (now are different)
  * Ensure compatibility with old *.cfg which does not exclude
 OpenLayers.js (guaranteed)
  * Put the same "@requires" in the two files (in "singleFile.js" missing)

 What to do with "VERSION_NUMBER"? Now I've done an SVN Update in my local
 copy and and "OpenLayers.js" says 10822 and "SingleFile.js" says 10823!

Ticket URL: <http://trac.openlayers.org/ticket/2873#comment:22>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer

More information about the Trac mailing list