Éric Lemoine
2b9df6442b
Revert "Allow for using a different set of default behaviors."
...
This reverts commit 3cc069186c .
2012-07-13 15:38:06 +02:00
É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
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
ahocevar
f672303f0a
New MapHandler base class; better API docs
2012-07-12 15:21:15 +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
a3387bc673
ol.Map requires ol.handler.MouseWheel
2012-07-09 21:11:13 +02:00
Éric Lemoine
484d0f8d04
use goog.events.dispatchEvent
2012-07-09 09:33:53 +02:00
Éric Lemoine
1679a59835
reset the map DEFAULT_CONTROLS array
2012-07-09 09:33:32 +02:00
Éric Lemoine
9e693f29c5
use the mousewheel handler
2012-07-09 09:28:56 +02:00
Éric Lemoine
34a450a009
Merge branch 'master' into event
...
Conflicts:
src/ol/Map.js
src/ol/event/Drag.js
2012-07-09 08:57:55 +02:00
Tim Schaub
5a485ea856
Getting explicit about pixels and size.
...
Eventually, well have to ask renderers for all pixel and size related stuff. And the map overlay renderer will do all pixel<->loc math. For now, we let the map do this math based on its viewport - as this is where the mouse events are handled and it is pixels relative to the viewport that are being generated. For now, the getViewportPixelForLoc and getLocForViewportPixel are now more explicitly named.
2012-07-08 20:57:36 -06:00
Tim Schaub
3d130d3325
Letting the map ask renderer for resolution.
2012-07-08 20:56:36 -06:00
Tim Schaub
ceaba3cdd4
Overlays above the renderer.
2012-07-08 18:37:23 -06:00
Éric Lemoine
8e36850e7f
create parent event target for the map, to allow stopping event propagation
2012-07-05 13:55:57 +02:00
Éric Lemoine
410d79faa1
rely on registerDisposable
2012-07-05 11:11:35 +02:00
Éric Lemoine
946cd33350
make ol.Map inherit from goog.EventTarget, and add an ol.handler.Drag
2012-07-05 11:11:35 +02:00
ahocevar
578f74eb86
Less magic.
...
Each control is responsible for its handlers. And all controls are rendered into an overlay, not any more depending on assumptions about link click handling.
2012-06-29 09:44:52 +02:00
ahocevar
f28fe4912f
I think we decided to name events in a noun+verb fashion.
2012-06-26 13:34:34 +02:00
ahocevar
9c46aadd22
Adding attribution control and attribution.
2012-06-24 22:22:18 +02:00
ahocevar
dfc21754c9
Adding addLayers method and addlayer event.
2012-06-24 22:14:48 +02:00
ahocevar
9758910fc6
Making Element/Node types more consistent.
2012-06-24 22:12:38 +02:00
ahocevar
45222ac5cb
Adding getStaticOverlay method.
...
This will be used by overlays, e.g. to display layer attribution.
2012-06-24 17:07:02 +02:00
ahocevar
81577d6dce
Adding Loc.add method.
2012-06-24 10:09:24 +02:00
Éric Lemoine
0b36e10f8f
[ol.map] option name maxRes changed to maxResolution (discussed in cdd9439)
2012-06-23 21:27:39 +02:00
Tim Schaub
2fcbce30bc
For now, we require a projection on loc internally.
2012-06-23 19:59:49 +02:00
Tim Schaub
bcc85b9dd7
Must set a projection before setting center.
2012-06-23 16:55:16 +02:00
Tim Schaub
db2cbe07b7
Transforming coords before setting center.
...
The internal setCenter method can only be called with locations that have projections. This method always transforms.
2012-06-23 16:42:51 +02:00
ahocevar
026b60826e
Removing stub method, and use the real method in Popup.
2012-06-23 16:16:37 +02:00
ahocevar
ad8568a259
New setCenterAndZoom and setZoom methods.
2012-06-23 16:16:37 +02:00
ahocevar
abf4f41eab
Check for renderer before calling methods on it.
2012-06-23 16:16:37 +02:00
ahocevar
d391c65ac6
New pixel conversion and zoom/center related methods.
2012-06-23 14:21:37 +02:00
ahocevar
cdd9439bbd
Consistency: get/setMaxResolution instead of get/setMaxRes.
2012-06-23 09:10:01 +02:00
Tim Schaub
76d90428bd
Pleasant zoom.
2012-06-23 03:32:27 +02:00
Tim Schaub
ef0fd8da60
Pixels increase right and down.
2012-06-23 02:00:28 +02:00
ahocevar
a6069bb78e
Center tranformation in the api; moveByPx implemented.
2012-06-22 20:49:58 +02:00
Tim Schaub
5fa42e9b30
A map that zooms.
2012-06-22 20:46:34 +02:00
Tim Schaub
787f2ba979
Common method for conditionally rendering.
2012-06-22 20:37:29 +02:00
Tim Schaub
b986395358
This is not doing what you think it is.
2012-06-22 20:25:26 +02:00
Tim Schaub
af73489bd5
Create a renderer and draw when possible.
2012-06-22 20:08:44 +02:00
ahocevar
c72f803038
Adding scroll sequence and scroll support for the Navigation control.
2012-06-22 19:51:35 +02:00
Mike Adair
264cc741ca
Merge branch 'master' of github.com:openlayers/ol3
2012-06-22 11:26:25 -04:00
Mike Adair
d8b527776a
fixing compiler warning
2012-06-22 11:26:09 -04:00
ahocevar
0420d2efb9
Adding Zoom control.
...
Tests still missing.
2012-06-22 17:14:22 +02:00
Mike Adair
e748d39680
Merge branch 'master' of github.com:openlayers/ol3
2012-06-22 10:53:17 -04:00
Mike Adair
2163d54323
adds autosizing and image loading listener
2012-06-22 10:52:58 -04:00
Petr Pridal
976239816e
Merge branch 'master' of https://github.com/openlayers/ol3
2012-06-22 14:53:53 +02:00