Commit Graph

174 Commits

Author SHA1 Message Date
Éric Lemoine fb5ca531d0 Do not assume map.getView returns an ol.View2D 2013-04-08 12:55:00 +02:00
Éric Lemoine 8c9153ffca ZoomSlider animates to final resolution 2013-04-08 12:51:29 +02:00
Éric Lemoine 516f21eb17 Make ZoomSlider use View2D value/resolution funcs 2013-04-08 12:51:14 +02:00
Éric Lemoine 6163f05b2b ZoomSlider setMap deals with undefined resolution 2013-04-08 12:50:12 +02:00
ahocevar c832a47575 Documentation for exported object literals
This adds the infrastructure that we need for documenting
exported object literals. This is best done by using *.jsdoc
files, which are parsed by JSDoc but not the Closure Compiler.
In addition to adding the documentation of the objects literal
properties, the respective namespaces must also be annotated.

Restricting the API docs to the exported API will be added as a
separate pull request.
2013-04-07 18:00:10 +02:00
Tom Payne f724e40179 Add ol.control.Logo exports 2013-04-07 12:53:52 +02:00
Tom Payne ea22f0f8cc Be more consistent with control options 2013-04-06 20:44:23 +02:00
Tom Payne 4be8c991f7 Add missing Closure Library requires 2013-04-06 14:28:12 +02:00
Tom Payne 25eb18d2c8 Handle unlistening in base class 2013-04-05 20:59:16 +02:00
Tom Payne 06bcab8374 Move postrender event listening into base class 2013-04-05 20:59:16 +02:00
Tom Payne da1e5aadd3 Factor out css.js and fix requires 2013-04-05 20:59:16 +02:00
Tom Payne 6cd7acfb8e Merge pull request #480 from twpayne/logo-control
Add logo control
2013-04-05 10:47:49 -07:00
Tom Payne cfe5234104 Add logo control by default 2013-04-05 18:38:52 +02:00
Tom Payne dfed88a8c2 Add ol.control.Logo 2013-04-05 18:38:52 +02:00
Tom Payne 78abd1b103 Minor attribution control clean-ups 2013-04-05 18:19:20 +02:00
Tom Payne 02196c94b5 Redefine ol.Coordinate to be Array.<number> 2013-04-05 12:30:37 +02:00
Marc Jansen 523506ef86 Rename *.exports to match their *.js counterparts. 2013-04-04 07:40:16 +02:00
Marc Jansen 250e17561a Use CSS class constant in zoomslider. 2013-03-15 10:02:12 +01:00
Bruno Binet 81089b2199 Remove unused goog.require directives 2013-03-14 12:39:51 +01:00
Marc Jansen e872a49beb Use getContentBoxSize() for slider initialisation.
Initial note to revisit this came from @twpayne; thanks.
2013-03-14 09:37:36 +01:00
Marc Jansen 94d7379ba3 Correct API documentation. 2013-03-14 09:37:35 +01:00
Marc Jansen 220c7bd6f8 More specific argument type of callback method. 2013-03-14 09:37:35 +01:00
Marc Jansen bc07722816 Unregister previous event listeners, if any.
Thanks for spotting this, @twpayne.
2013-03-14 09:37:35 +01:00
Marc Jansen d77a8b0a1d Add an assertion to the dragchange handler.
This ensures that the result of resolution calculation stays inside of the
allowed bounds.
2013-03-14 09:37:35 +01:00
Marc Jansen ce67625b20 Use OSM resolutions as fallback resolutions.
Hat tip to @twpayne for suggesting this change in the defaults.
2013-03-14 09:37:35 +01:00
Marc Jansen 8bf71ebb3a Add a zoomslider control. 2013-03-14 09:37:35 +01:00
Marc Jansen 5e5e4d110a Use constant for CSS class 'ol-unselectable'. 2013-03-12 10:34:49 +01:00
Tom Payne 21d34f1cc8 Rename projection functions for a friendlier API
The following functions are renamed:

getTransform -> getTransformForProjections
getTransformFromCodes -> getTransform
transform -> transformWithProjections
transformWithCodes -> transform

With this change, the faster functions that avoid projection look-up
have longer names and are used internally, whereas the slower but
friendlier short name functions are available for users.
2013-03-07 13:39:40 +01:00
Tom Payne eaa17758bd Allow strings to be used wherever projections are needed 2013-03-07 13:29:40 +01:00
Tom Payne afcbec469a Rename ol.projection.getFromCode to ol.projection.get 2013-03-07 13:29:39 +01:00
Tom Payne 09b75f8044 Don't include scale line in default controls 2013-03-06 20:46:52 +01:00
Tom Payne 363cb87e1a Use an array to specify additional controls 2013-03-06 13:19:34 +01:00
Tom Payne 8ae009d401 Add ol.control.defaults 2013-03-06 12:36:48 +01:00
Tom Payne 1ae20641ef Make mouse position control options argument optional 2013-03-05 18:58:29 +01:00
Tom Payne f581390655 Make zoom control options argument optional 2013-03-05 18:56:41 +01:00
Tom Payne c521f92408 Make attribution control options argument optional 2013-03-05 18:56:34 +01:00
Éric Lemoine 98f9f44877 Merge pull request #261 from elemoine/zoomfactor
Change default zoom delta and animate mousewheel zoom
2013-03-05 03:52:38 -08:00
Éric Lemoine 03ae41a68c Change View2D function names
Also make the TouchZoom interaction no longer use a private View2D function.
2013-03-05 09:59:31 +01:00
Tom Payne b9a9e84c1b Handle projections in feet in scale line control 2013-03-04 10:40:01 +01:00
Tom Payne c35d07d481 Rename minimumWidth to minWidth 2013-03-04 09:58:09 +01:00
Tom Payne 8c2b01948b Add ScaleLine control 2013-03-04 00:43:37 +01:00
Tim Schaub 303f2df9e1 Merge pull request #256 from tschaub/transform-arrays
Updating ol.TransformFunction instances so they work with arrays instead of coordinates.
2013-03-03 14:46:22 -08:00
Frédéric Junod d783df0840 Merge pull request #223 from fredj/touch-click
Click handling broken
2013-03-03 12:43:01 -08:00
Tim Schaub e9fa08fccb Use in-place transforms where possible 2013-03-03 20:53:13 +01:00
Tim Schaub 7a5e6a06d8 Make transform functions work with arrays
Instead of working with ol.Coordinate instances, transform functions work with arrays.  This is in anticipation of using transform functions to transform large arrays of vertex coordinate values.  The ol.projection.transform and ol.projection.transformWithCodes are slightly more convenient functions for dealing with ol.Coordinate instances.  Whether we make this more consistent with the use of functions returned by ol.projection.getTransform is up for discussion.
2013-03-03 19:27:57 +01:00
Tom Payne 183df560ad Merge pull request #245 from twpayne/projection-refactoring
Projection refactoring
2013-03-03 06:46:38 -08:00
Frederic Junod c72877b33b Listen to both click and touchend events 2013-03-03 14:45:12 +01:00
Tom Payne fcc620af7d Separate ol.projection module from ol.Projection class 2013-03-03 13:09:13 +01:00
Frederic Junod 0fcc06b8ae Set ol-zoom content in css using :before pseudo class 2013-03-03 12:23:29 +01:00
Éric Lemoine 82aa44fdd1 Attribution control reads attribs from frame state 2013-02-19 15:19:44 +01:00