Commit Graph

69 Commits

Author SHA1 Message Date
Tom Payne
9fbabc3696 Refactor attribution control 2013-01-16 16:34:31 +01:00
Tom Payne
c679bccbb9 Join short lines 2013-01-14 20:53:00 +01:00
Tom Payne
183aac90fa Remove unused requires 2013-01-14 20:52:47 +01:00
Tom Payne
8966e17b89 Structure DOM renderer code to be more similar to WebGL renderer code 2013-01-14 16:33:15 +01:00
Tom Payne
8ced15ce2e Move closure out of loop, and use loop rather than forEachTileCoord 2013-01-14 16:21:58 +01:00
Tom Payne
0916f14536 Use a loop rather than tileRange.forEachTileCoord 2013-01-14 16:21:58 +01:00
Tom Payne
eff96ca16c DOM renderer should re-render when layers are added or removed 2013-01-14 12:46:40 +01:00
Tom Payne
be04053ef1 Move common event handlers into base class 2013-01-14 12:46:39 +01:00
Tom Payne
9764e76975 Move pixel/coordinate matrices into frame state, remove canRotate 2013-01-14 12:46:39 +01:00
Tom Payne
3febb24529 Don't remove tiles when animating 2013-01-14 12:35:54 +01:00
Tom Payne
2ea6f0903c Don't remove tiles while panning 2013-01-14 12:35:54 +01:00
Tom Payne
2a08e7add2 Merge pull request #112 from twpayne/dom-renderer-clean-ups
DOM renderer clean ups
2013-01-14 03:33:23 -08:00
Tom Payne
8b39e8f7f0 Relax type slightly 2013-01-12 23:13:34 +01:00
Tom Payne
de7699d644 Hide layers pane when map is undefined 2013-01-12 19:08:27 +01:00
Tom Payne
a0180f2131 Remove stale FIXME 2013-01-12 19:06:00 +01:00
Tom Payne
513787147c Merge pull request #106 from twpayne/re-enable-jsdoc
Re-enable jsdoc
2013-01-12 03:28:19 -08:00
Tom Payne
c5a0205cf8 Merge pull request #103 from twpayne/tile-queue
Tile queue
2013-01-12 03:26:43 -08:00
Tom Payne
82fc5c6c9d Clean up DOM renderer code for untested minor performance advantages 2013-01-12 01:12:27 +01:00
Tom Payne
48ee9e75a4 Add empty descriptions to work around jsdoc 2013-01-12 00:51:36 +01:00
Tom Payne
52df441cf8 Add tile queue 2013-01-11 16:18:07 +01:00
Tom Payne
f3cace499c Implement frame state and animation architecture 2013-01-11 15:48:24 +01:00
Tom Payne
9194a4b4eb Round transformation values to six decimal places 2013-01-10 16:43:42 +01:00
Tom Payne
aba686d22d Refactor DOM renderer to use only CSS transforms 2013-01-10 16:43:42 +01:00
Éric Lemoine
927cffb2b7 Add view abstraction 2013-01-09 14:03:16 +01:00
Tom Payne
ddee13d6eb Fix non-view-related typecasts in ol.renderer.dom.TileLayer 2013-01-07 13:19:00 +01:00
Tom Payne
cadeb209cd Fix typecast in ol.renderer.dom.Layer 2013-01-07 13:18:59 +01:00
Tom Payne
7a36793776 Port DOM renderer to request render frame architecture 2013-01-03 14:51:15 +01:00
Éric Lemoine
51636ea0d1 Only appending tiles to the dom after load
A port of f46cdb4 and 4242ef40 from animation-frame branch.
2013-01-03 12:23:50 +01:00
Tom Payne
756792b8db Pass time to render functions and rename them to renderFrame_ 2013-01-03 12:23:50 +01:00
Tom Payne
12099bab56 Implement @elemoine's requestRenderFrame architecture 2013-01-03 12:23:49 +01:00
Éric Lemoine
7b88f44a41 Keep track of tiles we're already listening on 2012-11-11 21:31:12 +01:00
Éric Lemoine
826505c6d4 Register a CHANGE listener even if tile is loading
This fixes an issue easily reproducible in the side-by-side example where the DOM renderer is not notified when tiles loaded by the WebGL renderer have been received.
2012-11-08 21:20:26 +01:00
Éric Lemoine
90e379782c Only appending tiles to the dom after load
A port of f46cdb4 to the current master. The tilelayer renderer can be simplified a bit by waiting to append tiles to the dom until they have loaded. Refs #84 and #33.
2012-11-08 20:03:07 +01:00
Tom Payne
dfd495153d Make ol.renderer.Map behave like a null renderer, fixes #82
With this patch, creating a new ol.renderer.Map will return a map
renderer that does nothing.  Previously, it could cause assertion
failures.
2012-11-02 17:10:45 +01:00
Tom Payne
e5d39724c9 Give each source file a unique name 2012-10-26 11:25:26 +02: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
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
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
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
c120c03fb1 Properly maintain offset and origin while rotating
This brings equivalent behavior when rotating in both renderers.  Previously, offsets were maintained with style top/left.  Now a single transform handles the translation and rotation.  The scale3d function removes the separation between tiles.  The next step for the DOM renderer is to scale in this same transform.
2012-09-29 17:55:28 -06:00
Tom Payne
71e42b2448 Refactor build system
This rather large commit refactors the build system to solve a number of
problems:
- Object literal types are now declared in just one place
- There are no more circular dependencies
- There is no need for concealed subclasses in build-standalone mode

