Commit Graph

9827 Commits

Author SHA1 Message Date
Tim Schaub
0e27f31785 Avoid undefined rotation 2012-09-29 17:47:44 -06:00
ahocevar
69859b415b More MapBrowserEvent improvements
Now we use the browser's native dblclick event on pointer
devices, and we fire dragstart and dragend only if we're really
dragging, and not on mousedown/touchstart and mouseup/touchend.
2012-09-29 18:54:29 +02:00
ahocevar
877971185f MapBrowserEvent simplifications and improvements
We don't register two listeners for mouseup and touchend any
more. And instead of using the native click event on touch
devices, we react on touchend, to make clicking more responsive.
On pointer devices, the underlying native event of a dblclick
event is now a click event.
2012-09-29 16:51:08 +02:00
Tom Payne
24771c73a0 Export layer options type 2012-09-29 15:36:17 +02:00
Tom Payne
8387f74a7b Generate exports automatically from src/ol/exports.txt 2012-09-29 15:17:40 +02:00
Tom Payne
c7c93ce099 Consistent nomenclature 2012-09-29 14:42:12 +02:00
Tom Payne
1a5375fa51 Move target container in to map options 2012-09-29 13:58:15 +02:00
Éric Lemoine
936a769869 Fix typo in ShiftDragZoom (caught by @ahocevar) 2012-09-29 13:47:00 +02:00
Tom Payne
71e42b2448 Refactor build system
This rather large commit refactors the build system to solve a number of
problems:
- Object literal types are now declared in just one place
- There are no more circular dependencies
- There is no need for concealed subclasses in build-standalone mode

When building in standalone mode, you need to include the source in
build/src/external.  This declares object literal types as externs so
that their properties are not renamed.

When building with the application, you need to include the source in
build/src/internal.  This declares object literal types as typedefs so
that their properties can be renamed and removed.

Note also that ol.MapOptions has been merged into ol.Map, with some
renaming.
2012-09-29 11:51:53 +02:00
Tim Schaub
67bc677ecb Stick with radians 2012-09-29 01:37:54 +02:00
Tim Schaub
50bf2f015c Getting rid of lines between rotated tiles
Applying the scale3d trick just to get rid of small pixel gap between rotated tiles.  This will be reworked soon with additional use of transforms.
2012-09-29 01:33:50 +02:00
Tom Payne
b6c06f4760 Generate externs and typedefs 2012-09-28 21:55:48 +02:00
Tom Payne
e36169c936 Ignore all errors in when testing for WebGL 2012-09-28 21:36:03 +02:00
Tom Payne
2713addb33 More accurate WebGL support test, see issue #31 2012-09-28 20:05:14 +02:00
Tom Payne
3eebed4580 Add drag box in shift drag zoom control 2012-09-28 17:24:17 +02:00
Tom Payne
62dc6a1b45 Port @ahocevar's drag box control to the new control architecture 2012-09-28 17:24:17 +02:00
ahocevar
6b395cafb5 Stop click event, as previously promised
This should have gone in with 3910318f1b.
2012-09-28 16:47:54 +02:00
Tom Payne
7bcb5886ad Use CSS rule to separate attributions 2012-09-28 14:57:54 +02:00
Tom Payne
ed67bdc489 Make attribution control less ugly 2012-09-28 14:53:45 +02:00
Tom Payne
1be9e97489 Add attribution control by default 2012-09-28 14:53:45 +02:00
ahocevar
b233b8e1a5 Making sure that position:absolute is set
Positioning of overlays is only possible when position:absolute
is set on the element. So we set it programmatically now.
2012-09-28 14:44:35 +02:00
Tom Payne
a341df3b41 Fix not-up-to-date transform bug in mouse position control 2012-09-28 13:48:20 +02:00
Tom Payne
0bf17f64f7 Initialize controls after map has been configured 2012-09-28 13:48:20 +02:00
ahocevar
3d62b67172 Introducing ol.overlay.Overlay and an overlayContainer
ol.overlay.Overlay can be used to bind DOM elements to a
coordinate on the map. It has positioning options to support
e.g. popups or image markers that have an anchor at the bottom
and an unknown size.

