Commit Graph

49 Commits

Author SHA1 Message Date
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
Frederic Junod
2f2ea373ca Add ol.renderer.Map.getCanvas function. Only valid with the canvas and webgl renderers 2013-01-21 15:18:18 +01:00
Tom Payne
386bb636bb Add missing dependencies on goog.array 2013-01-21 14:20:11 +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
f3cace499c Implement frame state and animation architecture 2013-01-11 15:48:24 +01:00
Tom Payne
0d1e6ea766 Move forEachReadyVisibleLayer into WebGL renderer 2013-01-10 16:43:42 +01:00
Éric Lemoine
927cffb2b7 Add view abstraction 2013-01-09 14:03:16 +01:00
Tom Payne
b12711fa9d Fix non-view-related typecasts in ol.renderer.Map 2013-01-07 13:19:00 +01:00
Tom Payne
0e93217396 Correctly dispose of layer renderers when layers property changes 2013-01-07 13:18:59 +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
Tom Payne
7ee5c5777a Fix use of goog.nullFunction and goog.functions.NULL, thanks @elemoine (again) 2012-11-02 18:28:27 +01:00
Tom Payne
4d3726d183 Use goog.functions.NULL instead of goog.nullFunction, thanks @elemoine 2012-11-02 18:20:52 +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