When building in standalone mode, you need to include the source in
build/src/external.  This declares object literal types as externs so
that their properties are not renamed.

When building with the application, you need to include the source in
build/src/internal.  This declares object literal types as typedefs so
that their properties can be renamed and removed.

Note also that ol.MapOptions has been merged into ol.Map, with some
renaming.
2012-09-29 11:51:53 +02:00
Tim Schaub
67bc677ecb Stick with radians 2012-09-29 01:37:54 +02:00
Tim Schaub
50bf2f015c Getting rid of lines between rotated tiles
Applying the scale3d trick just to get rid of small pixel gap between rotated tiles.  This will be reworked soon with additional use of transforms.
2012-09-29 01:33:50 +02:00
ahocevar
3d62b67172 Introducing ol.overlay.Overlay and an overlayContainer
ol.overlay.Overlay can be used to bind DOM elements to a
coordinate on the map. It has positioning options to support
e.g. popups or image markers that have an anchor at the bottom
and an unknown size.

The overlayContainer stops propagation on mousedown and
touchstart events, so clicks and gestures on overlays don't
trigger any MapBrowserEvent. To make this work reliably, we now
only fire dblclick in mapbrowserevent.js when there was a
previous mousedown or touchstart. The default container for
controls is now the overlayContainer.
2012-09-28 13:01:56 +02:00
Tim Schaub
6ed27779cc Rotation support for the dom renderer
Thanks @fredj for the inspiration.  This gives us initial rotation support.  It exposes some issues in the interactions that I'll address separately.  Closes #22.
2012-09-28 10:53:36 +02:00
Tim Schaub
981a40a994 Remove tiles that are still loading at alt z
When zooming to a new zoom level, we can immediately remove tiles from the previous level.  This (strongly) suggests not adding images to the container until they have actually loaded.
2012-09-27 17:46:23 +02:00
Tim Schaub
b8a69f0777 Adjusting layers pane only when necessary
We only want to adjust things that have to do with rendering (like the position of the layers panel) when actually rendering.  The handleXChange methods may be called more times than we can actually render, so we never want to do anything that touches the DOM there.  Instead, we have to keep track of the state at previous render and adjust the layers panel (or other) based on changes only when rendering.
2012-09-27 16:09:04 +02:00