Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of github.com:openlayers/ol3 into vector

Conflicts:
	src/ol/renderer/canvas/canvasrenderer.js
	test/ol.html
  • Loading branch information...
commit 386b97cf9a152c72211558867258cba54db85159 2 parents dafa48d + f735a59
@ahocevar ahocevar authored
Showing with 259 additions and 122 deletions.
  1. +2 −0  .gitignore
  2. +85 −9 build.py
  3. +2 −0  examples/anchored-elements.js
  4. +2 −0  examples/canvas-tiles.js
  5. +1 −0  examples/full-screen.js
  6. +3 −0  examples/side-by-side.js
  7. +1 −0  examples/two-layers.js
  8. +4 −0 examples/wms-custom-proj.js
  9. +3 −0  examples/wms.js
  10. +1 −1  src/ol/animation.js
  11. +2 −0  src/ol/attribution.js
  12. +0 −1  src/ol/collection.js
  13. +4 −0 src/ol/control/attributioncontrol.js
  14. +4 −0 src/ol/control/dragboxcontrol.js
  15. +3 −1 src/ol/control/mousepositioncontrol.js
  16. +0 −1  src/ol/control/zoomcontrol.js
  17. +1 −1  src/ol/framestate.js
  18. +0 −1  src/ol/imagetile.js
  19. +1 −2  src/ol/interaction/draginteraction.js
  20. +3 −1 src/ol/interaction/dragpaninteraction.js
  21. +0 −1  src/ol/interaction/dragrotateandzoominteraction.js
  22. +0 −1  src/ol/interaction/dragrotateinteraction.js
  23. +2 −1  src/ol/interaction/dragzoominteraction.js
  24. +1 −0  src/ol/interaction/keyboardpaninteraction.js
  25. +0 −1  src/ol/interaction/keyboardzoominteraction.js
  26. +1 −1  src/ol/interaction/mousewheelzoominteraction.js
  27. +0 −1  src/ol/iview2d.js
  28. +2 −2 src/ol/kinetic.js
  29. +16 −11 src/ol/map.js
  30. +1 −0  src/ol/mapbrowserevent.js
  31. +1 −0  src/ol/renderer/canvas/canvaslayerrenderer.js
  32. +1 −0  src/ol/renderer/canvas/canvasrenderer.js
  33. +3 −2 src/ol/renderer/canvas/canvastilelayerrenderer.js
  34. +0 −1  src/ol/renderer/dom/domlayerrenderer.js
  35. +0 −4 src/ol/renderer/dom/dommaprenderer.js
  36. +1 −1  src/ol/renderer/dom/domrenderer.js
  37. +2 −3 src/ol/renderer/dom/domtilelayerrenderer.js
  38. +1 −0  src/ol/renderer/layerrenderer.js
  39. +5 −2 src/ol/renderer/maprenderer.js
  40. +2 −3 src/ol/renderer/webgl/webglmaprenderer.js
  41. +1 −1  src/ol/renderer/webgl/webglrenderer.js
  42. +4 −3 src/ol/renderer/webgl/webgltilelayerrenderer.js
  43. +6 −2 src/ol/source/bingmapssource.js
  44. +1 −0  src/ol/source/debugtilesource.js
  45. +1 −0  src/ol/source/imagetilesource.js
  46. +1 −0  src/ol/source/openstreetmapsource.js
  47. +0 −1  src/ol/source/source.js
  48. +1 −0  src/ol/source/stamensource.js
  49. +1 −3 src/ol/source/tiledwmssource.js
  50. +5 −3 src/ol/source/tilejsonsource.js
  51. +1 −2  src/ol/source/tilesource.js
  52. +1 −2  src/ol/source/xyzsource.js
  53. +0 −1  src/ol/tile.js
  54. +0 −1  src/ol/tilecache.js
  55. +1 −0  src/ol/tilegrid/tilegrid.js
  56. +0 −2  src/ol/view.js
  57. +2 −0  src/ol/view2d.js
  58. +1 −30 test/ol.html
  59. +2 −0  test/spec/ol/array.test.js
  60. +2 −0  test/spec/ol/collection.test.js
  61. +2 −0  test/spec/ol/color.test.js
  62. +5 −3 test/spec/ol/control/control.test.js
  63. +2 −0  test/spec/ol/extent.test.js
  64. +2 −0  test/spec/ol/layer/layer.test.js
  65. +12 −9 test/spec/ol/map.test.js
  66. +2 −0  test/spec/ol/object.test.js
  67. +2 −0  test/spec/ol/projection.test.js
  68. +2 −0  test/spec/ol/rectangle.test.js
  69. +2 −0  test/spec/ol/resolutionconstraint.test.js
  70. +6 −2 test/spec/ol/source/xyz.test.js
  71. +2 −0  test/spec/ol/tilecoord.test.js
  72. +2 −0  test/spec/ol/tilegrid.test.js
  73. +2 −0  test/spec/ol/tilequeue.test.js
  74. +2 −0  test/spec/ol/tilerange.test.js
  75. +3 −3 test/spec/ol/tileurlfunction.test.js
  76. +3 −1 test/spec/ol/view2d.test.js
  77. +16 −0 test/test.json
