From 8fcc3c79f8954c8a029d951b51a539c39207656f Mon Sep 17 00:00:00 2001 From: Arkadiusz Grabka Date: Fri, 24 Feb 2012 14:18:17 +0100 Subject: [PATCH 1/6] Added translations for Polish language. --- lib/OpenLayers/Lang/pl.js | 93 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 lib/OpenLayers/Lang/pl.js diff --git a/lib/OpenLayers/Lang/pl.js b/lib/OpenLayers/Lang/pl.js new file mode 100644 index 0000000000..49c33a9f02 --- /dev/null +++ b/lib/OpenLayers/Lang/pl.js @@ -0,0 +1,93 @@ +/* Translators: + * - Arkadiusz Grabka + */ + +/** + * @requires OpenLayers/Lang.js + */ + +/** + * Namespace: OpenLayers.Lang["pl"] + * Dictionary for Polish. Keys for entries are used in calls to + * . Entry bodies are normal strings or + * strings formatted for use with calls. + */ +OpenLayers.Lang["pl"] = OpenLayers.Util.applyDefaults({ + + 'unhandledRequest': "Nieobsługiwane żądanie zwróciło ${statusText}", + + 'Permalink': "Permalink", + + 'Overlays': "Nakładki", + + 'Base Layer': "Warstwa podstawowa", + + 'noFID': "Nie można zaktualizować funkcji, dla których nie ma FID.", + + 'browserNotSupported': + "Twoja przeglądarka nie obsługuje renderowania wektorów. Obecnie obsługiwane renderowanie to:\n${renderers}", + + // console message + 'minZoomLevelError': + "Właściwość minZoomLevel jest przeznaczona tylko do użytku " + + "z warstwami FixedZoomLevels-descendent." + + "Warstwa wfs, która sprawdza minZoomLevel jest reliktem przeszłości." + + "Nie możemy jej jednak usunąc bez mozliwości łamania OL aplikacji, " + + "które mogą być od niej zależne. " + + "Dlatego jesteśmy za deprecjację -- minZoomLevel " + + "zostanie usunięta w wersji 3.0. W zamian prosze użyj " + + "min/max rozdzielczości w sposób opisany tutaj: " + + "http://trac.openlayers.org/wiki/SettingZoomLevels", + + 'commitSuccess': "Transakcja WFS: SUKCES ${response}", + + 'commitFailed': "Transakcja WFS: FAILED ${response}", + + 'googleWarning': + "Warstwa Google nie był w stanie załadować się poprawnie.

" + + "Aby pozbyć się tej wiadomości, wybierz nową Warstwe podstawową " + + "w przełączniku warstw w górnym prawym rogu mapy.

" + + "Najprawdopodobniej jest to spowodowane tym, że biblioteka Google Maps " + + "nie jest załadowana, lub nie zawiera poprawnego klucza do API dla twojej strony

" + + "Programisto: Aby uzyskać pomoc , " + + "kliknij tutaj", + + 'getLayerWarning': + "Warstwa ${layerType} nie mogła zostać załadowana poprawnie.

" + + "Aby pozbyć się tej wiadomości, wybierz nową Warstwe podstawową " + + "w przełączniku warstw w górnym prawym rogu mapy.

" + + "Najprawdopodobniej jest to spowodowane tym, że biblioteka ${layerLib} " + + "nie jest załadowana, lub może(o ile biblioteka tego wymaga) " + + "byc potrzebny klucza do API dla twojej strony

" + + "Programisto: Aby uzyskać pomoc , " + + "kliknij tutaj", + + 'Scale = 1 : ${scaleDenom}': "Skala = 1 : ${scaleDenom}", + + //labels for the graticule control + 'W': 'ZACH', + 'E': 'WSCH', + 'N': 'PN', + 'S': 'PD', + 'Graticule': 'Siatka', + + // console message + 'reprojectDeprecated': + "w warstwie ${layerName} używasz opcji 'reproject'. " + + "Ta opcja jest przestarzała: " + + "jej zastosowanie został zaprojektowany, aby wspierać wyświetlania danych przez komercyjne mapy, "+ + "jednak obecnie ta funkcjonalność powinien zostać osiągnięty za pomocą Spherical Mercator " + + "its use was designed to support displaying data over commercial. Więcje informacji na ten temat możesz znaleźć na stronie " + + "http://trac.openlayers.org/wiki/SphericalMercator.", + + // console message + 'methodDeprecated': + "Ta metoda jest przestarzała i będzie usunięta od wersji 3.0. " + + "W zamian użyj ${newMethod}.", + + 'proxyNeeded': "Prawdopodobnie musisz ustawić OpenLayers.ProxyHost aby otrzymać dostęp do ${url}."+ + "See http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost" + +}); \ No newline at end of file From bfb379f349ea5c6d733d8ce2616c1c265c78fc0d Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Mon, 5 Mar 2012 11:43:09 +0100 Subject: [PATCH 2/6] Fix some problems in the documentation. --- lib/OpenLayers/Animation.js | 2 +- lib/OpenLayers/BaseTypes.js | 5 +++- lib/OpenLayers/Control/ArgParser.js | 3 ++- lib/OpenLayers/Control/GetFeature.js | 6 ++--- lib/OpenLayers/Control/ModifyFeature.js | 2 +- lib/OpenLayers/Control/Permalink.js | 2 +- lib/OpenLayers/Filter/Comparison.js | 6 ++--- lib/OpenLayers/Format/Atom.js | 6 ++--- lib/OpenLayers/Format/GML.js | 1 + lib/OpenLayers/Format/GML/Base.js | 2 +- lib/OpenLayers/Format/GML/v3.js | 2 +- lib/OpenLayers/Format/GPX.js | 2 +- lib/OpenLayers/Format/GeoJSON.js | 2 +- lib/OpenLayers/Format/OSM.js | 2 +- lib/OpenLayers/Format/Text.js | 2 +- .../Format/WFSDescribeFeatureType.js | 8 +++--- lib/OpenLayers/Format/WMC/v1.js | 13 ++++----- lib/OpenLayers/Format/WMSGetFeatureInfo.js | 2 +- lib/OpenLayers/Handler/Feature.js | 2 +- lib/OpenLayers/Lang.js | 2 +- lib/OpenLayers/Layer/ArcGIS93Rest.js | 7 ++--- lib/OpenLayers/Layer/ArcIMS.js | 2 +- lib/OpenLayers/Layer/Google.js | 4 +-- lib/OpenLayers/Layer/Grid.js | 2 +- lib/OpenLayers/Layer/KaMap.js | 2 +- lib/OpenLayers/Layer/MapGuide.js | 2 +- lib/OpenLayers/Layer/Vector.js | 2 +- lib/OpenLayers/Layer/WMTS.js | 2 +- lib/OpenLayers/Layer/Zoomify.js | 2 +- lib/OpenLayers/Map.js | 2 +- lib/OpenLayers/Marker.js | 1 + lib/OpenLayers/Protocol/SOS/v1_0_0.js | 1 + lib/OpenLayers/Protocol/Script.js | 4 +-- lib/OpenLayers/Protocol/WFS.js | 2 ++ lib/OpenLayers/Renderer.js | 4 +-- lib/OpenLayers/Renderer/Elements.js | 2 +- lib/OpenLayers/Strategy.js | 2 +- lib/OpenLayers/Strategy/BBOX.js | 3 ++- lib/OpenLayers/Strategy/Filter.js | 2 +- lib/OpenLayers/Strategy/Paging.js | 2 +- lib/OpenLayers/Style.js | 2 +- lib/OpenLayers/Tile.js | 4 ++- lib/OpenLayers/Tile/Image.js | 4 ++- lib/OpenLayers/Tween.js | 27 +++++++++++++++++++ lib/OpenLayers/Util.js | 5 +++- 45 files changed, 106 insertions(+), 58 deletions(-) diff --git a/lib/OpenLayers/Animation.js b/lib/OpenLayers/Animation.js index 1a1f906321..17ecf6797b 100644 --- a/lib/OpenLayers/Animation.js +++ b/lib/OpenLayers/Animation.js @@ -92,7 +92,7 @@ OpenLayers.Animation = (function(window) { * Terminates an animation loop started with . * * Parameters: - * {Number} Identifier returned from . + * id - {Number} Identifier returned from . */ function stop(id) { delete loops[id]; diff --git a/lib/OpenLayers/BaseTypes.js b/lib/OpenLayers/BaseTypes.js index d2e5711ca8..ed8650ec08 100644 --- a/lib/OpenLayers/BaseTypes.js +++ b/lib/OpenLayers/BaseTypes.js @@ -187,7 +187,10 @@ OpenLayers.String = { * APIFunction: numericIf * Converts a string that appears to be a numeric value into a number. * - * Returns + * Parameters: + * value - {String} + * + * Returns: * {Number|String} a Number if the passed value is a number, a String * otherwise. */ diff --git a/lib/OpenLayers/Control/ArgParser.js b/lib/OpenLayers/Control/ArgParser.js index 56dc1ecee8..9cc1984e77 100644 --- a/lib/OpenLayers/Control/ArgParser.js +++ b/lib/OpenLayers/Control/ArgParser.js @@ -35,7 +35,8 @@ OpenLayers.Control.ArgParser = OpenLayers.Class(OpenLayers.Control, { /** * Property: layers - * {Array()} + * {String} Each character represents the state of the corresponding layer + * on the map. */ layers: null, diff --git a/lib/OpenLayers/Control/GetFeature.js b/lib/OpenLayers/Control/GetFeature.js index c037f87d15..f1b7733c58 100644 --- a/lib/OpenLayers/Control/GetFeature.js +++ b/lib/OpenLayers/Control/GetFeature.js @@ -333,11 +333,11 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, { }, /** - * Method selectHover + * Method: selectHover * Callback from the handlers.hover set up when selection is on * * Parameters: - * evt {Object} - event object with an xy property + * evt - {Object} event object with an xy property */ selectHover: function(evt) { var bounds = this.pixelToBounds(evt.xy); @@ -459,7 +459,7 @@ OpenLayers.Control.GetFeature = OpenLayers.Class(OpenLayers.Control, { * Sets the multiple and toggle modifiers according to the current event * * Parameters: - * evt {} + * evt - {} */ setModifiers: function(evt) { this.modifiers = { diff --git a/lib/OpenLayers/Control/ModifyFeature.js b/lib/OpenLayers/Control/ModifyFeature.js index 30d6fad0cd..119e4faaf4 100644 --- a/lib/OpenLayers/Control/ModifyFeature.js +++ b/lib/OpenLayers/Control/ModifyFeature.js @@ -616,7 +616,7 @@ OpenLayers.Control.ModifyFeature = OpenLayers.Class(OpenLayers.Control, { * the mouse is over a vertex. * * Parameters: - * {Integer} Key code corresponding to the keypress event. + * evt - {Event} Keypress event. */ handleKeypress: function(evt) { var code = evt.keyCode; diff --git a/lib/OpenLayers/Control/Permalink.js b/lib/OpenLayers/Control/Permalink.js index 4a2112c552..da4a5da066 100644 --- a/lib/OpenLayers/Control/Permalink.js +++ b/lib/OpenLayers/Control/Permalink.js @@ -16,7 +16,7 @@ * current map view. By default it is drawn in the lower right corner of the * map. The href is updated as the map is zoomed, panned and whilst layers * are switched. - * ` + * * Inherits from: * - */ diff --git a/lib/OpenLayers/Filter/Comparison.js b/lib/OpenLayers/Filter/Comparison.js index d0c864d4d6..ee47a66a40 100644 --- a/lib/OpenLayers/Filter/Comparison.js +++ b/lib/OpenLayers/Filter/Comparison.js @@ -166,11 +166,11 @@ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { * regular expression already. * * Parameters: - * wildCard - {} wildcard character in the above value, default + * wildCard - {Char} wildcard character in the above value, default * is "*" - * singleChar - {) single-character wildcard in the above value + * singleChar - {Char} single-character wildcard in the above value * default is "." - * escape - {) escape character in the above value, default is + * escapeChar - {Char} escape character in the above value, default is * "!" * * Returns: diff --git a/lib/OpenLayers/Format/Atom.js b/lib/OpenLayers/Format/Atom.js index e984be1eab..6ba7d67c97 100644 --- a/lib/OpenLayers/Format/Atom.js +++ b/lib/OpenLayers/Format/Atom.js @@ -418,7 +418,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, { * node - {DOMElement} An Atom entry or feed node. * * Returns: - * An . + * {} */ parseFeature: function(node) { var atomAttrib = {}; @@ -554,7 +554,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, { * node - {DOMElement} An Atom entry or feed node. * * Returns: - * An Array of s. + * Array({}) */ parseFeatures: function(node) { var features = []; @@ -578,7 +578,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, { * node - {DOMElement} An Atom entry or feed node. * * Returns: - * An Array of s. + * Array({}) */ parseLocations: function(node) { var georssns = this.namespaces.georss; diff --git a/lib/OpenLayers/Format/GML.js b/lib/OpenLayers/Format/GML.js index c55e6a7bb5..9530a699e6 100644 --- a/lib/OpenLayers/Format/GML.js +++ b/lib/OpenLayers/Format/GML.js @@ -887,6 +887,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { * (code) * ... * (end) + * * Parameters: * geometry - {} * diff --git a/lib/OpenLayers/Format/GML/Base.js b/lib/OpenLayers/Format/GML/Base.js index 0eceadaed6..f4c2c27a38 100644 --- a/lib/OpenLayers/Format/GML/Base.js +++ b/lib/OpenLayers/Format/GML/Base.js @@ -615,7 +615,7 @@ OpenLayers.Format.GML.Base = OpenLayers.Class(OpenLayers.Format.XML, { }, /** - * Function: setGeometryTypes + * Method: setGeometryTypes * Sets the mapping. */ setGeometryTypes: function() { diff --git a/lib/OpenLayers/Format/GML/v3.js b/lib/OpenLayers/Format/GML/v3.js index a90670e3ed..9d91d98832 100644 --- a/lib/OpenLayers/Format/GML/v3.js +++ b/lib/OpenLayers/Format/GML/v3.js @@ -444,7 +444,7 @@ OpenLayers.Format.GML.v3 = OpenLayers.Class(OpenLayers.Format.GML.Base, { }, /** - * Function: setGeometryTypes + * Method: setGeometryTypes * Sets the mapping. */ setGeometryTypes: function() { diff --git a/lib/OpenLayers/Format/GPX.js b/lib/OpenLayers/Format/GPX.js index 2b71d3b27d..08a724ca57 100644 --- a/lib/OpenLayers/Format/GPX.js +++ b/lib/OpenLayers/Format/GPX.js @@ -102,7 +102,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { * doc - {Element} * * Returns: - * An Array of s + * Array({}) */ read: function(doc) { if (typeof doc == "string") { diff --git a/lib/OpenLayers/Format/GeoJSON.js b/lib/OpenLayers/Format/GeoJSON.js index c70779ce72..230f2589f8 100644 --- a/lib/OpenLayers/Format/GeoJSON.js +++ b/lib/OpenLayers/Format/GeoJSON.js @@ -287,7 +287,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { * . * * Parameters: - * array {Object} The coordinates array from the GeoJSON fragment. + * array - {Object} The coordinates array from the GeoJSON fragment. * * Returns: * {} A geometry. diff --git a/lib/OpenLayers/Format/OSM.js b/lib/OpenLayers/Format/OSM.js index 48ef45ac91..c7d923d333 100644 --- a/lib/OpenLayers/Format/OSM.js +++ b/lib/OpenLayers/Format/OSM.js @@ -90,7 +90,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { * doc - {Element} * * Returns: - * An Array of s + * Array({}) */ read: function(doc) { if (typeof doc == "string") { diff --git a/lib/OpenLayers/Format/Text.js b/lib/OpenLayers/Format/Text.js index c590ebf12d..f99fbcbb89 100644 --- a/lib/OpenLayers/Format/Text.js +++ b/lib/OpenLayers/Format/Text.js @@ -72,7 +72,7 @@ OpenLayers.Format.Text = OpenLayers.Class(OpenLayers.Format, { * text - {String} * * Returns: - * An Array of s + * Array({}) */ read: function(text) { var lines = text.split('\n'); diff --git a/lib/OpenLayers/Format/WFSDescribeFeatureType.js b/lib/OpenLayers/Format/WFSDescribeFeatureType.js index 5fe40931d0..0274ad740d 100644 --- a/lib/OpenLayers/Format/WFSDescribeFeatureType.js +++ b/lib/OpenLayers/Format/WFSDescribeFeatureType.js @@ -5,7 +5,9 @@ /** * @requires OpenLayers/Format/XML.js - * + */ + +/** * Class: OpenLayers.Format.WFSDescribeFeatureType * Read WFS DescribeFeatureType response * @@ -145,8 +147,8 @@ OpenLayers.Format.WFSDescribeFeatureType = OpenLayers.Class( * Reads restriction defined in the child nodes of a restriction element * * Parameters: - * node {DOMElement} - the node to parse - * obj {Object} - the object that receives the read result + * node - {DOMElement} the node to parse + * obj - {Object} the object that receives the read result */ readRestriction: function(node, obj) { var children = node.childNodes; diff --git a/lib/OpenLayers/Format/WMC/v1.js b/lib/OpenLayers/Format/WMC/v1.js index e6eed09b44..ccdbe56c6d 100644 --- a/lib/OpenLayers/Format/WMC/v1.js +++ b/lib/OpenLayers/Format/WMC/v1.js @@ -1055,15 +1055,16 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, { }, /** - * Method: write_wmc_URLType - * Create a LogoURL/DescriptionURL/MetadataURL/DataURL/LegendURL node given a object and elementName. + * Method: write_wmc_URLType + * Create a LogoURL/DescriptionURL/MetadataURL/DataURL/LegendURL node given a object and elementName. * * Parameters: - * elName - {String} Name of element (LogoURL/DescriptionURL/MetadataURL/LegendURL) - * url - {String} URL string value - * attr - {Object} Optional attributes (width, height, format) + * elName - {String} Name of element (LogoURL/DescriptionURL/MetadataURL/LegendURL) + * url - {String} URL string value + * attr - {Object} Optional attributes (width, height, format) + * * Returns: - * {Element} A WMC element node. + * {Element} A WMC element node. */ write_wmc_URLType: function(elName, url, attr) { var node = this.createElementDefaultNS(elName); diff --git a/lib/OpenLayers/Format/WMSGetFeatureInfo.js b/lib/OpenLayers/Format/WMSGetFeatureInfo.js index 268086ce04..30c00b0d7d 100644 --- a/lib/OpenLayers/Format/WMSGetFeatureInfo.js +++ b/lib/OpenLayers/Format/WMSGetFeatureInfo.js @@ -190,7 +190,7 @@ OpenLayers.Format.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Format.XML, { * criteria - {String} Search string which will match some part of a tagName * * Returns: - * Array({DOMElement)) An array of sibling xml nodes + * Array({DOMElement}) An array of sibling xml nodes */ getSiblingNodesByTagCriteria: function(node, criteria){ var nodes = []; diff --git a/lib/OpenLayers/Handler/Feature.js b/lib/OpenLayers/Handler/Feature.js index 402b8d66a8..f548615b0a 100644 --- a/lib/OpenLayers/Handler/Feature.js +++ b/lib/OpenLayers/Handler/Feature.js @@ -407,7 +407,7 @@ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, { }, /** - * Method handleMapEvents + * Method: handleMapEvents * * Parameters: * evt - {Object} diff --git a/lib/OpenLayers/Lang.js b/lib/OpenLayers/Lang.js index d77fa69b19..72890124ac 100644 --- a/lib/OpenLayers/Lang.js +++ b/lib/OpenLayers/Lang.js @@ -35,7 +35,7 @@ OpenLayers.Lang = { * Get the current language code. * * Returns: - * The current language code. + * {String} The current language code. */ getCode: function() { if(!OpenLayers.Lang.code) { diff --git a/lib/OpenLayers/Layer/ArcGIS93Rest.js b/lib/OpenLayers/Layer/ArcGIS93Rest.js index 9161a9cd9e..9f559f1ceb 100644 --- a/lib/OpenLayers/Layer/ArcGIS93Rest.js +++ b/lib/OpenLayers/Layer/ArcGIS93Rest.js @@ -56,10 +56,11 @@ OpenLayers.Layer.ArcGIS93Rest = OpenLayers.Class(OpenLayers.Layer.Grid, { * url - {String} Base url for the ArcGIS server REST service * options - {Object} An object with key/value pairs representing the * options and option values. + * * Valid Options: - * format: {String} MIME type of desired image type. - * layers: {String} Comma-separated list of layers to display. - * srs: {String} Projection ID. + * format - {String} MIME type of desired image type. + * layers - {String} Comma-separated list of layers to display. + * srs - {String} Projection ID. */ initialize: function(name, url, params, options) { var newArguments = []; diff --git a/lib/OpenLayers/Layer/ArcIMS.js b/lib/OpenLayers/Layer/ArcIMS.js index bfe01811fa..9c6e20ee3d 100644 --- a/lib/OpenLayers/Layer/ArcIMS.js +++ b/lib/OpenLayers/Layer/ArcIMS.js @@ -272,7 +272,7 @@ OpenLayers.Layer.ArcIMS = OpenLayers.Class(OpenLayers.Layer.Grid, { * * Parameters: * id - {String} The ArcIMS layer ID. - * queryDef - {Object} The query definition to apply to this layer. + * querydef - {Object} The query definition to apply to this layer. */ setLayerQuery: function(id, querydef) { // find the matching layer, if it exists diff --git a/lib/OpenLayers/Layer/Google.js b/lib/OpenLayers/Layer/Google.js index 1e62ad655c..28a178603d 100644 --- a/lib/OpenLayers/Layer/Google.js +++ b/lib/OpenLayers/Layer/Google.js @@ -177,7 +177,7 @@ OpenLayers.Layer.Google = OpenLayers.Class( * Hide or show the Layer * * Parameters: - * display - {Boolean} + * visible - {Boolean} */ display: function(visible) { if (!this._dragging) { @@ -190,7 +190,7 @@ OpenLayers.Layer.Google = OpenLayers.Class( * Method: moveTo * * Parameters: - * bound - {} + * bounds - {} * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to * do some init work in that case. * dragging - {Boolean} diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 1e767f75dd..b5955160e5 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -762,7 +762,7 @@ OpenLayers.Layer.Grid = OpenLayers.Class(OpenLayers.Layer.HTTPRequest, { * resolution - {Number} * * Returns: - * Object containing properties tilelon, tilelat, tileoffsetlat, + * {Object} containing properties tilelon, tilelat, tileoffsetlat, * tileoffsetlat, tileoffsetx, tileoffsety */ calculateGridLayout: function(bounds, origin, resolution) { diff --git a/lib/OpenLayers/Layer/KaMap.js b/lib/OpenLayers/Layer/KaMap.js index a5bd44089b..ade1922755 100644 --- a/lib/OpenLayers/Layer/KaMap.js +++ b/lib/OpenLayers/Layer/KaMap.js @@ -92,7 +92,7 @@ OpenLayers.Layer.KaMap = OpenLayers.Class(OpenLayers.Layer.Grid, { * resolution - {Number} * * Returns: - * Object containing properties tilelon, tilelat, tileoffsetlat, + * {Object} Object containing properties tilelon, tilelat, tileoffsetlat, * tileoffsetlat, tileoffsetx, tileoffsety */ calculateGridLayout: function(bounds, origin, resolution) { diff --git a/lib/OpenLayers/Layer/MapGuide.js b/lib/OpenLayers/Layer/MapGuide.js index 680b8472c2..555d3509ac 100644 --- a/lib/OpenLayers/Layer/MapGuide.js +++ b/lib/OpenLayers/Layer/MapGuide.js @@ -449,7 +449,7 @@ OpenLayers.Layer.MapGuide = OpenLayers.Class(OpenLayers.Layer.Grid, { * resolution - {Number} * * Returns: - * Object containing properties tilelon, tilelat, tileoffsetlat, + * {Object} Object containing properties tilelon, tilelat, tileoffsetlat, * tileoffsetlat, tileoffsetx, tileoffsety */ calculateGridLayout: function(bounds, origin, resolution) { diff --git a/lib/OpenLayers/Layer/Vector.js b/lib/OpenLayers/Layer/Vector.js index 2857a82d7b..bbdfb668e4 100644 --- a/lib/OpenLayers/Layer/Vector.js +++ b/lib/OpenLayers/Layer/Vector.js @@ -936,7 +936,7 @@ OpenLayers.Layer.Vector = OpenLayers.Class(OpenLayers.Layer, { * attrValue - {Mixed} * * Returns: - * Array() An array of features that have the + * Array({}) An array of features that have the * passed named attribute set to the given value. */ getFeaturesByAttribute: function(attrName, attrValue) { diff --git a/lib/OpenLayers/Layer/WMTS.js b/lib/OpenLayers/Layer/WMTS.js index c82beb4d18..86312df607 100644 --- a/lib/OpenLayers/Layer/WMTS.js +++ b/lib/OpenLayers/Layer/WMTS.js @@ -296,7 +296,7 @@ OpenLayers.Layer.WMTS = OpenLayers.Class(OpenLayers.Layer.Grid, { * Method: moveTo * * Parameters: - * bound - {} + * bounds - {} * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to * do some init work in that case. * dragging - {Boolean} diff --git a/lib/OpenLayers/Layer/Zoomify.js b/lib/OpenLayers/Layer/Zoomify.js index 65fefac858..722ea3e471 100644 --- a/lib/OpenLayers/Layer/Zoomify.js +++ b/lib/OpenLayers/Layer/Zoomify.js @@ -261,7 +261,7 @@ OpenLayers.Layer.Zoomify = OpenLayers.Class(OpenLayers.Layer.Grid, { * resolution - {Number} * * Returns: - * Object containing properties tilelon, tilelat, tileoffsetlat, + * {Object} Object containing properties tilelon, tilelat, tileoffsetlat, * tileoffsetlat, tileoffsetx, tileoffsety */ calculateGridLayout: function(bounds, origin, resolution) { diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 016c4110b8..6749d53c64 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -2318,7 +2318,7 @@ OpenLayers.Map = OpenLayers.Class({ * Zoom to the full extent and recenter. * * Parameters: - * options - + * options - {Object} * * Allowed Options: * restricted - {Boolean} True to zoom to restricted extent if it is diff --git a/lib/OpenLayers/Marker.js b/lib/OpenLayers/Marker.js index 7a681d3c9c..ab591f60ce 100644 --- a/lib/OpenLayers/Marker.js +++ b/lib/OpenLayers/Marker.js @@ -64,6 +64,7 @@ OpenLayers.Marker = OpenLayers.Class({ /** * Constructor: OpenLayers.Marker + * * Parameters: * lonlat - {} the position of this marker * icon - {} the icon for this marker diff --git a/lib/OpenLayers/Protocol/SOS/v1_0_0.js b/lib/OpenLayers/Protocol/SOS/v1_0_0.js index 79b1415cf4..7db69130fb 100644 --- a/lib/OpenLayers/Protocol/SOS/v1_0_0.js +++ b/lib/OpenLayers/Protocol/SOS/v1_0_0.js @@ -38,6 +38,7 @@ * Parameters: * options - {Object} Optional object whose properties will be set on the * instance. + * * Valid options properties: * url - {String} URL to send requests to (required). * fois - {Array} The features of interest (required). diff --git a/lib/OpenLayers/Protocol/Script.js b/lib/OpenLayers/Protocol/Script.js index b298845586..f70fedbac0 100644 --- a/lib/OpenLayers/Protocol/Script.js +++ b/lib/OpenLayers/Protocol/Script.js @@ -340,7 +340,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { * Register a callback for a newly created script. * * Parameters: - * callback: {Function} The callback to be executed when the newly added + * callback - {Function} The callback to be executed when the newly added * script loads. This callback will be called with a single argument * that is the JSON returned by the service. * @@ -361,7 +361,7 @@ OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, { * Unregister a callback previously registered with the register function. * * Parameters: - * id: {Number} The identifer returned by the register function. + * id - {Number} The identifer returned by the register function. */ o.unregister = function(id) { delete o.registry[id]; diff --git a/lib/OpenLayers/Protocol/WFS.js b/lib/OpenLayers/Protocol/WFS.js index 797db493e7..c2e7e94781 100644 --- a/lib/OpenLayers/Protocol/WFS.js +++ b/lib/OpenLayers/Protocol/WFS.js @@ -54,6 +54,8 @@ OpenLayers.Protocol.WFS = function(options) { * FeatureType at the same server url with the same typename. * options - {Object} Default properties to be set on the protocol. * + * Returns: + * {} */ OpenLayers.Protocol.WFS.fromWMSLayer = function(layer, options) { var typeName, featurePrefix; diff --git a/lib/OpenLayers/Renderer.js b/lib/OpenLayers/Renderer.js index 3d7ffa1596..22273e06fb 100644 --- a/lib/OpenLayers/Renderer.js +++ b/lib/OpenLayers/Renderer.js @@ -170,7 +170,7 @@ OpenLayers.Renderer = OpenLayers.Class({ * Uses cached copy of resolution if available to minimize computing * * Returns: - * The current map's resolution + * {Float} The current map's resolution */ getResolution: function() { this.resolution = this.resolution || this.map.getResolution(); @@ -429,4 +429,4 @@ OpenLayers.Renderer.symbol = { "x": [0,0, 25,0, 50,35, 75,0, 100,0, 65,50, 100,100, 75,100, 50,65, 25,100, 0,100, 35,50, 0,0], "square": [0,0, 0,1, 1,1, 1,0, 0,0], "triangle": [0,10, 10,10, 5,0, 0,10] -}; \ No newline at end of file +}; diff --git a/lib/OpenLayers/Renderer/Elements.js b/lib/OpenLayers/Renderer/Elements.js index 11735f4eeb..68c4671332 100644 --- a/lib/OpenLayers/Renderer/Elements.js +++ b/lib/OpenLayers/Renderer/Elements.js @@ -150,7 +150,7 @@ OpenLayers.ElementsIndexer = OpenLayers.Class({ * APIMethod: exists * * Parameters: - * node- {DOMElement} The node to test for existence. + * node - {DOMElement} The node to test for existence. * * Returns: * {Boolean} Whether or not the node exists in the indexer? diff --git a/lib/OpenLayers/Strategy.js b/lib/OpenLayers/Strategy.js index 51b77a2105..ce18862e87 100644 --- a/lib/OpenLayers/Strategy.js +++ b/lib/OpenLayers/Strategy.js @@ -78,7 +78,7 @@ OpenLayers.Strategy = OpenLayers.Class({ * Called to set the property. * * Parameters: - * {} + * layer - {} */ setLayer: function(layer) { this.layer = layer; diff --git a/lib/OpenLayers/Strategy/BBOX.js b/lib/OpenLayers/Strategy/BBOX.js index 6d59e4c2ab..9c21b5868e 100644 --- a/lib/OpenLayers/Strategy/BBOX.js +++ b/lib/OpenLayers/Strategy/BBOX.js @@ -214,7 +214,8 @@ OpenLayers.Strategy.BBOX = OpenLayers.Class(OpenLayers.Strategy, { * Method: triggerRead * * Parameters: - * options - Additional options for the protocol's read method (optional) + * options - {Object} Additional options for the protocol's read method + * (optional) * * Returns: * {} The protocol response object diff --git a/lib/OpenLayers/Strategy/Filter.js b/lib/OpenLayers/Strategy/Filter.js index 4be870f6c1..43afbd877d 100644 --- a/lib/OpenLayers/Strategy/Filter.js +++ b/lib/OpenLayers/Strategy/Filter.js @@ -127,7 +127,7 @@ OpenLayers.Strategy.Filter = OpenLayers.Class(OpenLayers.Strategy, { * added to the layer. Others will be cached by the strategy. * * Parameters: - * filter - A filter for evaluating features. + * filter - {} A filter for evaluating features. */ setFilter: function(filter) { this.filter = filter; diff --git a/lib/OpenLayers/Strategy/Paging.js b/lib/OpenLayers/Strategy/Paging.js index 07f0f7c78c..4e967e86c9 100644 --- a/lib/OpenLayers/Strategy/Paging.js +++ b/lib/OpenLayers/Strategy/Paging.js @@ -146,7 +146,7 @@ OpenLayers.Strategy.Paging = OpenLayers.Class(OpenLayers.Strategy, { * Gets or sets page length. * * Parameters: - * newLength: {Integer} Optional length to be set. + * newLength - {Integer} Optional length to be set. * * Returns: * {Integer} The length of a page (number of features per page). diff --git a/lib/OpenLayers/Style.js b/lib/OpenLayers/Style.js index 1af88dfba2..ba94b81907 100644 --- a/lib/OpenLayers/Style.js +++ b/lib/OpenLayers/Style.js @@ -368,7 +368,7 @@ OpenLayers.Style = OpenLayers.Class({ * geometry type of the passed geometry * * Parameters: - * geometry {} + * geometry - {} * * Returns: * {String} key of the according symbolizer diff --git a/lib/OpenLayers/Tile.js b/lib/OpenLayers/Tile.js index d1d11eef8f..f65a56ed12 100644 --- a/lib/OpenLayers/Tile.js +++ b/lib/OpenLayers/Tile.js @@ -117,7 +117,9 @@ OpenLayers.Tile = OpenLayers.Class({ /** TBD 3.0 -- remove 'url' from the list of parameters to the constructor. * there is no need for the base tile class to have a url. - * + */ + + /** * Constructor: OpenLayers.Tile * Constructor for a new instance. * diff --git a/lib/OpenLayers/Tile/Image.js b/lib/OpenLayers/Tile/Image.js index aef46ff49e..a9a9195032 100644 --- a/lib/OpenLayers/Tile/Image.js +++ b/lib/OpenLayers/Tile/Image.js @@ -102,7 +102,9 @@ OpenLayers.Tile.Image = OpenLayers.Class(OpenLayers.Tile, { /** TBD 3.0 - reorder the parameters to the init function to remove * URL. the getUrl() function on the layer gets called on * each draw(), so no need to specify it here. - * + */ + + /** * Constructor: OpenLayers.Tile.Image * Constructor for a new instance. * diff --git a/lib/OpenLayers/Tween.js b/lib/OpenLayers/Tween.js index 85718c0953..5c1bbc2071 100644 --- a/lib/OpenLayers/Tween.js +++ b/lib/OpenLayers/Tween.js @@ -179,6 +179,9 @@ OpenLayers.Easing.Linear = { * b - {Float} beginning position * c - {Float} total change * d - {Float} duration of the transition + * + * Returns: + * {Float} */ easeIn: function(t, b, c, d) { return c*t/d + b; @@ -192,6 +195,9 @@ OpenLayers.Easing.Linear = { * b - {Float} beginning position * c - {Float} total change * d - {Float} duration of the transition + * + * Returns: + * {Float} */ easeOut: function(t, b, c, d) { return c*t/d + b; @@ -205,6 +211,9 @@ OpenLayers.Easing.Linear = { * b - {Float} beginning position * c - {Float} total change * d - {Float} duration of the transition + * + * Returns: + * {Float} */ easeInOut: function(t, b, c, d) { return c*t/d + b; @@ -226,6 +235,9 @@ OpenLayers.Easing.Expo = { * b - {Float} beginning position * c - {Float} total change * d - {Float} duration of the transition + * + * Returns: + * {Float} */ easeIn: function(t, b, c, d) { return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b; @@ -239,6 +251,9 @@ OpenLayers.Easing.Expo = { * b - {Float} beginning position * c - {Float} total change * d - {Float} duration of the transition + * + * Returns: + * {Float} */ easeOut: function(t, b, c, d) { return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b; @@ -252,6 +267,9 @@ OpenLayers.Easing.Expo = { * b - {Float} beginning position * c - {Float} total change * d - {Float} duration of the transition + * + * Returns: + * {Float} */ easeInOut: function(t, b, c, d) { if (t==0) return b; @@ -276,6 +294,9 @@ OpenLayers.Easing.Quad = { * b - {Float} beginning position * c - {Float} total change * d - {Float} duration of the transition + * + * Returns: + * {Float} */ easeIn: function(t, b, c, d) { return c*(t/=d)*t + b; @@ -289,6 +310,9 @@ OpenLayers.Easing.Quad = { * b - {Float} beginning position * c - {Float} total change * d - {Float} duration of the transition + * + * Returns: + * {Float} */ easeOut: function(t, b, c, d) { return -c *(t/=d)*(t-2) + b; @@ -302,6 +326,9 @@ OpenLayers.Easing.Quad = { * b - {Float} beginning position * c - {Float} total change * d - {Float} duration of the transition + * + * Returns: + * {Float} */ easeInOut: function(t, b, c, d) { if ((t/=d/2) < 1) return c/2*t*t + b; diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 5ca8c35201..dbb278bcf1 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -933,7 +933,7 @@ OpenLayers.Util.lastSeqID = 0; * prefix (defaults to "id_") appended with the counter value. * * Parameters: - * prefix {String} Optionsal string to prefix unique id. Default is "id_". + * prefix - {String} Optional string to prefix unique id. Default is "id_". * * Returns: * {String} A unique id string, built on the passed in prefix. @@ -1250,6 +1250,9 @@ OpenLayers.Util.pagePosition = function(forElement) { * document.body or document.documentElement, depending on the document's * compatibility mode (see * http://code.google.com/p/doctype/wiki/ArticleClientViewportElement) + * + * Returns: + * {DOMElement} */ OpenLayers.Util.getViewportElement = function() { var viewportElement = arguments.callee.viewportElement; From 8d6bddf0acb6608a6f5d402e2ccfb9deb3d59ddc Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 5 Mar 2012 22:11:36 -0700 Subject: [PATCH 3/6] A simple zoom control with zoom in/out links. The zoom control allows for zoom in/out links that can be styled with CSS. Note: This change was originally captured in #269. It involves nice additions thanks @ahocevar. The changes were unintentionally merged and then reverted with fb3caf1561f9db9c4516b12cd712217a04910cf8, so the history of commits is not immediately apparent (though still likely there somewhere due to the magic of git). --- examples/zoom.html | 68 ++++++++++++++++ examples/zoom.js | 34 ++++++++ lib/OpenLayers.js | 1 + lib/OpenLayers/Control/Zoom.js | 139 +++++++++++++++++++++++++++++++++ tests/Control/Zoom.html | 81 +++++++++++++++++++ tests/list-tests.html | 1 + theme/default/style.css | 38 +++++++++ 7 files changed, 362 insertions(+) create mode 100644 examples/zoom.html create mode 100644 examples/zoom.js create mode 100644 lib/OpenLayers/Control/Zoom.js create mode 100644 tests/Control/Zoom.html diff --git a/examples/zoom.html b/examples/zoom.html new file mode 100644 index 0000000000..7b15297d05 --- /dev/null +++ b/examples/zoom.html @@ -0,0 +1,68 @@ + + + + + + + OpenLayers Zoom Example + + + + + +

Zoom Control Example

+
zoom control
+ +
Shows how to use a simple zoom control.
+ +
+

The map above uses the default control configuration and style.

+

The map below uses the custom zoom elements and styling.

+
+
+ in + out +
+
+ +
+

This example demonstrates the use of a Zoom control.

+

+ See the zoom.js source + for details. +

+
+ + + + diff --git a/examples/zoom.js b/examples/zoom.js new file mode 100644 index 0000000000..08694ccad4 --- /dev/null +++ b/examples/zoom.js @@ -0,0 +1,34 @@ +var map = new OpenLayers.Map({ + div: "map", + layers: [new OpenLayers.Layer.OSM()], + controls: [ + new OpenLayers.Control.Navigation({ + dragPanOptions: { + enableKinetic: true + } + }), + new OpenLayers.Control.Attribution(), + new OpenLayers.Control.Zoom() + ], + center: [0, 0], + zoom: 1 +}); + +var map2 = new OpenLayers.Map({ + div: "map2", + layers: [new OpenLayers.Layer.OSM()], + controls: [ + new OpenLayers.Control.Navigation({ + dragPanOptions: { + enableKinetic: true + } + }), + new OpenLayers.Control.Attribution(), + new OpenLayers.Control.Zoom({ + zoomInId: "customZoomIn", + zoomOutId: "customZoomOut" + }) + ], + center: [0, 0], + zoom: 1 +}); diff --git a/lib/OpenLayers.js b/lib/OpenLayers.js index b67381d4b5..fdc91bd366 100644 --- a/lib/OpenLayers.js +++ b/lib/OpenLayers.js @@ -204,6 +204,7 @@ "OpenLayers/Control/Graticule.js", "OpenLayers/Control/TransformFeature.js", "OpenLayers/Control/SLDSelect.js", + "OpenLayers/Control/Zoom.js", "OpenLayers/Geometry.js", "OpenLayers/Geometry/Collection.js", "OpenLayers/Geometry/Point.js", diff --git a/lib/OpenLayers/Control/Zoom.js b/lib/OpenLayers/Control/Zoom.js new file mode 100644 index 0000000000..eb212eeb83 --- /dev/null +++ b/lib/OpenLayers/Control/Zoom.js @@ -0,0 +1,139 @@ +/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Control.js + * @requires OpenLayers/Events/buttonclick.js + */ + +/** + * Class: OpenLayers.Control.Zoom + * The Zoom control is a pair of +/- links for zooming in and out. + * + * Inherits from: + * - + */ +OpenLayers.Control.Zoom = OpenLayers.Class(OpenLayers.Control, { + + /** + * APIProperty: zoomInText + * {String} + * Text for zoom-in link. Default is "+". + */ + zoomInText: "+", + + /** + * APIProperty: zoomInId + * {String} + * Instead of having the control create a zoom in link, you can provide + * the identifier for an anchor element already added to the document. + * By default, an element with id "olZoomInLink" will be searched for + * and used if it exists. + */ + zoomInId: "olZoomInLink", + + /** + * APIProperty: zoomOutText + * {String} + * Text for zoom-out link. Default is "-". + */ + zoomOutText: "-", + + /** + * APIProperty: zoomOutId + * {String} + * Instead of having the control create a zoom out link, you can provide + * the identifier for an anchor element already added to the document. + * By default, an element with id "olZoomOutLink" will be searched for + * and used if it exists. + */ + zoomOutId: "olZoomOutLink", + + /** + * Method: draw + * + * Returns: + * {DOMElement} A reference to the DOMElement containing the zoom links. + */ + draw: function() { + var div = OpenLayers.Control.prototype.draw.apply(this), + links = this.getOrCreateLinks(div), + zoomIn = links.zoomIn, + zoomOut = links.zoomOut, + bind = OpenLayers.Function.bind, + eventsInstance = this.map.events; + + if (zoomOut.parentNode !== div) { + eventsInstance = this.events; + eventsInstance.attachToElement(zoomOut.parentNode); + } + eventsInstance.register("buttonclick", this, this.onZoomClick); + + this.zoomInLink = zoomIn; + this.zoomOutLink = zoomOut; + return div; + }, + + /** + * Method: getOrCreateLinks + * + * Parameters: + * el - {DOMElement} + * + * Return: + * {Object} Object with zoomIn and zoomOut properties referencing links. + */ + getOrCreateLinks: function(el) { + var zoomIn = document.getElementById(this.zoomInId), + zoomOut = document.getElementById(this.zoomOutId); + if (!zoomIn) { + zoomIn = document.createElement("a"); + zoomIn.href = "#zoomIn"; + zoomIn.appendChild(document.createTextNode(this.zoomInText)); + zoomIn.className = "olControlZoomIn"; + el.appendChild(zoomIn); + } + OpenLayers.Element.addClass(zoomIn, "olButton"); + if (!zoomOut) { + zoomOut = document.createElement("a"); + zoomOut.href = "#zoomOut"; + zoomOut.appendChild(document.createTextNode(this.zoomOutText)); + zoomOut.className = "olControlZoomOut"; + el.appendChild(zoomOut); + } + OpenLayers.Element.addClass(zoomOut, "olButton"); + return { + zoomIn: zoomIn, zoomOut: zoomOut + }; + }, + + /** + * Method: onZoomClick + * Called when zoomin/out link is clicked. + */ + onZoomClick: function(evt) { + var button = evt.buttonElement; + if (button === this.zoomInLink) { + this.map.zoomIn(); + } else if (button === this.zoomOutLink) { + this.map.zoomOut(); + } + }, + + /** + * Method: destroy + * Clean up. + */ + destroy: function() { + if (this.map) { + this.map.events.unregister("buttonclick", this, this.onZoomClick); + } + delete this.zoomInLink; + delete this.zoomOutLink; + OpenLayers.Control.prototype.destroy.apply(this); + }, + + CLASS_NAME: "OpenLayers.Control.Zoom" +}); diff --git a/tests/Control/Zoom.html b/tests/Control/Zoom.html new file mode 100644 index 0000000000..c27161dab8 --- /dev/null +++ b/tests/Control/Zoom.html @@ -0,0 +1,81 @@ + + + + + + + +
+
in
out + + diff --git a/tests/list-tests.html b/tests/list-tests.html index 92ebdec19a..7c4cb1d402 100644 --- a/tests/list-tests.html +++ b/tests/list-tests.html @@ -45,6 +45,7 @@
  • Control/WMTSGetFeatureInfo.html
  • Control/PanPanel.html
  • Control/SLDSelect.html
  • +
  • Control/Zoom.html
  • Events.html
  • Events/buttonclick.html
  • Extras.html
  • diff --git a/theme/default/style.css b/theme/default/style.css index c695689ff7..179b3c2ada 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -429,6 +429,44 @@ span.olGoogleAttribution.hybrid a, span.olGoogleAttribution.satellite a { background-position: -26px -24px; } +div.olControlZoom { + position: absolute; + top: 8px; + left: 8px; +} +div.olControlZoom a { + display: block; + margin: 2px; + padding: 0 4px; + color: white; + font-size: 18px; + font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif; + font-weight: bold; + text-decoration: none; + text-align: center; + height: 22px; + width: 15px; + line-height: 22px; + background: #666666; /* fallback for IE - IE6 requires background shorthand*/ + background: rgba(0, 0, 0, 0.3); + border: 1px solid; + border-color: #ffffff; /* fallback for IE */ + border-color: rgba(255, 255, 255, 0.6); + filter: alpha(opacity=60); +} +div.olControlZoom a:hover { + background: #444444; /* fallback for IE */ + background: rgba(0, 0, 0, 0.5); + filter: alpha(opacity=80); +} +a.olControlZoomIn { + border-radius: 5px 5px 0 0; +} +a.olControlZoomOut { + border-radius: 0 0 5px 5px; +} + + /** * Animations */ From 35a6407820b21e86d1355e1130a9560a883084a4 Mon Sep 17 00:00:00 2001 From: Antoine Abt Date: Tue, 6 Mar 2012 09:16:09 +0100 Subject: [PATCH 4/6] cosmetic changes on zoom control --- theme/default/style.css | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/theme/default/style.css b/theme/default/style.css index 179b3c2ada..f18e3209d5 100644 --- a/theme/default/style.css +++ b/theme/default/style.css @@ -436,8 +436,8 @@ div.olControlZoom { } div.olControlZoom a { display: block; - margin: 2px; - padding: 0 4px; + margin: 1px; + padding: 0; color: white; font-size: 18px; font-family: 'Lucida Grande', Verdana, Geneva, Lucida, Arial, Helvetica, sans-serif; @@ -445,13 +445,10 @@ div.olControlZoom a { text-decoration: none; text-align: center; height: 22px; - width: 15px; - line-height: 22px; + width:22px; + line-height: 19px; background: #666666; /* fallback for IE - IE6 requires background shorthand*/ background: rgba(0, 0, 0, 0.3); - border: 1px solid; - border-color: #ffffff; /* fallback for IE */ - border-color: rgba(255, 255, 255, 0.6); filter: alpha(opacity=60); } div.olControlZoom a:hover { @@ -460,10 +457,10 @@ div.olControlZoom a:hover { filter: alpha(opacity=80); } a.olControlZoomIn { - border-radius: 5px 5px 0 0; + border-radius: 4px 4px 0 0; } a.olControlZoomOut { - border-radius: 0 0 5px 5px; + border-radius: 0 0 4px 4px; } From 81b2b524ec52be1193367349925e63789e3661b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 6 Mar 2012 09:26:02 +0100 Subject: [PATCH 5/6] add pl.js to API docs, refs #241 --- apidoc_config/Menu.txt | 1 + doc_config/Menu.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/apidoc_config/Menu.txt b/apidoc_config/Menu.txt index 93d68c2a33..e372a59b09 100644 --- a/apidoc_config/Menu.txt +++ b/apidoc_config/Menu.txt @@ -319,6 +319,7 @@ Group: OpenLayers { File: nn (no auto-title, OpenLayers/Lang/nn.js) File: oc (no auto-title, OpenLayers/Lang/oc.js) File: pt (no auto-title, OpenLayers/Lang/pt.js) + File: pl (no auto-title, OpenLayers/Lang/pl.js) File: pt-BR (no auto-title, OpenLayers/Lang/pt-BR.js) File: ru (no auto-title, OpenLayers/Lang/ru.js) File: sk (no auto-title, OpenLayers/Lang/sk.js) diff --git a/doc_config/Menu.txt b/doc_config/Menu.txt index 1a941749ae..edbae8e2e8 100644 --- a/doc_config/Menu.txt +++ b/doc_config/Menu.txt @@ -319,6 +319,7 @@ Group: OpenLayers { File: nl (no auto-title, OpenLayers/Lang/nl.js) File: nn (no auto-title, OpenLayers/Lang/nn.js) File: oc (no auto-title, OpenLayers/Lang/oc.js) + File: pl (no auto-title, OpenLayers/Lang/pl.js) File: pt (no auto-title, OpenLayers/Lang/pt.js) File: pt-BR (no auto-title, OpenLayers/Lang/pt-BR.js) File: ru (no auto-title, OpenLayers/Lang/ru.js) From 93028bbcf88efbbc0ed6a15f55261990fa63fba5 Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Tue, 6 Mar 2012 10:08:19 +0000 Subject: [PATCH 6/6] Map: defaults controls should include TouchNavigation if present --- lib/OpenLayers/Map.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/OpenLayers/Map.js b/lib/OpenLayers/Map.js index 016c4110b8..da173fceef 100644 --- a/lib/OpenLayers/Map.js +++ b/lib/OpenLayers/Map.js @@ -193,8 +193,8 @@ OpenLayers.Map = OpenLayers.Class({ * {Array()} List of controls associated with the map. * * If not provided in the map options at construction, the map will - * be given the following controls by default: - * - + * by default be given the following controls if present in the build: + * - or * - * - * - @@ -588,20 +588,23 @@ OpenLayers.Map = OpenLayers.Class({ } } - if (this.controls == null) { + if (this.controls == null) { // default controls this.controls = []; if (OpenLayers.Control != null) { // running full or lite? + // Navigation or TouchNavigation depending on what is in build if (OpenLayers.Control.Navigation) { - this.controls.push(new OpenLayers.Control.Navigation()) + this.controls.push(new OpenLayers.Control.Navigation()); + } else if (OpenLayers.Control.TouchNavigation) { + this.controls.push(new OpenLayers.Control.TouchNavigation()); } if (OpenLayers.Control.PanZoom) { - this.controls.push(new OpenLayers.Control.PanZoom()) + this.controls.push(new OpenLayers.Control.PanZoom()); } if (OpenLayers.Control.ArgParser) { - this.controls.push(new OpenLayers.Control.ArgParser()) + this.controls.push(new OpenLayers.Control.ArgParser()); } if (OpenLayers.Control.Attribution) { - this.controls.push(new OpenLayers.Control.Attribution()) + this.controls.push(new OpenLayers.Control.Attribution()); } } }