diff --git a/build.py b/build.py index a7e27b06e5..3305910d45 100755 --- a/build.py +++ b/build.py @@ -348,6 +348,8 @@ def hostexamples(t): t.makedirs('build/gh-pages/%(BRANCH)s/examples') t.makedirs('build/gh-pages/%(BRANCH)s/build') t.cp(EXAMPLES, (path.replace('.html', '.js') for path in EXAMPLES), 'examples/style.css', 'build/gh-pages/%(BRANCH)s/examples/') + t.rm_rf('build/gh-pages/%(BRANCH)s/examples/data') + t.cp_r('examples/data', 'build/gh-pages/%(BRANCH)s/examples/data') t.cp('build/loader_hosted_examples.js', 'build/gh-pages/%(BRANCH)s/examples/loader.js') t.cp('build/ol.js', 'build/ol-simple.js', 'build/ol-whitespace.js', 'build/ol.css', 'build/gh-pages/%(BRANCH)s/build/') t.cp('examples/example-list.html', 'build/gh-pages/%(BRANCH)s/examples/index.html') diff --git a/examples/data/ogcsample.xml b/examples/data/ogcsample.xml new file mode 100644 index 0000000000..0d4c52da60 --- /dev/null +++ b/examples/data/ogcsample.xml @@ -0,0 +1,284 @@ + + + + WMS + Acme Corp. Map Server + Map Server maintained by Acme Corporation. Contact: webmaster@wmt.acme.com. High-quality maps showing roadrunner nests and possible ambush locations. + + + bird + roadrunner + ambush + + + + + + + Jeff Smith + NASA + + Computer Scientist + + + postal +
NASA Goddard Space Flight Center
+ Greenbelt + MD + 20771 + + USA +
+ +1 301 555-1212 + user@host.com +
+ + none + + none + 16 + 2048 + 2048 +
+ + + + + text/xml + + + + + + + + + + + + + + image/gif + image/png + image/jpeg + + + + + + + + + + + + text/xml + text/plain + text/html + + + + + + + + + + + + XML + + INIMAGE + BLANK + + + Acme Corp. Map Server + CRS:84 + + + + + + + + ROADS_RIVERS + Roads and Rivers + + EPSG:26986 + + -71.63 + -70.78 + 41.75 + 42.90 + + + + + + State College University + + + + image/gif + + + + 123456 + + + XML + + + + 1000 + 250000 + + ROADS_1M + Roads at 1:1M scale + Roads at a scale of 1 to 1 million. + + + road + transportation + atlas + + 123456 + + + text/plain + + + + text/xml + + + + + + + RIVERS_1M + Rivers at 1:1M scale + Rivers at a scale of 1 to 1 million. + + + river + canal + waterway + + + + + + Weather Forecast Data + CRS:84 + + + -180 + 180 + + -90 + 90 + + 1999-01-01/2000-08-22/P1D + + + Clouds + Forecast cloud cover + + + Temperature + Forecast temperature + + + + Pressure + Forecast barometric pressure + + + 1999-01-01/2000-08-22/P1D + + 0,1000,3000,5000,10000 + + + + ozone_image + Global ozone distribution (1992) + + + -180 + 180 + -90 + 90 + + 1992 + + + + population + World population, annual + + -180 + + 180 + -90 + 90 + + 1990/2000/P1Y + + + + +
diff --git a/examples/wms-capabilities.js b/examples/wms-capabilities.js index a9c708f982..09d8ed7061 100644 --- a/examples/wms-capabilities.js +++ b/examples/wms-capabilities.js @@ -1,7 +1,7 @@ goog.require('ol.parser.ogc.WMSCapabilities'); var parser = new ol.parser.ogc.WMSCapabilities(), result; -var url = '../test/spec/ol/parser/ogc/xml/wmscapabilities_v1_3_0/ogcsample.xml'; +var url = 'data/ogcsample.xml'; var xhr = new XMLHttpRequest(); xhr.open('GET', url, true);