Commit Graph

75 Commits

Author SHA1 Message Date
Tim Schaub 13a981c94b Fewer blank lines 2016-01-11 22:03:23 -08:00
Tim Schaub 3cf8618fc7 Prefer single line assignment to 80 character limit 2016-01-11 18:56:08 -08:00
Frederic Junod 1092f6b2a2 Remove use of goog.dom.createElement 2015-11-23 09:22:39 +01:00
Marc Jansen 9386415633 Remove usage of goog.dom.TagName enum 2015-10-12 20:45:49 +02:00
Marc Jansen 138adf0509 Remove goog.isNull in renderer classes 2015-10-01 09:17:14 +02:00
Frederic Junod e877a21b8e Remove legacy IE support 2015-09-28 15:36:49 +02:00
Guillaume Beraudo 3811228ac7 Add Z-index to layers
This commit allows setting a z-index property on the layers and uses
it in the canvas, WEBGL and DOM map renderers for ordering the layers
before rendering.

Default z-index is 0 for managed layers and 1000 for unmanaged ones.
It allows always on bottom, always on top and more complex layer layouts.
2015-09-03 11:31:57 +02:00
Andreas Hocevar 53d5d8c1d9 Get rid of ol.FeatureOverlay
This also introduces a wrapX option to the Draw, Modify and Select
interaction.
2015-06-09 15:44:31 +02:00
Frederic Junod 8fd2fae0cb Only draw the layer if visible and inside the resolution range 2015-04-20 12:15:34 +02:00
Marc Jansen fb9ba22c30 Add message to assertions. 2015-03-30 22:53:03 +02:00
Tim Schaub 33c197cf16 Layer renderers should not require a map renderer 2015-02-08 07:25:10 -07:00
Andreas Hocevar bbf074b70a Add pixelRatio support for DOM vector renderer
Adds the scaling and transforms to support pixelRatio values other than
1.
2015-01-12 22:14:52 +01:00
Éric Lemoine ddc51ee267 Unconditionally draw Replay's 2014-12-18 13:04:29 +01:00
Tim Schaub d712b2ba54 Allow source to be set after layer construction 2014-10-25 15:34:47 -06:00
Frédéric Junod a6c3607897 Merge pull request #2855 from fredj/blur_preventDefault
Move touchstart preventDefault to ol.renderer.dom.Map
2014-10-23 17:38:44 +02:00
Frederic Junod c83caa9686 Add ol.renderer.dom.Map#disposeInternal 2014-10-23 08:53:55 +02:00
Frederic Junod f440de2446 Move touchstart preventDefault to ol.renderer.dom.Map
`preventDefault` is called to prevent the img context menu on mobile devices.
2014-10-23 08:48:22 +02:00
Andreas Hocevar dd337f3526 Add a canvas for FeatureOverlay and pre-/postcompose rendering 2014-10-10 16:17:19 +02:00
Andreas Hocevar 4702aa496a Add DOM vector layer renderer 2014-10-09 19:10:22 +02:00
Hadrien Tulipe 7aab28afcc Provide ol.RendererType structure through ol.renderer.Map
It was previously in ol.Map, but it could not be provided because
of circular dependencies.
2014-05-27 22:47:02 +02:00
Hadrien Tulipe 1d6f9ca80b Expose the map renderer type to the public API
In the case  where the map decides itself which renderer to use. It can
be convenient for the developer to have knowledge of the choice made.
2014-05-27 22:47:02 +02:00
Tim Schaub cec41c4b0a Add missing requires
Without explicit requires, it is possible that a build would exclude ol.js.
2014-04-30 08:37:52 -06:00
Tim Schaub aa3a20e911 Provide layer states array in frame state 2014-04-04 07:36:42 -06:00
Tom Payne e0765240a2 Merge branch 'ie-compat' of git://github.com/Intermedix/ol3 into Intermedix-ie-compat 2014-02-11 16:54:39 +01:00
Éric Lemoine f9e04ad7d5 Use ol.renderer.Map#scheduleExpireIconCache 2014-02-06 12:59:39 +01:00
Austin Hyde 27f45d73ba Remove a now-unused define 2014-02-05 10:32:14 -05:00
Austin Hyde ff4f4be8aa Fix typo, simplify a legacy IE check 2014-02-05 10:32:14 -05:00
Austin Hyde 9ffed5bf5f Add a compile-time flag to enable legacy IE support 2014-02-05 10:32:14 -05:00
Austin Hyde dfe3927a12 Add assertion to verify layerRenderer is an instanceof ol.renderer.dom.Layer 2014-02-05 10:31:16 -05:00
Austin Hyde b4d2ab5c13 Fix issue with DOM layers in wrong order
When removing/inserting layers back-to-back, the layer elements can
get out of order because createLayerRenderer always appends to the
layer pane. This makes it always reattach the layer node at the
correct index, ensuring correct layer ordering.
2014-02-05 10:31:16 -05:00
Austin Hyde d3b2b1cd9e Prevent the default image dragging behavior in IE < 9 2014-02-05 10:31:15 -05:00
Tom Payne 7e020e4d26 Add ol.ENABLE_TILE to control inclusion of tile layer renderers 2014-01-30 11:20:59 +01:00
Tom Payne 8b128ece81 Add ol.ENABLE_IMAGE to control inclusion of image layer renderers 2014-01-30 11:20:59 +01:00
Tom Payne 2f50b9dc84 Sort layer types alphabetically 2014-01-30 11:20:59 +01:00
Tom Payne b59eec7a83 Merge remote-tracking branch 'openlayers/master' into vector-api 2013-12-13 20:22:06 +01:00
Tom Payne fd733eca82 Use assertInstanceof instead of typecast 2013-12-13 18:59:25 +01:00
Tom Payne 2b2e7bf786 Rename ol.renderer.Layer#renderFrame to prepareFrame 2013-11-20 11:31:20 +01:00
Tom Payne 68bf12b5e1 Improve type checking in ol.renderer.dom.Map 2013-11-20 11:13:46 +01:00
Tom Payne 167b309242 Replace source ready flag with loading/ready/error enum 2013-09-30 13:30:54 +02:00
Tom Payne 8f8f94e697 Rename ol.layer.TileLayer to ol.layer.Tile 2013-09-09 15:14:45 +02:00
Tom Payne 7d5a84ce8a Rename ol.layer.ImageLayer to ol.layer.Image 2013-09-09 14:36:40 +02:00
Tom Payne 46d16ba0ca Use setElementShown instead of showElement 2013-07-22 17:42:47 +02:00
Tom Payne ef915e1cd0 Remove unused CSS classes
The classes ol-layers, ol-layer-image, and ol-layer-tile are not used.
2013-04-28 16:40:17 +02:00
Tom Payne 72a83b99b7 Cache array length in DOM renderer 2013-04-20 11:34:48 +02:00
Tom Payne 388e530420 Use for loop instead of forEach in DOM map renderer 2013-04-19 20:22:20 +02:00
Tom Payne 8831d25929 Remove DOM layer in render, not in dispose 2013-04-18 19:25:49 +02:00
Tom Payne f7c0c26bed Update layer visibility in DOM renderer 2013-04-18 19:21:06 +02:00
Tom Payne 2f5797bc16 Always create layer renderer, even when layer is invisible or not ready
This is necessary because it is the layer renderer that is responsible
for triggering a render when a layer loads or becomes visible.
2013-04-18 12:52:45 +02:00
Tom Payne 07fe17924b Remove layer renderers in post render function 2013-04-16 18:16:08 +02:00
Tom Payne 4e69b2bb8b Create and remove layer renderers in renderFrame
Previously, the map renderer would listen for layers being added and
removed from the layers collection, and would create and remove layer
renderers in response to these events.

With this change, layer renderers are only created or removed when
renderFrame is called, which leads to somewhat simpler code.

We still need to listen to changes to the layers collection, but now
these only trigger a new render.

This new approach also has an advantage when layers change order.
Swapping the order of two layers involves removing one and re-inserting
it elsewhere.  With the old approach, this would cause the deletion and
re-creation of the layer renderer.  With this new approach, the layer
renderer is preserved.
2013-04-12 17:50:38 +02:00