The overlayContainer stops propagation on mousedown and
touchstart events, so clicks and gestures on overlays don't
trigger any MapBrowserEvent. To make this work reliably, we now
only fire dblclick in mapbrowserevent.js when there was a
previous mousedown or touchstart. The default container for
controls is now the overlayContainer.
2012-09-28 13:01:56 +02:00
Tom Payne
e2e983728e Add controls to map 2012-09-28 12:52:54 +02:00
Tom Payne
e7eccb302d Cope with map being null 2012-09-28 12:51:10 +02:00
Tim Schaub
ff19ab0a28 Call event.getPixel() to get the map pixel offset
The new getPixel method should be used instead of checking offsetX/Y on the browser event.
2012-09-28 12:19:32 +02:00
Tim Schaub
eb29e6a43c Using null instead of null or object or undefined 2012-09-28 12:08:21 +02:00
Tim Schaub
3e34013c09 Separating out method to get pixel offset 2012-09-28 12:08:21 +02:00
Tim Schaub
6ed27779cc Rotation support for the dom renderer
Thanks @fredj for the inspiration.  This gives us initial rotation support.  It exposes some issues in the interactions that I'll address separately.  Closes #22.
2012-09-28 10:53:36 +02:00
Tom Payne
e3c3c13ac2 Use goog.vec.Mat4.rotateZ 2012-09-27 18:21:33 +02:00
Tom Payne
8dc57d5148 Add ol.ASSUME_TOUCH @define 2012-09-27 18:21:21 +02:00
Tom Payne
7415a11c63 More responsive zoom buttons on touch devices thanks to @ahocevar 2012-09-27 18:07:17 +02:00
Éric Lemoine
676a95efd8 Merge remote-tracking branch 'upstream/master' 2012-09-27 17:57:44 +02:00
Éric Lemoine
d99a0c164e Make functions @protected or @private
This also makes jsdoc3 happy along the way.
2012-09-27 17:56:29 +02:00
Tom Payne
0faab71e3f Implement new control architecture 2012-09-27 17:54:20 +02:00
Tom Payne
65b4041aa3 Remove ol.control.DragBox temporarily 2012-09-27 17:54:20 +02:00
Tim Schaub
981a40a994 Remove tiles that are still loading at alt z
When zooming to a new zoom level, we can immediately remove tiles from the previous level.  This (strongly) suggests not adding images to the container until they have actually loaded.
2012-09-27 17:46:23 +02:00
ahocevar
9536ba8e14 Common place to store browser features
The ol.BrowserFeature object is supposed to provide all detected browser features in a central place.
2012-09-27 17:09:19 +02:00
Tom Payne
fd411eb9ab Don't create controls in interactions 2012-09-27 16:34:39 +02:00
Tim Schaub
b8a69f0777 Adjusting layers pane only when necessary
We only want to adjust things that have to do with rendering (like the position of the layers panel) when actually rendering.  The handleXChange methods may be called more times than we can actually render, so we never want to do anything that touches the DOM there.  Instead, we have to keep track of the state at previous render and adjust the layers panel (or other) based on changes only when rendering.
2012-09-27 16:09:04 +02:00
Tim Schaub
9f9729656b Todos done. 2012-09-27 16:09:03 +02:00
Éric Lemoine
a3d888a57b Add FIXME to MapOptions 2012-09-27 15:59:30 +02:00
Éric Lemoine
0535a31bc6 Add zoomDelta option to MapOptions 2012-09-27 15:48:04 +02:00
Éric Lemoine
4f116c2e5b Fix default value of numZoomLevels 2012-09-27 15:46:45 +02:00
Éric Lemoine
d2f9ebae41 Add mouseWheelZoomDelta option to MapOptions 2012-09-27 15:16:14 +02:00
Éric Lemoine
dd425ff922 Export new map options 2012-09-27 14:10:05 +02:00
Tom Payne
7dbc70bcac Don't try to be too clever with size changes 2012-09-27 14:05:19 +02:00
Tom Payne
7625607fd1 Only resize canvas when renderering 2012-09-27 14:05:19 +02:00
Tom Payne
ac0e02039c s/POST_RENDER/POSTRENDER/ 2012-09-27 14:05:19 +02:00