Commit Graph

1940 Commits

Author SHA1 Message Date
Éric Lemoine
f34aa03109 Revert "Replace the navigation control by two controls, namely DragPan and MouseWheelZoom. DragPan is the map default drag control. MouseWheelZoom is the map default mouse wheel control."
This reverts commit c2a30f4ac4.
2012-07-13 15:37:39 +02:00
Éric Lemoine
c2a30f4ac4 Replace the navigation control by two controls, namely DragPan and MouseWheelZoom. DragPan is the map default drag control. MouseWheelZoom is the map default mouse wheel control. 2012-07-13 08:57:40 +02:00
ahocevar
ba986e536d We decided to be explicit about bubble/capture. 2012-07-12 23:47:37 +02:00
ahocevar
8183164298 The underlying event will be needed frequently.
But there will also be events that don't have an underlying event, so we make it optional.
2012-07-12 23:47:16 +02:00
ahocevar
3cc069186c Allow for using a different set of default behaviors.
The default behavior of dragging and wheel zooming feels specific to 2D maps. So I think it makes sense to introduce a special type of controls (ol.control.DefaultControl) that implement default behaviors. This change also re-introduces the Navigatin control, which is a container for the default behaviors that were previously defined in the map handlers. Maybe this control needs to be renamed to Navigatin2D in the future, and there could be a different Navigation control for 3D maps.
2012-07-12 20:51:47 +02:00
ahocevar
42c4c9d869 No need to pass the element to the constructor.
If MapHandler subclasses could live without a map, it would make sense to have a constructor with a target and an element. But because the target is always the map, and the handler need to know about the map for performing default behavior, we always assume the map's viewport as element.
2012-07-12 20:44:32 +02:00
Tom Payne
964bbf41bd Add scope to ol.Array.forEach 2012-07-12 19:23:06 +02:00
ahocevar
f672303f0a New MapHandler base class; better API docs 2012-07-12 15:21:15 +02:00
ahocevar
1ad915b428 Shuffling resources; better variable names; better type declarations. 2012-07-12 13:43:47 +02:00
Éric Lemoine
8206f11372 be more explicit when calling goog.events.listen and unlisten 2012-07-12 08:20:42 +02:00
Éric Lemoine
dea307e53a typed objects for map events 2012-07-12 08:18:22 +02:00
Éric Lemoine
d4106f166d remove reference to ol.control.Navigation from ol.export.js 2012-07-12 08:17:23 +02:00
Éric Lemoine
8801542744 add code comments to click and mousewheel handlers 2012-07-12 08:14:21 +02:00
Éric Lemoine
d517bdc5cd use of goog.events.Event.stopPropagation instead of our own function 2012-07-12 07:35:14 +02:00
Tom Payne
7ae4fc3eb5 Add initial ol.WebLGLMapRenderer experiments (size not working) 2012-07-11 21:58:18 +02:00
Tom Payne
e4f729f1b9 Add ol.webglrender.IGLObject 2012-07-11 21:57:01 +02:00
Tom Payne
7a4e3aa323 Listen for target resizes in ol.MapRenderer 2012-07-11 21:21:38 +02:00
Tom Payne
5c40e1d570 Listen for all camera property changes 2012-07-11 21:20:29 +02:00
Tom Payne
9c0ce6e635 Make ol.LayerProperty public 2012-07-11 21:18:47 +02:00
Tom Payne
02113f05be Make ol.StoreProperty public 2012-07-11 21:18:34 +02:00
Tom Payne
73abd6e8b8 Make ol.CameraProperty public 2012-07-11 21:15:28 +02:00
Tom Payne
87853a5f54 Stricter type checking on target 2012-07-11 19:33:17 +02:00
Éric Lemoine
a6b37ff83d remove reference to ol.control.Navigation in ol.js 2012-07-11 18:00:40 +02:00
Éric Lemoine
c6b8a93394 add goog.require for ol.handler.Click in ol.js 2012-07-11 17:52:21 +02:00
Éric Lemoine
8194f05ce4 better doc strings for the mousewheel handler 2012-07-11 17:49:13 +02:00
Éric Lemoine
62aee1d7ea remove unused function in the mousewheel handler 2012-07-11 17:48:48 +02:00
Éric Lemoine
d73531bf57 missing goog.require in the mousewheel handler 2012-07-11 17:47:16 +02:00
Éric Lemoine
3936c62e77 drag handler constructor should call its parent 2012-07-11 17:46:57 +02:00
Éric Lemoine
be0f73fb11 better doc strings for the drag handler 2012-07-11 17:46:25 +02:00
Éric Lemoine
d73410a9b3 add a click handler 2012-07-11 17:45:32 +02:00
Éric Lemoine
da11a8c34d add ol.ENABLE_DRAG_HANDLER and ol.ENABLE_MOUSEWHEEL_HANDLER @defines, and pass a an object to the handlers for sharing states 2012-07-11 17:43:42 +02:00
Éric Lemoine
38f946d944 remove the navigation control and the event target hierarchy 2012-07-11 17:38:18 +02:00
Éric Lemoine
ae5cdc75b4 the mousewheel handler zooms the map by default 2012-07-11 17:35:50 +02:00
Tom Payne
00462bb9e4 Move renderers into their own directories 2012-07-11 17:20:09 +02:00
Tom Payne
133f6199f7 Fix gjslint errors 2012-07-11 17:20:09 +02:00
Tom Payne
cf9a41f77e Create camera, layers and projection if not specified 2012-07-11 17:20:09 +02:00
Tom Payne
62a25d7242 Add ol.TileLayer.createOpenStreetMap 2012-07-11 17:20:09 +02:00
Tom Payne
1485137f7b Add ol.TileStore.createOpenStreetMap 2012-07-11 17:20:09 +02:00
Tom Payne
b9667c208b Add ol.TileUrlFunction.createFromTemplates 2012-07-11 17:20:09 +02:00
Tom Payne
d9077f3002 Correct type of opt_values 2012-07-11 17:20:09 +02:00
Tom Payne
1298cc3da3 Add ol.Map skeleton 2012-07-11 17:20:09 +02:00
Tom Payne
995aa76d1a Add initial ol.DOMMapRenderer skeleton 2012-07-11 17:20:09 +02:00
Tom Payne
fbefb98026 Add initial ol.WebGLMapRenderer skeleton 2012-07-11 17:20:09 +02:00
Tom Payne
bcf4d9416c Add initial ol.MapRenderer skeleton 2012-07-11 17:20:09 +02:00
Tom Payne
6c1090a2df Add initial ol.LayerRenderer skeleton 2012-07-11 17:20:09 +02:00
Tom Payne
06d32b3819 Allow values to be passed to ol.Layer 2012-07-11 17:20:09 +02:00
Tom Payne
56de224667 Add missing require 2012-07-11 17:20:09 +02:00
Tom Payne
11835b18c9 Remove ol.coord.AccessorInterface 2012-07-11 17:20:08 +02:00
Tom Payne
b2b9a41be1 Merge tile cache into TileStore 2012-07-11 17:20:08 +02:00
Tom Payne
5adbd13705 Add ol.TileCoord.toString 2012-07-11 17:20:08 +02:00