diff --git a/doc/authors.txt b/authors.txt similarity index 100% rename from doc/authors.txt rename to authors.txt diff --git a/build/license.txt b/build/license.txt index 38898679e1..9bbec2f8fd 100644 --- a/build/license.txt +++ b/build/license.txt @@ -2,7 +2,7 @@ OpenLayers.js -- OpenLayers Map Viewer Library - Copyright 2005-2011 OpenLayers Contributors, released under the FreeBSD + Copyright 2005-2012 OpenLayers Contributors, released under the FreeBSD license. Please see http://svn.openlayers.org/trunk/openlayers/license.txt for the full text of the license. diff --git a/doc/customization b/doc/customization deleted file mode 100644 index f4b5b98aa9..0000000000 --- a/doc/customization +++ /dev/null @@ -1,49 +0,0 @@ -Customizing OpenLayers -====================== - -OpenLayers is designed to fit many needs -- fitting in alongside all kinds of -various applications which are currently in use. - -Currently, OpenLayers supports a 'theme' option when creating a map. This -theme option allows you to specify the location of a CSS theme which should -be included. - -A default theme is available as an example in the theme/ directory: the setup -is: - - * theme/ - * theme/default/ - * theme/default/style.css - * theme/default/img/ - -Currently, the OpenLayers code does not support class names, and therefore, -it is not possible to control many aspects of OpenLayers code with CSS -classes. However, with this framework in place, we expect to invest time -to make existing features and new features use the CSS theming framework -where apropriate. - - -Class Naming -============ -Elements should have class names which are descriptive of the Javascript -class from which they come. For example, the main layer switcher element -in the OpenLayers.Control.LayerSwitcher would be classed: - - olControlLayerSwitcher - -This would allow users to add to their style.css class in their theme, -changing, for example: - -:: - - .olControlLayerSwitcher input { - width:10px; - } - -Sub elements of a particular control can add to the class name: - -:: - - .olControlLayerSwitcherBaseLabel { - color: red; - } diff --git a/doc/readme.txt b/doc/readme.txt deleted file mode 100644 index d02540af67..0000000000 --- a/doc/readme.txt +++ /dev/null @@ -1,7 +0,0 @@ -Automatically generated OpenLayers API documentation is online: - - http://dev.openlayers.org/apidocs - -More information on documentation is available from: - - http://trac.openlayers.org/wiki/Documentation diff --git a/examples/fusiontables.html b/examples/fusiontables.html new file mode 100644 index 0000000000..8c75d6c1a3 --- /dev/null +++ b/examples/fusiontables.html @@ -0,0 +1,32 @@ + + + + OpenLayers Example For Reading Features From Google Fusion Tables + + + + + + + + +

Reading Features From A Google Fusion Tables Table

+
+ protocol, script, fusion tables +
+

+ Demonstrates how, with a custom read method, the script protocol and GeoJSON format can be used to read features stored in a table on Google Fusion Tables. +

+
+
+

+ Google Fusion Tables can be used to store features, and access them using SQL-type commands over HTTP. Tables can be made public, in which case no authorization is needed to read them. Geometries can be stored in Location columns in KML format. The default output is a CSV dump of each table row/column selected. Multi-line CSV files are not easy to parse in Javascript, but by adding a jsonCallback parameter to the HTTP command, the output will be a JSON object with the geometry as GeoJSON. With a custom read method, this example parses the geometry for each row, storing the other columns as feature attributes. You can of course add a 'where' clause to the SQL statement or change the column names to limit the data retrieved. Point geometries can also be stored in Latitude/Longitude columns, and the script could easily be modified to use those instead. +

+

+ View the fusiontables.js + source to see how this is done. Table used +

+
+ + + diff --git a/examples/fusiontables.js b/examples/fusiontables.js new file mode 100644 index 0000000000..aec2d86612 --- /dev/null +++ b/examples/fusiontables.js @@ -0,0 +1,46 @@ +var map = new OpenLayers.Map({ + div: "map", + layers: [ + new OpenLayers.Layer.OSM(), + new OpenLayers.Layer.Vector("Vectors", { + projection: new OpenLayers.Projection("EPSG:4326"), + strategies: [new OpenLayers.Strategy.Fixed()], + protocol: new OpenLayers.Protocol.Script({ + url: "https://www.google.com/fusiontables/api/query", + params: {sql: "select * from 1g5DrXcdotCiO_yffkdW0zhuJk0a1i80SPvERHI8"}, + format: new OpenLayers.Format.GeoJSON({ + ignoreExtraDims: true, + read: function(json) { + var row, feature, atts = {}, features = []; + var cols = json.table.cols; // column names + for (var i = 0; i < json.table.rows.length; i++) { + row = json.table.rows[i]; + feature = new OpenLayers.Feature.Vector(); + atts = {}; + for (var j = 0; j < row.length; j++) { + // 'location's are json objects, other types are strings + if (typeof row[j] === "object") { + feature.geometry = this.parseGeometry(row[j]); + } else { + atts[cols[j]] = row[j]; + } + } + feature.attributes = atts; + // if no geometry, not much point in continuing with this row + if (feature.geometry) { + features.push(feature); + } + } + return features; + } + }), + callbackKey: "jsonCallback" + }), + eventListeners: { + "featuresadded": function () { + this.map.zoomToExtent(this.getDataExtent()); + } + } + }) + ] +}); diff --git a/examples/graticule.html b/examples/graticule.html index 514f191e7b..c5a116d9f0 100644 --- a/examples/graticule.html +++ b/examples/graticule.html @@ -93,7 +93,7 @@

Graticule Example

- graticule, grid + graticule, grid, projection, proj4js, reproject, transform

diff --git a/examples/strategy-bbox.html b/examples/strategy-bbox.html index 3b53c778da..1674113829 100644 --- a/examples/strategy-bbox.html +++ b/examples/strategy-bbox.html @@ -10,20 +10,46 @@ @@ -56,7 +86,7 @@

BBOX Strategy Example

- vector, feature, stylemap, wfs, bbox, strategy, cleanup + vector, feature, stylemap, bbox, strategy, script, flickr

Uses a BBOX strategy to request features within a bounding box. @@ -67,6 +97,10 @@ previously requested data bounds are invalidated (by browsing to some area not covered by those bounds), another request for data is issued.

+ +

This particular example uses the Flickr API.

+ diff --git a/examples/strategy-cluster.html b/examples/strategy-cluster.html index bebbfddc82..e4ca7ce0e7 100644 --- a/examples/strategy-cluster.html +++ b/examples/strategy-cluster.html @@ -70,20 +70,45 @@