Commit Graph

7372 Commits

Author SHA1 Message Date
Tim Schaub
840ffb6d13 Test render methods 2012-10-21 23:33:48 -04:00
Tim Schaub
a4c14c523a Merge branch 'master' of github.com:openlayers/ol3 into animation-frame
Conflicts:
	src/ol/renderer/dom/tilelayer.js
2012-10-18 00:29:05 -04:00
Tim Schaub
eef4eb0eea Merge pull request #61 from twpayne/z-sort-in-dom-renderer
Z sort in dom renderer
2012-10-17 21:24:40 -07:00
Tim Schaub
fc6f12d5cd Accept a render callback for state generation
The map's render method can accept a callback that serves as a state generator.  This callback will be called before rendering.  Any changes to the map state can be made before rendering takes place (multiple changes will not result in multiple renders).  The return from this callback indicates whether the generator is exhausted.
2012-10-18 00:09:48 -04:00
Tom Payne
e21c182641 Use Chrome Frame if available 2012-10-17 18:20:25 +02:00
Tom Payne
68a71c4a53 Add Tom Payne to authors.txt 2012-10-17 17:43:27 +02:00
Tom Payne
a82e523f6b Try multiple context ids to get a WebGL context 2012-10-17 17:36:07 +02:00
Tom Payne
5011123228 Use ol.webgl.getContext is WebGL support test 2012-10-17 17:27:11 +02:00
Tom Payne
8cb28a7217 Move WebGL support test into ol.webgl 2012-10-17 17:25:37 +02:00
Tom Payne
1d40b64db1 Move WebGL context creation into ol.webgl 2012-10-17 17:23:30 +02:00
Éric Lemoine
c508ed39ef Merge pull request #63 from elemoine/hosted-examples
A step toward hosted examples on gh-pages
2012-10-16 13:59:31 -07:00
Éric Lemoine
84e3cf4f0d Merge pull request #62 from elemoine/bingmaps-exports
Add BingMaps exports
2012-10-16 13:57:44 -07:00
Éric Lemoine
1ac188c906 Add a hostexamples target to Makefile
This target copies the ol built files, examples, and loader script to the build/gh-pages directory, making it possible to host our examples on gh-pages.
2012-10-16 21:56:45 +02:00
Éric Lemoine
4b6ef3c046 Better comments in loader.js 2012-10-16 21:56:35 +02:00
Éric Lemoine
190e21f796 The loader adds link tag for ol.css 2012-10-16 21:55:12 +02:00
Éric Lemoine
f4b20175cc Add a specific loader for hosted examples
This loader is responsible for adding ol.js, ol.css and the example-specific js script to the document. This is the loader used in examples when hosted.
2012-10-16 21:51:48 +02:00
Éric Lemoine
1f7ecd2529 Make linter happy 2012-10-16 21:50:20 +02:00
Éric Lemoine
5c6b5cb495 Add BingMaps exports 2012-10-16 21:45:52 +02:00
Tom Payne
a38468c854 Merge pull request #60 from twpayne/hosted-examples
Hosted examples
2012-10-16 02:12:16 -07:00
Tom Payne
3e6d374859 Ensure z as object keys are sorted as numbers 2012-10-16 11:04:56 +02:00
Tom Payne
ed197f3cfe Revert "Two lessons learned"
This reverts commit f8462460bf.
2012-10-16 10:59:53 +02:00
Tom Payne
f7adc1ae75 Use identical code in compiled and standalone examples 2012-10-15 19:12:55 +02:00
Tom Payne
f9302ab030 Export goog.require as goog.nullFunction 2012-10-15 19:12:06 +02:00
Tom Payne
b45c2ca4bc Add optional argument to @exportSymbol 2012-10-15 19:11:51 +02:00
Tom Payne
98340c55ce Don't use goog.* functions in examples 2012-10-15 19:11:02 +02:00
Tom Payne
0392d898c3 Merge pull request #56 from twpayne/interaction-conditions
Abstract out key conditions for interactions, fixes #51, see also #54
2012-10-12 11:04:12 -07:00
Éric Lemoine
e440c03efb Merge pull request #58 from elemoine/dispose
The map should be disposable
2012-10-12 08:41:51 -07:00
Éric Lemoine
f49f370857 Make linter happy 2012-10-11 18:09:18 +02:00
Éric Lemoine
9c48dff286 Add tests for ol.Map.prototype.disposeInternal 2012-10-11 17:53:35 +02:00
Éric Lemoine
2a76a23b6f Add tests for ol.control.Control 2012-10-11 17:46:47 +02:00
Éric Lemoine
0b411ad69c Have disposeInternal call parent 2012-10-11 17:46:22 +02:00
Tim Schaub
f3b7c2384d Leaving animation entirely up to the renderers
With this change, the map knows nothing of animation.  Different renderers
may behave differently when their render method is called.  A PDF renderer
(thought experiment at this point) might immediately render to a file.  The
dom based renderers schedule a repaint for the next animation frame or in a
timeout depending on capabilities - in either case, setting multiple map
properties will *not* result in multiple reflow/repaints.
2012-10-10 22:05:55 -06:00
tschaub
e83292fb0d Merge branch 'master' of github.com:openlayers/ol3 into animation-frame
Conflicts:
	src/ol/renderer/dom/tilelayer.js
