Commit Graph

153 Commits

Author SHA1 Message Date
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
Éric Lemoine 238c695265 Add FIXME to ol.control.Attribution 2013-02-14 23:36:36 +01:00
Éric Lemoine bde61a0b4b Simplify control architecture 2013-02-04 10:18:33 +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 2e401b43f4 Make attribution control unselectable 2013-01-29 11:21:57 +01:00
Tom Payne 386bb636bb Add missing dependencies on goog.array 2013-01-21 14:20:11 +01:00
Tom Payne 3ec2014ad1 Rename tileUsage to usedTiles 2013-01-19 15:03:01 +01:00
Tom Payne 90b7cfb330 Add animated zoom to zoom control 2013-01-17 16:21:53 +01:00
Tom Payne 9fbabc3696 Refactor attribution control 2013-01-16 16:34:31 +01:00
Tom Payne 06628a88e6 Update mouse position on each frame 2013-01-16 11:26:09 +01:00
Tom Payne 11ec1de89b Refactor mouse position control to use postrender event 2013-01-16 11:25:59 +01:00
Éric Lemoine 927cffb2b7 Add view abstraction 2013-01-09 14:03:16 +01:00
Tom Payne 0653546e44 Fix non-view-related typecasts in ol.control.Attribution 2013-01-07 13:18:59 +01:00
Augustus Kling a73c15c988 Discard documentation for attributioncontrol.js and map.js to make refactoring easier due to @elemoine's request 2012-12-03 22:47:33 +01:00
augustus f253c1bcf8 Some comments (no changes to code) 2012-11-09 16:26:59 +01:00
Tom Payne e5d39724c9 Give each source file a unique name 2012-10-26 11:25:26 +02:00
Éric Lemoine 576c54eb61 Move object literal exports to their own file 2012-10-24 17:05:33 +02:00
Éric Lemoine d81b232587 Granularize the exports
This commit decomposes exports.txt into multiple, per-component, export files.  This will be required for custom builds;
2012-10-20 22:31:33 +02:00
Éric Lemoine 0b411ad69c Have disposeInternal call parent 2012-10-11 17:46:22 +02:00
Éric Lemoine 655e04368b disposeInternal implementation for ol.control.Control 2012-10-10 20:24:32 +02:00
Tom Payne 9d253ab6bb Refactor exports and externs 2012-10-04 15:11:26 +02:00