[OpenLayers-Users] Minifying scripts

eriktronic etimmers at gmail.com
Mon Nov 5 13:15:56 PST 2012


appleton wrote
> I have tried Google's Closure Compiler in advanced mode but it renames the
> OpenLayers functions that are being called, like OpenLayers.d.Zoom
> 
> Is there a way to tell Closure to NOT minify any of the OpenLayers calls?

I am using OpenLayers with Closure in advanced mode. In order to do this you
need to make an externs file (or multiple) containing all the functions you
wish to use. You can even add types to the parameters to force yourself to
use the functions correctly. See 
https://developers.google.com/closure/compiler/docs/api-tutorial3#externs
<https://developers.google.com/closure/compiler/docs/api-tutorial3#externs>  
for a nice example.

Regards,
Erik



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Minifying-scripts-tp5013815p5014118.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list