Commit Graph

65 Commits

Author SHA1 Message Date
Tom Payne
022a7a03e0 Use oli.FrameState instead of ol.FrameState 2014-03-10 14:48:23 +01:00
Éric Lemoine
b43dd6db44 Add ol.renderer.Map#scheduleExpireIconCache 2014-02-06 12:59:39 +01:00
Éric Lemoine
e83ec2976f Change forEachFeatureAtPixel arguments names 2014-01-17 11:38:06 +01:00
Éric Lemoine
f7be1c155e Hit detection refactoring
Get the frame state from the map instead of storing values in the layer renderers.
2014-01-14 12:26:49 +01:00
Éric Lemoine
88956c9f5c Merge pull request #1372 from elemoine/vector-api-layer-group
[vector-api] Fix forEachFeatureAtPixel bug
2013-12-15 02:09:44 -08:00
Tom Payne
b59eec7a83 Merge remote-tracking branch 'openlayers/master' into vector-api 2013-12-13 20:22:06 +01:00
Tom Payne
a11c64934c Make ol.renderer.Map a @struct 2013-12-13 18:59:26 +01:00
Éric Lemoine
f79ab25617 Make forEachFeatureAtPixel work with layer groups 2013-12-13 11:58:23 +01:00
Tom Payne
9d57b53c0f Add optional layerFunction to ol.Map#forEachFeatureAtPixel 2013-12-04 00:05:45 +01:00
Tom Payne
e9267e401c Pass layer to forEachFeatureAtPixel callback 2013-12-04 00:05:45 +01:00
Tom Payne
d7591594ca Allow forEachFeatureAtPixel callback to break out of loop 2013-12-04 00:05:44 +01:00
Éric Lemoine
6f423726a9 Add ol.renderer.Map#forEachFeatureAtPixel 2013-12-02 15:06:19 +01:00
Tom Payne
20bd020c13 Use ol.vec.Mat4.makeTransform2D in ol.renderer.Map 2013-12-02 09:57:01 +01:00
ahocevar
b8a9aeb14e Avoid source check in map renderer
By returning true or false from the layer renderer's
getFeatureInfoForPixel method, we know whether the source
supports GetFeatureInfo or not.
2013-11-20 16:05:00 +01:00
ahocevar
0238fa54de The source determines who can do GetFeatureInfo
Now that the ol.renderer.Layer base class has a
getFeatureInfoForPixel method, we have to check whether the
source supports GetFeatureInfo, not the layer renderer.
2013-11-20 13:05:06 +01:00
Frederic Junod
f4c5168cdf Remove renderer.Map#getCanvas function 2013-11-20 11:45:24 +01:00
Tom Payne
bd82e1aa1a Remove vector code from files 2013-11-20 11:41:04 +01:00
Tim Schaub
22da054774 Determine the callback count while iterating through all layers
Previously, if a layer didn't have a `getFeature*ForPixel` type method, the loop count would be decremented.  This means that all layers would not be considered.  Instead, the callback count should be incremented before requests are made and decremented in the callback.
2013-11-13 07:36:54 -07:00
Frederic Junod
ca5960666d Be more strict with {Element} types 2013-11-12 13:53:37 +01:00
ahocevar
5307e5ea3f Until we know what we want to return, return undefined 2013-07-31 11:58:45 +02:00
Tom Payne
1208dab3e9 Fix various type errors related to features 2013-07-22 17:42:47 +02:00
ahocevar
77d22c4038 getFeatures method and featureInfo templates
To avoid surprises for application developers, this change
creates a new getFeatures method. So it is clear now beforehand
whether features or feature info markup is returned. The result
is now also grouped by layer, so application developers always
have a link between a layer and the feature info it returns.

To make getFeatureInfo return markup for vector layers, this
change also adds a featureInfoFunction property to the vector
layer, which gives developers full control over how features are
rendered to feature info markup.
2013-06-07 15:34:13 +02:00
Frederic Junod
a1a7e21f92 Redefine ol.Size to be Array.<number> 2013-06-01 10:22:06 +02:00
Tom Payne
f64e35e8bb Remove unused variables in renderers 2013-05-28 16:01:33 +02:00
ahocevar
7b256c3ec6 Asynchronous API for map#getFeatureInfo
This change allows us to use feature info services on the
server. It will also be useful for the GetFeature control to
get results from a WFS.
2013-05-09 22:26:55 +02:00
ahocevar
58c8b07ab5 Get hit candidates from RTree, then refine result
Now we get exact hits also for lines and polygons.
2013-04-30 13:34:12 +02:00
Tom Payne
945d2f6f5d Merge pull request #631 from twpayne/dont-use-foreach-in-loops
Don't use forEach in loops
2013-04-20 03:02:13 -07:00
Tom Payne
fe5c8a97d4 Add ol.renderer.Map#getLayerRendererByKey 2013-04-19 20:22:01 +02:00
Tom Payne
85a95a0036 Call render and requestRenderFrame directly instead of using changed events 2013-04-18 18:58:59 +02:00
Tom Payne
a07e70ea32 Handle obscure edge case where deferred post render function receives a null frame state 2013-04-16 23:40:48 +02:00
Tom Payne
bc10446b0e Track changes to layers in the map 2013-04-16 18:31:59 +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
Tom Payne
d855a35446 Make renderer layer management private 2013-04-12 00:33:37 +02:00
Tom Payne
f0106f391a Make ol.renderer.Map.map property private 2013-04-12 00:33:37 +02:00
Tom Payne
4be8c991f7 Add missing Closure Library requires 2013-04-06 14:28:12 +02:00
Tom Payne
02196c94b5 Redefine ol.Coordinate to be Array.<number> 2013-04-05 12:30:37 +02:00
Tom Payne
427c376fc6 Always render map when layers are added or removed 2013-03-12 12:57:22 +01:00
Éric Lemoine
26cf882d68 Make createLayerRenderer always return a renderer 2013-03-03 19:46:09 +01:00
Tom Payne
e6eb401e36 Add missing goog.requires 2013-01-30 23:47:13 +01:00
Tom Payne
b6f856f962 Remove unused goog.requires 2013-01-30 22:48:03 +01:00
Tom Payne
5558d6108c Promote handleLayerRendererChange from ol.renderer.webgl.Map to ol.renderer.Map 2013-01-28 19:56:56 +01:00
Éric Lemoine
98b264e8ce Add comment 2013-01-24 22:31:57 +01:00
Éric Lemoine
80b38e608b No more need for listener keys array 2013-01-24 22:31:53 +01:00
Éric Lemoine
4a64837ba1 Make map handle background color changes 2013-01-24 22:31:08 +01:00
Éric Lemoine
15898b559b Make map handle size changes 2013-01-24 22:31:08 +01:00
Éric Lemoine
71a462cd54 Make map handle view changes
With the frameState stuff the map renderer need not listen to view changes. The map renderer receives orders from the map. These orders are renderFrame_ calls with frameState objects representing the current state.
2013-01-24 22:31:06 +01:00
Tom Payne
4ab09d6df2 Merge pull request #140 from twpayne/array-clean-ups
Array clean ups
2013-01-22 06:00:04 -08:00
Frédéric Junod
9969a64d81 Merge pull request #143 from fredj/get-renderer-canvas
Get renderer canvas
2013-01-21 07:09:18 -08:00
Tom Payne
c0ef84fd5d Remove stale dependencies 2013-01-21 16:07:06 +01:00