diff --git a/.gitignore b/.gitignore
index 24c0e4318d..78d2adfe1c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,8 @@
/build/src
/build/phantomjs-*-windows
/build/phantomjs-*-windows.zip
+/build/proj4js-*.zip
+/build/proj4js
/examples/*.json
/examples/*.combined.js
/examples/example-list.js
diff --git a/build.py b/build.py
index 6c09e4928b..e2c5264019 100755
--- a/build.py
+++ b/build.py
@@ -77,6 +77,10 @@ SRC = [path
PLOVR_JAR = 'bin/plovr-eba786b34df9.jar'
PLOVR_JAR_MD5 = '20eac8ccc4578676511cf7ccbfc65100'
+PROJ4JS = 'build/proj4js/lib/proj4js-combined.js'
+PROJ4JS_ZIP = 'build/proj4js-1.1.0.zip'
+PROJ4JS_ZIP_MD5 = '17caad64cf6ebc6e6fe62f292b134897'
+
def report_sizes(t):
t.info('uncompressed: %d bytes', os.stat(t.name).st_size)
@@ -338,8 +342,19 @@ def hostexamples(t):
t.cp('examples/example-list.js', 'examples/example-list.xml', 'examples/Jugl.js', 'build/gh-pages/%(BRANCH)s/examples/')
+@target(PROJ4JS, PROJ4JS_ZIP)
+def proj4js(t):
+ from zipfile import ZipFile
+ ZipFile(PROJ4JS_ZIP).extractall('build')
+
+
+@target(PROJ4JS_ZIP, clean=False)
+def proj4js_zip(t):
+ t.download('http://download.osgeo.org/proj4js/' + os.path.basename(t.name), md5=PROJ4JS_ZIP_MD5)
+
+
if sys.platform == 'win32':
- @target('test', '%(PHANTOMJS)s', INTERNAL_SRC, 'test/requireall.js', phony=True)
+ @target('test', '%(PHANTOMJS)s', INTERNAL_SRC, PROJ4JS, 'test/requireall.js', phony=True)
def test(t):
t.run(PHANTOMJS, 'test/phantom-jasmine/run_jasmine_test.coffee', 'test/ol.html')
@@ -354,7 +369,7 @@ if sys.platform == 'win32':
t.download('http://phantomjs.googlecode.com/files/' + os.path.basename(t.name))
else:
- @target('test', INTERNAL_SRC, 'test/requireall.js', phony=True)
+ @target('test', INTERNAL_SRC, PROJ4JS, 'test/requireall.js', phony=True)
def test(t):
t.run('%(PHANTOMJS)s', 'test/phantom-jasmine/run_jasmine_test.coffee', 'test/ol.html')
diff --git a/test/ol.html b/test/ol.html
index d4e3191ac9..979397f83e 100644
--- a/test/ol.html
+++ b/test/ol.html
@@ -25,6 +25,7 @@
+