Commit Graph

220 Commits

Author SHA1 Message Date
Frederic Junod
23f09937bc Don't attempt to display the mouse position if the frameState is null 2013-06-21 12:27:39 +02:00
Éric Lemoine
04344ed184 Merge pull request #762 from elemoine/controls
Add addControl and removeControl methods to the map
2013-06-21 00:53:12 -07:00
Frederic Junod
22adf354e2 Add 'projection' and 'coordinateFormat' to ol.control.MousePosition 2013-06-20 16:50:43 +02:00
Frederic Junod
9d63217778 Add 'units' property to ol.control.ScaleLine 2013-06-20 14:50:32 +02:00
Éric Lemoine
b85520f504 The map now has a collection of controls 2013-06-20 14:39:20 +02:00
Frederic Junod
cbf0402471 Make ol.control.Control extends ol.Object 2013-06-19 16:43:59 +02:00
Frederic Junod
f99fd26386 Add ol.control.MousePosition.getProjection 2013-06-18 11:20:19 +02:00
Frederic Junod
916dde0045 Add ol.control.MousePosition.setProjection 2013-06-18 11:12:20 +02:00
Bruno Binet
be0149e478 Merge pull request #763 from bbinet/cleanup-attribution-control
Cleanup attribution control
2013-06-17 07:01:00 -07:00
Bruno Binet
6b904573a0 Hide attribution instead of DOM removal
The reasons are:

 - It minimizes DOM updates (most changes to the attribution are just toggling
   visibility, not the more expensive creation, insertion and removal of DOM
   elements)
 - The order of attributions remains stable as layer visibilities are toggled
   and the user interacts with the map
2013-06-14 00:23:01 +02:00
Bruno Binet
950b53f6dc Clean up attribution control
Do not use map.getLayers() anymore, but get layers from frameState.layersArray.
2013-06-14 00:22:47 +02:00
Bart van den Eijnden
8dc97790bc Add more content for the API doc
Involves additions to (there will be subsequent pull requests for other
classes):
- ol.Attribution
- ol.Collection
- ol.Expression
- ol.Feature
- ol.Geolocation
- ol.Map
- ol.Object
- ol.Overlay
- ol.Projection
- ol.View2D
- ol.control.Attribution
- ol.control.Control
- ol.control.FullScreen
- ol.control.Logo
- ol.control.MousePosition
- ol.control.ScaleLine
- ol.control.Zoom
- ol.control.ZoomSlider
- ol.dom.Input
- ol.filter.Filter
- ol.filter.Geometry
- ol.filter.Logical
2013-06-11 20:56:04 +02:00
Frederic Junod
a1a7e21f92 Redefine ol.Size to be Array.<number> 2013-06-01 10:22:06 +02:00
Frederic Junod
be081fd44e Redefine ol.Pixel to be Array.<number> 2013-05-31 15:53:04 +02:00
Tom Payne
46553c719c Rename ol.projection to ol.proj 2013-05-30 18:55:58 +02:00
Éric Lemoine
3a4fc2a99a Use our own null function for handleMapPostrender
If we use ol.control.Control.prototype.handleMapPostrender = goog.nullFunction the API doc doesn't show the mapEvent parameter of the handleMapPostRender function.
2013-05-10 10:56:39 +02:00
Éric Lemoine
88352092ee Externalize Control.handleMapPostrender 2013-05-10 10:45:24 +02:00
Éric Lemoine
c845682ecb Export Control.getMap 2013-05-10 10:24:11 +02:00
Éric Lemoine
7a71f107cb Export and externalize Control.setMap 2013-05-10 10:24:11 +02:00
Tom Payne
2ad5dea737 Rename ol-mouseposition to ol-mouse-position 2013-05-07 17:31:26 +02:00
Tom Payne
b698b1736f Add className option to ol.control.ZoomSlider 2013-05-07 16:36:25 +02:00
Tom Payne
9c59116dd1 Make zoom slider control options optional 2013-05-07 16:31:39 +02:00
Tom Payne
ab9fc9cc71 Inline simple function that is only called once 2013-05-07 16:28:22 +02:00
Tom Payne
b7e2a9b40e Add className option to ol.control.Zoom 2013-05-07 16:19:50 +02:00
Tom Payne
09feaedd00 Add className option to ol.control.ScaleLine 2013-05-07 16:19:21 +02:00
Tom Payne
f31a4f8549 Add className option to ol.control.MousePosition 2013-05-07 16:18:05 +02:00
Tom Payne
525d5c5337 Add className option to ol.control.Logo 2013-05-07 16:17:51 +02:00
Tom Payne
f08814250e Add className option to ol.control.FullScreen 2013-05-07 16:17:35 +02:00
Tom Payne
8c396e5afb Add className option to ol.control.Attribution 2013-05-07 16:17:13 +02:00
Thomas
f219393149 Add default CSS style for mouse position
Missing CSS was confirmed with issue #680, this commit is to fix it and change
ol-mouse-position class to ol-mouseposition. I choose for the moment the top
right corner to display the coordinates from mouse position control because of
potential conflict with the scaleline control.
2013-05-06 14:07:13 +02:00
Éric Lemoine
2dfe36b588 Map target may be undefined 2013-04-23 10:42:18 +02:00
Tom Payne
8264343e54 Cache array length in ol.control.Attribution 2013-04-22 10:05:21 +02:00
Tom Payne
43cfc2a4cd Initialize all properties in constructor in controls 2013-04-18 21:01:58 +02:00
Éric Lemoine
5d86674b32 Merge pull request #553 from elemoine/fix-zoomslider
ZoomSlider example is broken
2013-04-17 11:41:36 -07:00
Éric Lemoine
6f34595312 ZoomSlider uses non-existing View2D functions 2013-04-17 10:53:23 +02:00
Tom Payne
3867d0cd28 Give defaults.{js,exports} unique filenames 2013-04-16 19:18:14 +02:00
Frederic Junod
7b0e036b83 Hide the control if the Fullscreen API is not supported 2013-04-11 18:25:31 +02:00
Frederic Junod
8206cf111f Fix full screen button state 2013-04-11 18:25:31 +02:00
Tim Schaub
93041becbe Toggle css class and use css content for anchor 2013-04-11 18:25:31 +02:00
Tom Payne
cef6fe4930 Add full screen control 2013-04-11 18:25:31 +02:00
Éric Lemoine
2d5381ae41 Move zoom from View2D to Interaction 2013-04-10 08:52:07 +02:00
Tom Payne
e132943eef Use goog.asserts.fail 2013-04-08 19:14:16 +02:00
Tom Payne
24cfd8a9be Merge pull request #496 from twpayne/check-whitespace
Check whitespace
2013-04-08 06:06:15 -07:00
Éric Lemoine
879ea4f488 Merge pull request #473 from elemoine/value-resolution
Exponential scaling to ZoomSlider
2013-04-08 05:22:38 -07:00
Tom Payne
a4763e0b69 Fix whitespace errors in exports 2013-04-08 13:25:01 +02:00
É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
949a4a59fa Shuffling jsdoc files, as suggested by @elemoine 2013-04-08 11:16:08 +02:00