2012-10-10 16:23:25 -06:00
Éric Lemoine
fbc810264b goog.array.forEach does not accept null values 2012-10-10 20:25:53 +02:00
Éric Lemoine
655e04368b disposeInternal implementation for ol.control.Control 2012-10-10 20:24:32 +02:00
Éric Lemoine
dc491f9114 disposeInternal implementation for ol.Map 2012-10-10 20:24:18 +02:00
Tom Payne
936584ceaa Use goog.array.map for browser compatability, thanks @AugustusKling 2012-10-10 13:49:01 +02:00
Tom Payne
ac8dd5db98 Fix sort problem identified by @tschaub in f8462460bf 2012-10-10 10:27:42 +02:00
Tim Schaub
f8462460bf Two lessons learned
Telling the compiler that object keys are numeric causes more harm
than good (see === comparison that could never be met though the
compiler didn't catch it).

Never use goog functions without reading the source first.  The
goog.array.sort method does nothing special sorting numeric strings
(so the zs array might be ['1', '10', '2'] here).
2012-10-09 23:31:38 -06:00
Tim Schaub
ce1b99cb56 Remove alt-z tiles when all tiles load at target z
The changes in a14a15159f made it so tiles
at alternate resolutions were not pruned when target tiles finished loading.
2012-10-09 22:56:37 -06:00
Tom Payne
8df0cfb9d9 Abstract out key conditions for interactions, fixes #51, see also #54 2012-10-08 12:55:20 +02:00
Tim Schaub
4242ef4096 No longer necessary to track rendered z 2012-10-08 00:52:04 -06:00
Tim Schaub
73896df07c Merge branch 'master' of github.com:openlayers/ol3 into animation-frame
Conflicts:
	src/ol/renderer/dom/tilelayer.js
2012-10-08 00:50:12 -06:00
Tim Schaub
a14a15159f Simpler and more thorough tile pruning
The render method always generates a map of all tiles that should be drawn
(called tilesToDrawByZ).  This includes tiles at alternate resolutions, tiles
still loading, and tiles previously rendered.  At the end of the render
sequence we can simply remove all previously rendered tiles that aren't in
tilesToDrawByZ.  This provides an alternate solution to the problem described
in #53 and more.
2012-10-08 00:41:21 -06:00
Tim Schaub
7b99004a4e Merge branch 'master' of github.com:openlayers/ol3 into animation-frame 2012-10-07 23:52:00 -06:00
Tim Schaub
2c2d40a53c Remove tiles outside rendered extent
To avoid having misplaced at alternate resolutions while zooming, all tiles
outside the rendered extent need to be removed from the dom (closes #53).
2012-10-07 23:47:47 -06:00
Tim Schaub
d6173a5aac Removing unused code 2012-10-07 22:57:09 -06:00
Tim Schaub
f46cdb4ce9 Only appending tiles to the dom after load
The tilelayer renderer can be simplified a bit by waiting to append tiles to the dom until they have loaded.  By calling `map.render()` on tile load, tiles will be appended to the dom in the next available rendering frame (see #33).
2012-10-07 20:44:48 -06:00
Tim Schaub
c38d8bcf23 Merge branch 'master' of github.com:openlayers/ol3 into animation-frame 2012-10-06 00:03:38 -06:00
Tim Schaub
78e6a635f9 Allow for immediate rendering
There is not currently a need for immediate rendering (so this change is not strictly necessary and could be reverted).  If there is a need for immediate rendering, an alternate method can be provided, or an optional argument could be allowed.
2012-10-05 23:47:35 -06:00