View
2  .gitignore
@@ -1,6 +1,7 @@
*.pyc
/bin/plovr*.jar
/build/gh-pages
+/build/check-requires-timestamp
/build/jsdoc-*-timestamp
/build/lint-spec-timestamp
/build/lint-src-timestamp
@@ -12,3 +13,4 @@
/examples/*.combined.js
/examples/example-list.js
/examples/example-list.xml
+/test/requireall.js
View
94 build.py
@@ -122,19 +122,28 @@ def build_src_external_src_types_js(t):
t.output('%(PYTHON)s', 'bin/generate-exports.py', '--typedef', 'src/objectliterals.exports')
-@target('build/src/internal/src/requireall.js', SRC)
-def build_src_internal_src_requireall_js(t):
- requires = set(('goog.dom',))
- for dependency in t.dependencies:
+def _build_require_list(dependencies, output_file_name):
+ requires = set()
+ for dependency in dependencies:
for line in open(dependency):
match = re.match(r'goog\.provide\(\'(.*)\'\);', line)
if match:
requires.add(match.group(1))
- with open(t.name, 'w') as f:
+ with open(output_file_name, 'w') as f:
for require in sorted(requires):
f.write('goog.require(\'%s\');\n' % (require,))
+@target('build/src/internal/src/requireall.js', SRC)
+def build_src_internal_src_requireall_js(t):
+ _build_require_list(t.dependencies, t.name)
+
+
+@target('test/requireall.js', SPEC)
+def build_test_requireall_js(t):
+ _build_require_list(t.dependencies, t.name)
+
+
@target('build/src/internal/src/types.js', 'bin/generate-exports.py', 'src/objectliterals.exports')
def build_src_internal_types_js(t):
t.output('%(PYTHON)s', 'bin/generate-exports.py', '--typedef', 'src/objectliterals.exports')
@@ -177,9 +186,9 @@ def action(t):
return Target(name, action=action, dependencies=dependencies)
-@target('serve', PLOVR_JAR, INTERNAL_SRC, 'examples')
+@target('serve', PLOVR_JAR, INTERNAL_SRC, 'test/requireall.js', 'examples')
def serve(t):
- t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve', glob.glob('build/*.json'), glob.glob('examples/*.json'))
+ t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve', glob.glob('build/*.json'), glob.glob('examples/*.json'), glob.glob('test/*.json'))
@target('serve-precommit', PLOVR_JAR, INTERNAL_SRC)
@@ -187,7 +196,7 @@ def serve_precommit(t):
t.run('%(JAVA)s', '-jar', PLOVR_JAR, 'serve', 'build/ol-all.json')
-virtual('lint', 'build/lint-src-timestamp', 'build/lint-spec-timestamp')
+virtual('lint', 'build/lint-src-timestamp', 'build/lint-spec-timestamp', 'build/check-requires-timestamp')
@target('build/lint-src-timestamp', SRC, INTERNAL_SRC, EXTERNAL_SRC, EXAMPLES_SRC)
@@ -199,6 +208,72 @@ def build_lint_src_timestamp(t):
t.touch()
+@target('build/check-requires-timestamp', SRC, INTERNAL_SRC, EXTERNAL_SRC, EXAMPLES_SRC)
+def build_check_requires_timestamp(t):
+ unused_count = 0
+ all_provides = set()
+ for filename in sorted(t.dependencies):
+ if filename == 'build/src/internal/src/requireall.js':
+ continue
+ require_linenos = {}
+ uses = set()
+ lineno = 0
+ for line in open(filename):
+ lineno += 1
+ m = re.match(r'goog.provide\(\'(.*)\'\);', line)
+ if m:
+ all_provides.add(m.group(1))
+ continue
+ m = re.match(r'goog.require\(\'(.*)\'\);', line)
+ if m:
+ require_linenos[m.group(1)] = lineno
+ continue
+ for require in require_linenos.iterkeys():
+ if require in line:
+ uses.add(require)
+ for require in sorted(set(require_linenos.keys()) - uses):
+ t.info('%s:%d: unused goog.require: %r' % (filename, require_linenos[require], require))
+ unused_count += 1
+ all_provides.discard('ol')
+ all_provides.discard('ol.Map')
+ all_provides.discard('ol.MapProperty')
+ provide_res = dict((provide, re.compile(r'\b%s\b' % (re.escape(provide)),)) for provide in all_provides)
+ missing_count = 0
+ for filename in sorted(t.dependencies):
+ if filename in INTERNAL_SRC or filename in EXTERNAL_SRC:
+ continue
+ provides = set()
+ requires = set()
+ uses = set()
+ lineno = 0
+ for line in open(filename):
+ lineno += 1
+ m = re.match(r'goog.provide\(\'(.*)\'\);', line)
+ if m:
+ provides.add(m.group(1))
+ continue
+ m = re.match(r'goog.require\(\'(.*)\'\);', line)
+ if m:
+ requires.add(m.group(1))
+ continue
+ for provide, provide_re in provide_res.iteritems():
+ if provide_re.search(line):
+ uses.add(provide)
+ if filename == 'src/ol/renderer/layerrenderer.js':
+ uses.discard('ol.renderer.Map')
+ m = re.match(r'src/ol/renderer/(\w+)/\1(\w*)layerrenderer\.js\Z', filename)
+ if m:
+ uses.discard('ol.renderer.Map')
+ uses.discard('ol.renderer.%s.Map' % (m.group(1),))
+ missing_requires = uses - requires - provides
+ if missing_requires:
+ t.info('%s: missing goog.requires: %s', filename, ', '.join(sorted(missing_requires)))
+ missing_count += len(missing_requires)
+ if unused_count or missing_count:
+ t.error('%d unused goog.requires, %d missing goog.requires' % (unused_count, missing_count))
+ t.touch()
+
+
@target('build/lint-spec-timestamp', SPEC)
def build_lint_spec_timestamp(t):
t.run('%(GJSLINT)s', t.newer(SPEC))
@@ -246,10 +321,11 @@ def hostexamples(t):
t.cp('examples/example-list.js', 'examples/example-list.xml', 'examples/Jugl.js', 'build/gh-pages/%(BRANCH)s/examples/')
-@target('test', INTERNAL_SRC, phony=True)
+@target('test', INTERNAL_SRC, 'test/requireall.js', phony=True)
def test(t):
t.run('%(PHANTOMJS)s', 'test/phantom-jasmine/run_jasmine_test.coffee', 'test/ol.html')
+
@target('fixme', phony=True)
def find_fixme(t):
regex = re.compile(".(FIXME|TODO).")
View
2  examples/anchored-elements.js
@@ -5,8 +5,10 @@ goog.require('ol.AnchoredElement');
goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.Map');
+goog.require('ol.Projection');
goog.require('ol.RendererHints');
goog.require('ol.View2D');
+goog.require('ol.layer.TileLayer');
goog.require('ol.source.MapQuestOpenAerial');
View
2  examples/canvas-tiles.js
@@ -3,9 +3,11 @@ goog.require('ol.Coordinate');
goog.require('ol.Map');
goog.require('ol.Projection');
goog.require('ol.RendererHint');
+goog.require('ol.View2D');
goog.require('ol.layer.TileLayer');
goog.require('ol.source.DebugTileSource');
goog.require('ol.source.OpenStreetMap');
+goog.require('ol.tilegrid.XYZ');
var layers = new ol.Collection([
View
1  examples/full-screen.js
@@ -6,6 +6,7 @@ goog.require('ol.Coordinate');
goog.require('ol.Map');
goog.require('ol.RendererHints');
goog.require('ol.View2D');
+goog.require('ol.layer.TileLayer');
goog.require('ol.source.MapQuestOpenAerial');
View
3  examples/side-by-side.js
@@ -1,12 +1,15 @@
goog.require('goog.debug.Console');
goog.require('goog.debug.Logger');
goog.require('goog.debug.Logger.Level');
+goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.Map');
+goog.require('ol.Projection');
goog.require('ol.RendererHint');
goog.require('ol.View2D');
goog.require('ol.animation');
goog.require('ol.control.MousePosition');
+goog.require('ol.easing');
goog.require('ol.interaction.Keyboard');
goog.require('ol.layer.TileLayer');
goog.require('ol.source.MapQuestOpenAerial');
View
1  examples/two-layers.js
@@ -1,3 +1,4 @@
+goog.require('ol.BingMapsStyle');
goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.Map');
View
4 examples/wms-custom-proj.js
@@ -1,12 +1,16 @@
goog.require('goog.debug.Console');
goog.require('goog.debug.Logger');
goog.require('goog.debug.Logger.Level');
+goog.require('ol.Attribution');
goog.require('ol.Collection');
goog.require('ol.Coordinate');
+goog.require('ol.Extent');
goog.require('ol.Map');
goog.require('ol.Projection');
+goog.require('ol.ProjectionUnits');
goog.require('ol.RendererHints');
goog.require('ol.View2D');
+goog.require('ol.layer.TileLayer');
goog.require('ol.source.TiledWMS');
View
3  examples/wms.js
@@ -3,8 +3,11 @@ goog.require('goog.debug.Logger');
goog.require('goog.debug.Logger.Level');
goog.require('ol.Collection');
goog.require('ol.Coordinate');
+goog.require('ol.Extent');
goog.require('ol.Map');
+goog.require('ol.RendererHint');
goog.require('ol.View2D');
+goog.require('ol.layer.TileLayer');
goog.require('ol.source.MapQuestOpenAerial');
goog.require('ol.source.TiledWMS');
View
2  src/ol/animation.js
@@ -1,10 +1,10 @@
// FIXME works for View2D only
-// FIXME dependency on ol.View2D suppressed to prevent dependency loop
goog.provide('ol.animation');
goog.require('goog.fx.easing');
goog.require('ol.PreRenderFunction');
+goog.require('ol.ViewHint');
goog.require('ol.easing');
View
2  src/ol/attribution.js
@@ -1,5 +1,7 @@
goog.provide('ol.Attribution');
+goog.require('ol.TileRange');
+
/**
View
1  src/ol/collection.js
@@ -9,7 +9,6 @@ goog.provide('ol.CollectionEvent');
goog.provide('ol.CollectionEventType');
goog.require('goog.array');
-goog.require('goog.asserts');
goog.require('goog.events.Event');
goog.require('ol.Object');
View
4 src/ol/control/attributioncontrol.js
@@ -8,8 +8,12 @@ goog.require('goog.dom.TagName');
goog.require('goog.events');
goog.require('goog.object');
goog.require('goog.style');
+goog.require('ol.Attribution');
+goog.require('ol.MapEvent');
goog.require('ol.MapEventType');
+goog.require('ol.TileRange');
goog.require('ol.control.Control');
+goog.require('ol.source.TileSource');
View
4 src/ol/control/dragboxcontrol.js
@@ -5,6 +5,10 @@ goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.events');
goog.require('goog.style');
+goog.require('ol.Coordinate');
+goog.require('ol.MapBrowserEvent');
+goog.require('ol.MapBrowserEvent.EventType');
+goog.require('ol.Pixel');
goog.require('ol.Size');
goog.require('ol.control.Control');
View
4 src/ol/control/mousepositioncontrol.js
@@ -8,7 +8,9 @@ goog.require('goog.dom');
goog.require('goog.events');
goog.require('goog.events.EventType');
goog.require('goog.style');
-goog.require('ol.Object');
+goog.require('ol.CoordinateFormatType');
+goog.require('ol.MapEvent');
+goog.require('ol.MapEventType');
goog.require('ol.Pixel');
goog.require('ol.Projection');
goog.require('ol.TransformFunction');
View
1  src/ol/control/zoomcontrol.js
@@ -7,7 +7,6 @@ goog.require('goog.dom.TagName');
goog.require('goog.events');
goog.require('goog.events.EventType');
goog.require('ol.BrowserFeature');
-goog.require('ol.Projection');
goog.require('ol.control.Control');
View
2  src/ol/framestate.js
@@ -7,12 +7,12 @@ goog.provide('ol.PreRenderFunction');
goog.require('goog.vec.Mat4');
goog.require('ol.Color');
-goog.require('ol.Coordinate');
goog.require('ol.Extent');
goog.require('ol.Size');
goog.require('ol.TileQueue');
goog.require('ol.TileRange');
goog.require('ol.View2DState');
+goog.require('ol.layer.Layer');
goog.require('ol.layer.LayerState');
View
1  src/ol/imagetile.js
@@ -2,7 +2,6 @@ goog.provide('ol.ImageTile');
goog.require('goog.array');
goog.require('goog.events');
-goog.require('goog.events.EventTarget');
goog.require('goog.events.EventType');
goog.require('ol.Tile');
goog.require('ol.TileCoord');
View
3  src/ol/interaction/draginteraction.js
@@ -1,11 +1,10 @@
-
goog.provide('ol.interaction.Drag');
goog.require('goog.asserts');
-goog.require('goog.events.EventType');
goog.require('goog.functions');
goog.require('ol.Coordinate');
goog.require('ol.MapBrowserEvent');
+goog.require('ol.MapBrowserEvent.EventType');
goog.require('ol.interaction.Interaction');
View
4 src/ol/interaction/dragpaninteraction.js
@@ -4,7 +4,9 @@ goog.provide('ol.interaction.DragPan');
goog.require('goog.asserts');
goog.require('ol.Coordinate');
-goog.require('ol.MapBrowserEvent');
+goog.require('ol.Kinetic');
+goog.require('ol.Pixel');
+goog.require('ol.PreRenderFunction');
goog.require('ol.View2D');
goog.require('ol.ViewHint');
goog.require('ol.interaction.ConditionType');
View
1  src/ol/interaction/dragrotateandzoominteraction.js
@@ -3,7 +3,6 @@
goog.provide('ol.interaction.DragRotateAndZoom');
goog.require('goog.math.Vec2');
-goog.require('ol.MapBrowserEvent');
goog.require('ol.View2D');
goog.require('ol.interaction.ConditionType');
goog.require('ol.interaction.Drag');
View
1  src/ol/interaction/dragrotateinteraction.js
@@ -1,6 +1,5 @@
goog.provide('ol.interaction.DragRotate');
-goog.require('ol.MapBrowserEvent');
goog.require('ol.View2D');
goog.require('ol.interaction.ConditionType');
goog.require('ol.interaction.Drag');
View
3  src/ol/interaction/dragzoominteraction.js
@@ -4,7 +4,8 @@
goog.provide('ol.interaction.DragZoom');
goog.require('ol.Extent');
-goog.require('ol.MapBrowserEvent');
+goog.require('ol.Size');
+goog.require('ol.View2D');
goog.require('ol.control.DragBox');
goog.require('ol.interaction.ConditionType');
goog.require('ol.interaction.Drag');
View
1  src/ol/interaction/keyboardpaninteraction.js
@@ -4,6 +4,7 @@ goog.provide('ol.interaction.KeyboardPan');
goog.require('goog.events.KeyCodes');
goog.require('goog.events.KeyHandler.EventType');
+goog.require('ol.Coordinate');
goog.require('ol.View2D');
goog.require('ol.interaction.Interaction');
View
1  src/ol/interaction/keyboardzoominteraction.js
@@ -2,7 +2,6 @@
goog.provide('ol.interaction.KeyboardZoom');
-goog.require('goog.events.KeyCodes');
goog.require('goog.events.KeyHandler.EventType');
goog.require('ol.View2D');
goog.require('ol.interaction.Interaction');
View
2  src/ol/interaction/mousewheelzoominteraction.js
@@ -4,8 +4,8 @@ goog.provide('ol.interaction.MouseWheelZoom');
goog.require('goog.events.MouseWheelEvent');
goog.require('goog.events.MouseWheelHandler.EventType');
-goog.require('ol.MapBrowserEvent');
goog.require('ol.View2D');
+goog.require('ol.interaction.Interaction');
View
1  src/ol/iview2d.js
@@ -2,7 +2,6 @@ goog.provide('ol.IView2D');
goog.provide('ol.View2DState');
goog.require('ol.Coordinate');
-goog.require('ol.Extent');
goog.require('ol.Projection');
View
4 src/ol/kinetic.js
@@ -1,8 +1,8 @@
goog.provide('ol.Kinetic');
-goog.require('goog.array');
-goog.require('ol.Pixel');
+goog.require('ol.Coordinate');
+goog.require('ol.PreRenderFunction');
goog.require('ol.animation');
View
27 src/ol/map.js
@@ -10,7 +10,6 @@ goog.provide('ol.RendererHints');
goog.require('goog.Uri.QueryData');
goog.require('goog.async.AnimationDelay');
goog.require('goog.debug.Logger');
-goog.require('goog.dispose');
goog.require('goog.dom');
goog.require('goog.dom.ViewportSizeMonitor');
goog.require('goog.events');
@@ -19,29 +18,35 @@ goog.require('goog.events.Event');
goog.require('goog.events.EventType');
goog.require('goog.events.KeyHandler');
goog.require('goog.events.KeyHandler.EventType');
-goog.require('goog.events.MouseWheelEvent');
goog.require('goog.events.MouseWheelHandler');
goog.require('goog.events.MouseWheelHandler.EventType');
-goog.require('goog.object');
goog.require('ol.BrowserFeature');
goog.require('ol.Collection');
+goog.require('ol.CollectionEvent');
+goog.require('ol.CollectionEventType');
goog.require('ol.Color');
goog.require('ol.Coordinate');
goog.require('ol.Extent');
goog.require('ol.FrameState');
+goog.require('ol.IView');
goog.require('ol.Kinetic');
goog.require('ol.MapBrowserEvent');
+goog.require('ol.MapBrowserEvent.EventType');
+goog.require('ol.MapBrowserEventHandler');
+goog.require('ol.MapEvent');
+goog.require('ol.MapEventType');
goog.require('ol.Object');
+goog.require('ol.ObjectEventType');
goog.require('ol.Pixel');
-goog.require('ol.ResolutionConstraint');
-goog.require('ol.RotationConstraint');
+goog.require('ol.PostRenderFunction');
+goog.require('ol.PreRenderFunction');
goog.require('ol.Size');
+goog.require('ol.Tile');
goog.require('ol.TileQueue');
-goog.require('ol.TransformFunction');
goog.require('ol.View');
goog.require('ol.View2D');
-goog.require('ol.View2DState');
goog.require('ol.control.Attribution');
+goog.require('ol.control.Control');
goog.require('ol.control.Zoom');
goog.require('ol.interaction.DblClickZoom');
goog.require('ol.interaction.DragPan');
@@ -52,14 +57,14 @@ goog.require('ol.interaction.KeyboardPan');
goog.require('ol.interaction.KeyboardZoom');
goog.require('ol.interaction.MouseWheelZoom');
goog.require('ol.interaction.condition');
-goog.require('ol.renderer.Layer');
+goog.require('ol.layer.Layer');
goog.require('ol.renderer.Map');
-goog.require('ol.renderer.canvas');
goog.require('ol.renderer.canvas.Map');
-goog.require('ol.renderer.dom');
+goog.require('ol.renderer.canvas.isSupported');
goog.require('ol.renderer.dom.Map');
-goog.require('ol.renderer.webgl');
+goog.require('ol.renderer.dom.isSupported');
goog.require('ol.renderer.webgl.Map');
+goog.require('ol.renderer.webgl.isSupported');
/**
View
1  src/ol/mapbrowserevent.js
@@ -10,6 +10,7 @@ goog.require('goog.events.EventType');
goog.require('goog.style');
goog.require('ol.BrowserFeature');
goog.require('ol.Coordinate');
+goog.require('ol.FrameState');
goog.require('ol.MapEvent');
goog.require('ol.Pixel');
View
1  src/ol/renderer/canvas/canvaslayerrenderer.js
@@ -1,5 +1,6 @@
goog.provide('ol.renderer.canvas.Layer');
+goog.require('ol.layer.Layer');
goog.require('ol.renderer.Layer');
View
1  src/ol/renderer/canvas/canvasrenderer.js
@@ -1,4 +1,5 @@
goog.provide('ol.renderer.canvas');
+goog.provide('ol.renderer.canvas.isSupported');
goog.provide('ol.renderer.canvas.Renderer');
goog.require('goog.asserts');
View
5 src/ol/renderer/canvas/canvastilelayerrenderer.js
@@ -6,10 +6,11 @@ goog.provide('ol.renderer.canvas.TileLayer');
goog.require('goog.array');
goog.require('goog.dom');
-goog.require('goog.style');
goog.require('goog.vec.Mat4');
goog.require('ol.Size');
-goog.require('ol.TileRange');
+goog.require('ol.Tile');
+goog.require('ol.TileCoord');
+goog.require('ol.TileState');
goog.require('ol.layer.TileLayer');
goog.require('ol.renderer.Map');
goog.require('ol.renderer.canvas.Layer');
View
1  src/ol/renderer/dom/domlayerrenderer.js
@@ -1,6 +1,5 @@
goog.provide('ol.renderer.dom.Layer');
-goog.require('ol.Coordinate');
goog.require('ol.layer.Layer');
goog.require('ol.renderer.Layer');
View
4 src/ol/renderer/dom/dommaprenderer.js
@@ -4,11 +4,7 @@ goog.require('goog.array');
goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
-goog.require('goog.events');
-goog.require('goog.events.Event');
goog.require('goog.style');
-goog.require('ol.Coordinate');
-goog.require('ol.FrameState');
goog.require('ol.layer.TileLayer');
goog.require('ol.renderer.Map');
goog.require('ol.renderer.dom.TileLayer');
View
2  src/ol/renderer/dom/domrenderer.js
@@ -1,4 +1,4 @@
-goog.provide('ol.renderer.dom');
+goog.provide('ol.renderer.dom.isSupported');
goog.require('goog.functions');
View
5 src/ol/renderer/dom/domtilelayerrenderer.js
@@ -5,17 +5,16 @@ goog.provide('ol.renderer.dom.TileLayer');
goog.require('goog.asserts');
goog.require('goog.dom');
-goog.require('goog.math.Vec2');
goog.require('goog.style');
goog.require('goog.vec.Mat4');
goog.require('ol.Coordinate');
goog.require('ol.Extent');
-goog.require('ol.Size');
+goog.require('ol.Tile');
goog.require('ol.TileCoord');
-goog.require('ol.TileRange');
goog.require('ol.TileState');
goog.require('ol.ViewHint');
goog.require('ol.dom');
+goog.require('ol.layer.TileLayer');
goog.require('ol.renderer.dom.Layer');
goog.require('ol.tilegrid.TileGrid');
View
1  src/ol/renderer/layerrenderer.js
@@ -8,6 +8,7 @@ goog.require('ol.TileRange');
goog.require('ol.layer.Layer');
goog.require('ol.layer.LayerProperty');
goog.require('ol.layer.LayerState');
+goog.require('ol.source.Source');
goog.require('ol.source.TileSource');
View
7 src/ol/renderer/maprenderer.js
@@ -6,9 +6,12 @@ goog.require('goog.asserts');
goog.require('goog.events');
goog.require('goog.functions');
goog.require('goog.vec.Mat4');
+goog.require('ol.CollectionEvent');
+goog.require('ol.CollectionEventType');
goog.require('ol.FrameState');
-goog.require('ol.View2D');
-goog.require('ol.View2DProperty');
+goog.require('ol.Object');
+goog.require('ol.layer.Layer');
+goog.require('ol.renderer.Layer');
View
5 src/ol/renderer/webgl/webglmaprenderer.js
@@ -5,16 +5,15 @@ goog.provide('ol.renderer.webgl.map.shader');
goog.require('goog.array');
goog.require('goog.debug.Logger');
-goog.require('goog.dispose');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.events');
goog.require('goog.events.Event');
-goog.require('goog.events.EventType');
goog.require('goog.style');
goog.require('goog.webgl');
+goog.require('ol.FrameState');
+goog.require('ol.Size');
goog.require('ol.Tile');
-goog.require('ol.layer.Layer');
goog.require('ol.layer.TileLayer');
goog.require('ol.renderer.Map');
goog.require('ol.renderer.webgl.FragmentShader');
View
2  src/ol/renderer/webgl/webglrenderer.js
@@ -1,4 +1,4 @@
-goog.provide('ol.renderer.webgl');
+goog.provide('ol.renderer.webgl.isSupported');
goog.require('ol.webgl');
View
7 src/ol/renderer/webgl/webgltilelayerrenderer.js
@@ -7,16 +7,17 @@ goog.provide('ol.renderer.webgl.tilelayerrenderer.shader.Fragment');
goog.provide('ol.renderer.webgl.tilelayerrenderer.shader.Vertex');
goog.require('goog.array');
-goog.require('goog.asserts');
-goog.require('goog.events.EventType');
goog.require('goog.object');
goog.require('goog.structs.PriorityQueue');
goog.require('goog.vec.Mat4');
goog.require('goog.vec.Vec4');
goog.require('goog.webgl');
-goog.require('ol.Coordinate');
+goog.require('ol.Extent');
goog.require('ol.FrameState');
goog.require('ol.Size');
+goog.require('ol.Tile');
+goog.require('ol.TileCoord');
+goog.require('ol.TileRange');
goog.require('ol.TileState');
goog.require('ol.layer.TileLayer');
goog.require('ol.renderer.webgl.FragmentShader');
View
8 src/ol/source/bingmapssource.js
@@ -3,10 +3,14 @@ goog.provide('ol.source.BingMaps');
goog.require('goog.Uri');
goog.require('goog.array');
-goog.require('goog.events');
-goog.require('goog.events.EventType');
goog.require('goog.net.Jsonp');
+goog.require('ol.Attribution');
+goog.require('ol.Extent');
+goog.require('ol.Projection');
+goog.require('ol.Size');
+goog.require('ol.TileCoord');
goog.require('ol.TileRange');
+goog.require('ol.TileUrlFunction');
goog.require('ol.source.ImageTileSource');
goog.require('ol.tilegrid.XYZ');
View
1  src/ol/source/debugtilesource.js
@@ -4,6 +4,7 @@ goog.require('ol.Size');
goog.require('ol.Tile');
goog.require('ol.TileCache');
goog.require('ol.TileCoord');
+goog.require('ol.TileState');
goog.require('ol.source.TileSource');
goog.require('ol.tilegrid.TileGrid');
View
1  src/ol/source/imagetilesource.js
@@ -5,6 +5,7 @@ goog.require('ol.Attribution');
goog.require('ol.Extent');
goog.require('ol.ImageTile');
goog.require('ol.Projection');
+goog.require('ol.Tile');
goog.require('ol.TileCache');
goog.require('ol.TileCoord');
goog.require('ol.TileUrlFunction');
View
1  src/ol/source/openstreetmapsource.js
@@ -1,5 +1,6 @@
goog.provide('ol.source.OpenStreetMap');
+goog.require('ol.Attribution');
goog.require('ol.source.XYZ');
View
1  src/ol/source/source.js
@@ -6,7 +6,6 @@ goog.require('goog.functions');
goog.require('ol.Attribution');
goog.require('ol.Extent');
goog.require('ol.Projection');
-goog.require('ol.TileUrlFunction');
/**
View
1  src/ol/source/stamensource.js
@@ -4,6 +4,7 @@ goog.provide('ol.source.Stamen');
goog.provide('ol.source.StamenFlavor');
goog.provide('ol.source.StamenProvider');
+goog.require('ol.Attribution');
goog.require('ol.source.XYZ');
View
4 src/ol/source/tiledwmssource.js
@@ -4,15 +4,13 @@ goog.provide('ol.source.TiledWMS');
goog.require('goog.array');
-goog.require('goog.asserts');
goog.require('goog.object');
goog.require('goog.uri.utils');
-goog.require('ol.Attribution');
+goog.require('ol.Extent');
goog.require('ol.Projection');
goog.require('ol.TileCoord');
goog.require('ol.TileUrlFunction');
goog.require('ol.source.ImageTileSource');
-goog.require('ol.tilegrid.TileGrid');
View
8 src/ol/source/tilejsonsource.js
@@ -1,6 +1,6 @@
// FIXME add some error checking
// FIXME check order of async callbacks
-// FIXME use minzoom when supported by ol.tilegrid.TileGrid
+// FIXME use minzoom when supported
/**
* @see http://mapbox.com/developers/api/
@@ -10,10 +10,12 @@ goog.provide('ol.source.TileJSON');
goog.provide('ol.tilejson');
goog.require('goog.asserts');
-goog.require('goog.events.EventType');
goog.require('goog.net.jsloader');
-goog.require('goog.string');
+goog.require('ol.Attribution');
+goog.require('ol.Extent');
goog.require('ol.Projection');
+goog.require('ol.TileCoord');
+goog.require('ol.TileRange');
goog.require('ol.TileUrlFunction');
goog.require('ol.source.ImageTileSource');
goog.require('ol.tilegrid.XYZ');
View
3  src/ol/source/tilesource.js
@@ -7,8 +7,7 @@ goog.require('ol.Extent');
goog.require('ol.Projection');
goog.require('ol.Tile');
goog.require('ol.TileCoord');
-goog.require('ol.TileUrlFunction');
-goog.require('ol.TileUrlFunctionType');
+goog.require('ol.TileRange');
goog.require('ol.source.Source');
goog.require('ol.tilegrid.TileGrid');
View
3  src/ol/source/xyzsource.js
@@ -5,9 +5,8 @@ goog.provide('ol.source.XYZOptions');
goog.require('goog.math');
goog.require('ol.Attribution');
-goog.require('ol.Coordinate');
+goog.require('ol.Extent');
goog.require('ol.Projection');
-goog.require('ol.Size');
goog.require('ol.TileCoord');
goog.require('ol.TileUrlFunction');
goog.require('ol.TileUrlFunctionType');
View
1  src/ol/tile.js
@@ -1,7 +1,6 @@
goog.provide('ol.Tile');
goog.provide('ol.TileState');
-goog.require('goog.array');
goog.require('goog.events');
goog.require('goog.events.EventTarget');
goog.require('goog.events.EventType');
View
1  src/ol/tilecache.js
@@ -1,6 +1,5 @@
goog.provide('ol.TileCache');
-goog.require('goog.dispose');
goog.require('ol.Tile');
goog.require('ol.TileRange');
goog.require('ol.structs.LinkedMap');
View
1  src/ol/tilegrid/tilegrid.js
@@ -7,6 +7,7 @@ goog.require('goog.asserts');
goog.require('ol.Coordinate');
goog.require('ol.Extent');
goog.require('ol.PixelBounds');
+goog.require('ol.Projection');
goog.require('ol.Size');
goog.require('ol.TileCoord');
goog.require('ol.TileRange');
View
2  src/ol/view.js
@@ -3,8 +3,6 @@ goog.provide('ol.ViewHint');
goog.require('goog.array');
goog.require('ol.IView');
-goog.require('ol.IView2D');
-goog.require('ol.IView3D');
goog.require('ol.Object');
View
2  src/ol/view2d.js
@@ -5,12 +5,14 @@ goog.provide('ol.View2D');
goog.provide('ol.View2DProperty');
goog.require('ol.Constraints');
+goog.require('ol.Coordinate');
goog.require('ol.Extent');
goog.require('ol.IView2D');
goog.require('ol.IView3D');
goog.require('ol.Projection');
goog.require('ol.ResolutionConstraint');
goog.require('ol.RotationConstraint');
+goog.require('ol.Size');
goog.require('ol.View');
goog.require('ol.animation');
View
31 test/ol.html
@@ -37,7 +37,7 @@
// Create the script tag which includes the derived variables from above
var script = '<sc' + 'ript type="text/javascript" '
- + 'src="http://' + plovrHost + '/compile?id=ol-all&mode=RAW">'
+ + 'src="http://' + plovrHost + '/compile?id=test&mode=RAW">'
+ '</scr' + 'ipt>';
// this function will fix the links of the result to also include
@@ -69,35 +69,6 @@
</script>
- <!-- include spec files here... -->
- <script type="text/javascript" src="spec/ol/array.test.js"></script>
- <script type="text/javascript" src="spec/ol/collection.test.js"></script>
- <script type="text/javascript" src="spec/ol/color.test.js"></script>
- <script type="text/javascript" src="spec/ol/extent.test.js"></script>
- <script type="text/javascript" src="spec/ol/map.test.js"></script>
- <script type="text/javascript" src="spec/ol/object.test.js"></script>
- <script type="text/javascript" src="spec/ol/projection.test.js"></script>
- <script type="text/javascript" src="spec/ol/rectangle.test.js"></script>
- <script type="text/javascript" src="spec/ol/resolutionconstraint.test.js"></script>
- <script type="text/javascript" src="spec/ol/view2d.test.js"></script>
- <script type="text/javascript" src="spec/ol/io/geojson.test.js"></script>
- <script type="text/javascript" src="spec/ol/filter/geometryfilter.test.js"></script>
- <script type="text/javascript" src="spec/ol/geom/multipoint.test.js"></script>
- <script type="text/javascript" src="spec/ol/geom/multilinestring.test.js"></script>
- <script type="text/javascript" src="spec/ol/geom/multipolygon.test.js"></script>
- <script type="text/javascript" src="spec/ol/geom/linearring.test.js"></script>
- <script type="text/javascript" src="spec/ol/geom/linestring.test.js"></script>
- <script type="text/javascript" src="spec/ol/geom/point.test.js"></script>
- <script type="text/javascript" src="spec/ol/geom/polygon.test.js"></script>
- <script type="text/javascript" src="spec/ol/layer/layer.test.js"></script>
- <script type="text/javascript" src="spec/ol/source/xyz.test.js"></script>
- <script type="text/javascript" src="spec/ol/tilecoord.test.js"></script>
- <script type="text/javascript" src="spec/ol/tilegrid.test.js"></script>
- <script type="text/javascript" src="spec/ol/tilequeue.test.js"></script>
- <script type="text/javascript" src="spec/ol/tilerange.test.js"></script>
- <script type="text/javascript" src="spec/ol/tileurlfunction.test.js"></script>
- <script type="text/javascript" src="spec/ol/control/control.test.js"></script>
-
<script type="text/javascript">
(function() {
View
2  test/spec/ol/array.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.array');
+
describe('ol.array', function() {
describe('binaryFindNearest', function() {
View
2  test/spec/ol/collection.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.Collection');
+
describe('ol.collection', function() {
var collection;
View
2  test/spec/ol/color.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.Color');
+
describe('ol.Color', function() {
describe('constructor', function() {
View
8 test/spec/ol/control/control.test.js
@@ -1,6 +1,4 @@
-goog.require('goog.dom');
-goog.require('ol.Map');
-goog.require('ol.control.Control');
+goog.provide('ol.test.control.Control');
describe('ol.control.Control', function() {
var map, control;
@@ -25,3 +23,7 @@ describe('ol.control.Control', function() {
});
});
});
+
+goog.require('goog.dom');
+goog.require('ol.Map');
+goog.require('ol.control.Control');
View
2  test/spec/ol/extent.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.Extent');
+
describe('ol.Extent', function() {
describe('contains', function() {
View
2  test/spec/ol/layer/layer.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.layer.Layer');
+
describe('ol.layer.Layer', function() {
describe('constructor (defaults)', function() {
View
21 test/spec/ol/map.test.js
@@ -1,12 +1,5 @@
-goog.require('goog.async.AnimationDelay');
-goog.require('goog.dom');
-goog.require('ol.Collection');
-goog.require('ol.Coordinate');
-goog.require('ol.Map');
-goog.require('ol.RendererHint');
-goog.require('ol.View2D');
-goog.require('ol.layer.TileLayer');
-goog.require('ol.source.XYZ');
+goog.provide('ol.test.Map');
+goog.provide('ol.test.RendererHints');
describe('ol.RendererHints', function() {
@@ -241,3 +234,13 @@ describe('ol.Map', function() {
});
});
+
+goog.require('goog.async.AnimationDelay');
+goog.require('goog.dom');
+goog.require('ol.Collection');
+goog.require('ol.Coordinate');
+goog.require('ol.Map');
+goog.require('ol.RendererHint');
+goog.require('ol.View2D');
+goog.require('ol.layer.TileLayer');
+goog.require('ol.source.XYZ');
View
2  test/spec/ol/object.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.Object');
+
describe('ol.Object', function() {
var o;
View
2  test/spec/ol/projection.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.Projection');
+
describe('ol.Projection', function() {
describe('projection equivalence', function() {
View
2  test/spec/ol/rectangle.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.Rectangle');
+
describe('ol.Rectangle', function() {
describe('getCenter', function() {
View
2  test/spec/ol/resolutionconstraint.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.ResolutionConstraint');
+
describe('ol.ResolutionConstraint', function() {
describe('SnapToResolution', function() {
View
8 test/spec/ol/source/xyz.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.source.XYZ');
+
describe('ol.source.XYZ', function() {
describe('getTileCoordUrl', function() {
@@ -47,7 +49,8 @@ describe('ol.source.XYZ', function() {
describe('wrap x', function() {
it('returns the expected URL', function() {
- tileUrl = xyzTileSource.getTileCoordUrl(new ol.TileCoord(6, -31, -23));
+ var tileUrl = xyzTileSource.getTileCoordUrl(
+ new ol.TileCoord(6, -31, -23));
expect(tileUrl).toEqual('6/33/22');
tileUrl = xyzTileSource.getTileCoordUrl(new ol.TileCoord(6, 33, -23));
@@ -60,7 +63,8 @@ describe('ol.source.XYZ', function() {
describe('crop y', function() {
it('returns the expected URL', function() {
- tileUrl = xyzTileSource.getTileCoordUrl(new ol.TileCoord(6, 33, -87));
+ var tileUrl = xyzTileSource.getTileCoordUrl(
+ new ol.TileCoord(6, 33, -87));
expect(tileUrl).toBeUndefined();
tileUrl = xyzTileSource.getTileCoordUrl(new ol.TileCoord(6, 33, -23));
View
2  test/spec/ol/tilecoord.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.TileCoord');
+
describe('ol.TileCoord', function() {
describe('create', function() {
View
2  test/spec/ol/tilegrid.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.TileGrid');
+
describe('ol.tilegrid.TileGrid', function() {
var extent;
var resolutions;
View
2  test/spec/ol/tilequeue.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.TileQueue');
+
describe('ol.TileQueue', function() {
// is the tile queue's array a heap?
View
2  test/spec/ol/tilerange.test.js
@@ -1,3 +1,5 @@
+goog.provide('ol.test.TileRange');
+
describe('ol.TileRange', function() {
describe('contains', function() {
View
6 test/spec/ol/tileurlfunction.test.js
@@ -1,5 +1,4 @@
-goog.require('ol.TileUrlFunction');
-goog.require('ol.tilegrid.XYZ');
+goog.provide('ol.test.TileUrlFunction');
describe('ol.TileUrlFunction', function() {
@@ -51,7 +50,7 @@ describe('ol.TileUrlFunction', function() {
describe('createFromTileUrlFunctions', function() {
it('creates expected URL', function() {
- tileUrl = ol.TileUrlFunction.createFromTileUrlFunctions([
+ var tileUrl = ol.TileUrlFunction.createFromTileUrlFunctions([
ol.TileUrlFunction.createFromTemplate('a'),
ol.TileUrlFunction.createFromTemplate('b')
]);
@@ -83,3 +82,4 @@ describe('ol.TileUrlFunction', function() {
goog.require('ol.TileCoord');
goog.require('ol.TileUrlFunction');
+goog.require('ol.tilegrid.XYZ');
View
4 test/spec/ol/view2d.test.js
@@ -1,4 +1,4 @@
-goog.require('ol.View2D');
+goog.provide('ol.test.View2D');
describe('ol.View2D', function() {
describe('create constraints', function() {
@@ -51,3 +51,5 @@ describe('ol.View2D', function() {
});
});
});
+
+goog.require('ol.View2D');
View
16 test/test.json
@@ -0,0 +1,16 @@
+{
+
+ "id": "test",
+
+ "inherits": "../base.json",
+
+ "inputs": [
+ "test/requireall.js"
+ ],
+
+ "paths": [
+ "src",
+ "test"
+ ]
+
+}
Please sign in to comment.
Something went wrong with that request. Please try again.