Skip to content

Commit

Permalink
Merge pull request #361 from gberaudo/udpate_dependencies_for_release
Browse files Browse the repository at this point in the history
Update dependencies for release
  • Loading branch information
gberaudo committed May 30, 2016
2 parents b069f73 + ac6d52a commit 2ea22cf
Show file tree
Hide file tree
Showing 15 changed files with 74 additions and 90 deletions.
17 changes: 17 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"extends": "openlayers",
"rules": {
"no-console": 0,
"no-extra-boolean-cast": 0,
"brace-style": 0,
"no-multiple-empty-lines": 0,
"valid-jsdoc": 0
},
"globals": {
"ol": false,
"goog": false,
"Cesium": false,
"olcs": false,
"proj4": false
}
}
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
language: python
sudo: false
cache:
directories:
Expand Down
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog

## v 1.16 - 2016-05-30

* Changes
* Switch to eslint.
* Update npm dependencies.
* Port to Cesium 1.21.
* Port to OL 3.16.0.
* Add support for drawing rectangles according to the longitude and latitude
curves instead of straight lines. This functionality can be activated by
setting the olcs.polygon_kind property to 'rectangle' on the OpenLayers
Expand Down
14 changes: 3 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dist-apidoc:
node node_modules/.bin/jsdoc -c build/jsdoc/api/conf.json -d dist/apidoc

.PHONY: lint
lint: .build/python-venv/bin/gjslint .build/gjslint.timestamp
lint: .build/node_modules.timestamp .build/eslint.timestamp
@build/check-no-goog.sh

.build/geojsonhint.timestamp: $(EXAMPLES_GEOJSON_FILES)
Expand Down Expand Up @@ -81,8 +81,8 @@ cleanall: clean
mkdir -p $(dir $@)
touch $@

.build/gjslint.timestamp: $(SRC_JS_FILES)
.build/python-venv/bin/gjslint --jslint_error=all --strict --custom_jsdoc_tags=api $?
.build/eslint.timestamp: $(SRC_JS_FILES)
./node_modules/.bin/eslint $?
touch $@

.build/dist-examples.timestamp: cesium/Build/Cesium/Cesium.js cesium/Build/CesiumUnminified/Cesium.js dist/ol3cesium.js $(EXAMPLES_JS_FILES) $(EXAMPLES_HTML_FILES)
Expand All @@ -98,14 +98,6 @@ cleanall: clean
for f in dist/examples/*.html; do $(SEDI) 'sY../ol3/css/ol.cssY../ol.cssY' $$f; done
touch $@

.build/python-venv:
mkdir -p $(dir $@)
virtualenv --no-site-packages $@

.build/python-venv/bin/gjslint: .build/python-venv
.build/python-venv/bin/pip install "http://closure-linter.googlecode.com/files/closure_linter-latest.tar.gz"
touch $@

dist/ol3cesium-debug.js: build/ol3cesium-debug.json $(SRC_JS_FILES) Cesium.externs.js build/build.js npm-install
mkdir -p $(dir $@)
node build/build.js $< $@
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ Requirements for building OL3-Cesium:

* [GNU Make](http://www.gnu.org/software/make/)
* [Node.js](http://nodejs.org/)
* [Python](http://python.org/)
* [Ant](http://ant.apache.org/)

To get started, clone the [OL3-Cesium repository](https://github.com/openlayers/ol3-cesium) with its submodules:

Expand Down
1 change: 0 additions & 1 deletion build/ol3cesium.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
],
"jscomp_off": [
"useOfGoogBase",
"unnecessaryCasts",
"lintChecks",
"analyzerChecks"
],
Expand Down
2 changes: 1 addition & 1 deletion cesium
2 changes: 1 addition & 1 deletion ol3
Submodule ol3 updated from cd3287 to 1038b2
11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
"htmlparser2": "3.9.0"
},
"devDependencies": {
"closure-util": "1.13.0",
"geojsonhint": "1.2.0",
"fs-extra": "0.26.7",
"graceful-fs": "4.1.3",
"closure-util": "1.14.0",
"geojsonhint": "1.2.1",
"fs-extra": "0.30.0",
"graceful-fs": "4.1.4",
"jsdoc": "~3.4.0",
"jshint": "2.9.1",
"eslint": "2.11.0",
"eslint-config-openlayers": "4.1.0",
"nomnom": "1.8.1",
"temp": "0.8.3",
"walk": "2.3.9"
Expand Down
6 changes: 2 additions & 4 deletions src/abstractsynchronizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,7 @@ olcs.AbstractSynchronizer.prototype.addLayers_ = function(root) {
* @return {boolean} counterpart destroyed
* @private
*/
olcs.AbstractSynchronizer.prototype.removeAndDestroySingleLayer_ =
function(layer) {
olcs.AbstractSynchronizer.prototype.removeAndDestroySingleLayer_ = function(layer) {
var uid = goog.getUid(layer);
var counterparts = this.layerMap[uid];
if (!!counterparts) {
Expand All @@ -160,8 +159,7 @@ olcs.AbstractSynchronizer.prototype.removeAndDestroySingleLayer_ =
* @param {ol.layer.Group} group
* @private
*/
olcs.AbstractSynchronizer.prototype.unlistenSingleGroup_ =
function(group) {
olcs.AbstractSynchronizer.prototype.unlistenSingleGroup_ = function(group) {
if (group === this.mapLayerGroup) {
return;
}
Expand Down
3 changes: 1 addition & 2 deletions src/autorenderloop.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ olcs.AutoRenderLoop.prototype.enable = function() {
};

// Hacky way to force a repaint when a web worker sends something back.
Cesium.TaskProcessor.prototype.scheduleTask =
function(parameters, transferableObjects) {
Cesium.TaskProcessor.prototype.scheduleTask = function(parameters, transferableObjects) {
var result = that._originalScheduleTask.call(this, parameters,
transferableObjects);

Expand Down
76 changes: 28 additions & 48 deletions src/featureconverter.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ olcs.FeatureConverter.prototype.onRemoveOrClearFeature_ = function(evt) {
* @param {!Cesium.Primitive|Cesium.Label|Cesium.Billboard} primitive
* @protected
*/
olcs.FeatureConverter.prototype.setReferenceForPicking =
function(layer, feature, primitive) {
olcs.FeatureConverter.prototype.setReferenceForPicking = function(layer, feature, primitive) {
primitive.olLayer = layer;
primitive.olFeature = feature;
};
Expand All @@ -92,8 +91,7 @@ olcs.FeatureConverter.prototype.setReferenceForPicking =
* @return {Cesium.Primitive}
* @protected
*/
olcs.FeatureConverter.prototype.createColoredPrimitive =
function(layer, feature, olGeometry, geometry, color, opt_lineWidth) {
olcs.FeatureConverter.prototype.createColoredPrimitive = function(layer, feature, olGeometry, geometry, color, opt_lineWidth) {
var createInstance = function(geometry, color) {
return new Cesium.GeometryInstance({
// always update Cesium externs before adding a property
Expand Down Expand Up @@ -157,8 +155,7 @@ olcs.FeatureConverter.prototype.createColoredPrimitive =
* @return {!Cesium.Color}
* @protected
*/
olcs.FeatureConverter.prototype.extractColorFromOlStyle =
function(style, outline) {
olcs.FeatureConverter.prototype.extractColorFromOlStyle = function(style, outline) {
var fillColor = style.getFill() ? style.getFill().getColor() : null;
var strokeColor = style.getStroke() ? style.getStroke().getColor() : null;

Expand All @@ -180,8 +177,7 @@ olcs.FeatureConverter.prototype.extractColorFromOlStyle =
* @return {number}
* @protected
*/
olcs.FeatureConverter.prototype.extractLineWidthFromOlStyle =
function(style) {
olcs.FeatureConverter.prototype.extractLineWidthFromOlStyle = function(style) {
var width = style.getStroke() ? style.getStroke().getWidth() : 1;
return Math.min(width, this.scene.maximumAliasedLineWidth);
};
Expand All @@ -199,28 +195,26 @@ olcs.FeatureConverter.prototype.extractLineWidthFromOlStyle =
* @return {!Cesium.PrimitiveCollection}
* @protected
*/
olcs.FeatureConverter.prototype.wrapFillAndOutlineGeometries =
function(layer, feature, olGeometry, fillGeometry, outlineGeometry,
olStyle) {
olcs.FeatureConverter.prototype.wrapFillAndOutlineGeometries = function(layer, feature, olGeometry, fillGeometry, outlineGeometry, olStyle) {
var fillColor = this.extractColorFromOlStyle(olStyle, false);
var outlineColor = this.extractColorFromOlStyle(olStyle, true);

var primitives = new Cesium.PrimitiveCollection();
if (olStyle.getFill()) {
var p = this.createColoredPrimitive(layer, feature, olGeometry,
var p1 = this.createColoredPrimitive(layer, feature, olGeometry,
fillGeometry, fillColor);
goog.asserts.assert(!!p);
primitives.add(p);
goog.asserts.assert(!!p1);
primitives.add(p1);
}

if (olStyle.getStroke()) {
var width = this.extractLineWidthFromOlStyle(olStyle);
var p = this.createColoredPrimitive(layer, feature, olGeometry,
var p2 = this.createColoredPrimitive(layer, feature, olGeometry,
outlineGeometry, outlineColor, width);
if (p) {
if (p2) {
// Some outline geometries are not supported by Cesium in clamp to ground
// mode. These primitives are skipped.
primitives.add(p);
primitives.add(p2);
}
}

Expand All @@ -240,8 +234,7 @@ olcs.FeatureConverter.prototype.wrapFillAndOutlineGeometries =
* @return {!Cesium.PrimitiveCollection}
* @protected
*/
olcs.FeatureConverter.prototype.addTextStyle =
function(layer, feature, geometry, style, primitive) {
olcs.FeatureConverter.prototype.addTextStyle = function(layer, feature, geometry, style, primitive) {
var primitives;
if (!(primitive instanceof Cesium.PrimitiveCollection)) {
primitives = new Cesium.PrimitiveCollection();
Expand Down Expand Up @@ -276,8 +269,7 @@ olcs.FeatureConverter.prototype.addTextStyle =
* @return {!Cesium.Billboard} newly created billboard
* @api
*/
olcs.FeatureConverter.prototype.csAddBillboard =
function(billboards, bbOptions, layer, feature, geometry, style) {
olcs.FeatureConverter.prototype.csAddBillboard = function(billboards, bbOptions, layer, feature, geometry, style) {
var bb = billboards.add(bbOptions);
this.setReferenceForPicking(layer, feature, bb);
return bb;
Expand All @@ -294,8 +286,7 @@ olcs.FeatureConverter.prototype.csAddBillboard =
* @return {!Cesium.PrimitiveCollection} primitives
* @api
*/
olcs.FeatureConverter.prototype.olCircleGeometryToCesium =
function(layer, feature, olGeometry, projection, olStyle) {
olcs.FeatureConverter.prototype.olCircleGeometryToCesium = function(layer, feature, olGeometry, projection, olStyle) {

olGeometry = olcs.core.olGeometryCloneTo4326(olGeometry, projection);
goog.asserts.assert(olGeometry.getType() == 'Circle');
Expand Down Expand Up @@ -345,8 +336,7 @@ olcs.FeatureConverter.prototype.olCircleGeometryToCesium =
* @return {!Cesium.PrimitiveCollection} primitives
* @api
*/
olcs.FeatureConverter.prototype.olLineStringGeometryToCesium =
function(layer, feature, olGeometry, projection, olStyle) {
olcs.FeatureConverter.prototype.olLineStringGeometryToCesium = function(layer, feature, olGeometry, projection, olStyle) {

olGeometry = olcs.core.olGeometryCloneTo4326(olGeometry, projection);
goog.asserts.assert(olGeometry.getType() == 'LineString');
Expand Down Expand Up @@ -391,8 +381,7 @@ olcs.FeatureConverter.prototype.olLineStringGeometryToCesium =
* @return {!Cesium.PrimitiveCollection} primitives
* @api
*/
olcs.FeatureConverter.prototype.olPolygonGeometryToCesium =
function(layer, feature, olGeometry, projection, olStyle) {
olcs.FeatureConverter.prototype.olPolygonGeometryToCesium = function(layer, feature, olGeometry, projection, olStyle) {

olGeometry = olcs.core.olGeometryCloneTo4326(olGeometry, projection);
goog.asserts.assert(olGeometry.getType() == 'Polygon');
Expand Down Expand Up @@ -476,8 +465,7 @@ olcs.FeatureConverter.prototype.olPolygonGeometryToCesium =
* @return {!Cesium.HeightReference}
* @api
*/
olcs.FeatureConverter.prototype.getHeightReference =
function(layer, feature, geometry) {
olcs.FeatureConverter.prototype.getHeightReference = function(layer, feature, geometry) {

// Read from the geometry
var altitudeMode = geometry.get('altitudeMode');
Expand Down Expand Up @@ -516,8 +504,7 @@ olcs.FeatureConverter.prototype.getHeightReference =
* @return {Cesium.Primitive} primitives
* @api
*/
olcs.FeatureConverter.prototype.olPointGeometryToCesium =
function(layer, feature, olGeometry, projection, style, billboards,
olcs.FeatureConverter.prototype.olPointGeometryToCesium = function(layer, feature, olGeometry, projection, style, billboards,
opt_newBillboardCallback) {
goog.asserts.assert(olGeometry.getType() == 'Point');
olGeometry = olcs.core.olGeometryCloneTo4326(olGeometry, projection);
Expand Down Expand Up @@ -631,8 +618,7 @@ olcs.FeatureConverter.prototype.olPointGeometryToCesium =
* @return {Cesium.Primitive} primitives
* @api
*/
olcs.FeatureConverter.prototype.olMultiGeometryToCesium =
function(layer, feature, geometry, projection, olStyle, billboards,
olcs.FeatureConverter.prototype.olMultiGeometryToCesium = function(layer, feature, geometry, projection, olStyle, billboards,
opt_newBillboardCallback) {
// Do not reproject to 4326 now because it will be done later.

Expand Down Expand Up @@ -693,8 +679,7 @@ olcs.FeatureConverter.prototype.olMultiGeometryToCesium =
* @return {Cesium.LabelCollection} Cesium primitive
* @api
*/
olcs.FeatureConverter.prototype.olGeometry4326TextPartToCesium =
function(layer, feature, geometry, style) {
olcs.FeatureConverter.prototype.olGeometry4326TextPartToCesium = function(layer, feature, geometry, style) {
var text = style.getText();
goog.asserts.assert(goog.isDef(text));

Expand Down Expand Up @@ -795,8 +780,7 @@ olcs.FeatureConverter.prototype.olGeometry4326TextPartToCesium =
* @return {Cesium.Material}
* @api
*/
olcs.FeatureConverter.prototype.olStyleToCesium =
function(feature, style, outline) {
olcs.FeatureConverter.prototype.olStyleToCesium = function(feature, style, outline) {
var fill = style.getFill();
var stroke = style.getStroke();
if ((outline && !stroke) || (!outline && !fill)) {
Expand Down Expand Up @@ -834,8 +818,7 @@ olcs.FeatureConverter.prototype.olStyleToCesium =
* @return {ol.style.Style} null if no style is available
* @api
*/
olcs.FeatureConverter.prototype.computePlainStyle =
function(layer, feature, fallbackStyleFunction, resolution) {
olcs.FeatureConverter.prototype.computePlainStyle = function(layer, feature, fallbackStyleFunction, resolution) {
/**
* @type {ol.FeatureStyleFunction|undefined}
*/
Expand Down Expand Up @@ -877,8 +860,7 @@ olcs.FeatureConverter.prototype.computePlainStyle =
* @return {Cesium.Primitive} primitives
* @api
*/
olcs.FeatureConverter.prototype.olFeatureToCesium =
function(layer, feature, style, context, opt_geom) {
olcs.FeatureConverter.prototype.olFeatureToCesium = function(layer, feature, style, context, opt_geom) {
var geom = opt_geom || feature.getGeometry();
var proj = context.projection;
if (!geom) {
Expand Down Expand Up @@ -932,13 +914,13 @@ olcs.FeatureConverter.prototype.olFeatureToCesium =
case 'MultiPoint':
case 'MultiLineString':
case 'MultiPolygon':
var result = this.olMultiGeometryToCesium(layer, feature, geom, proj,
var result2 = this.olMultiGeometryToCesium(layer, feature, geom, proj,
style, context.billboards, newBillboardAddedCallback);
if (!result) {
if (!result2) {
// no wrapping primitive
return null;
} else {
return result;
return result2;
}
case 'LinearRing':
throw new Error('LinearRing should only be part of polygon.');
Expand All @@ -958,8 +940,7 @@ olcs.FeatureConverter.prototype.olFeatureToCesium =
* @return {!olcs.core.VectorLayerCounterpart}
* @api
*/
olcs.FeatureConverter.prototype.olVectorLayerToCesium =
function(olLayer, olView, featurePrimitiveMap) {
olcs.FeatureConverter.prototype.olVectorLayerToCesium = function(olLayer, olView, featurePrimitiveMap) {
var proj = olView.getProjection();
var resolution = olView.getResolution();

Expand Down Expand Up @@ -1025,8 +1006,7 @@ olcs.FeatureConverter.prototype.olVectorLayerToCesium =
* @return {Cesium.Primitive}
* @api
*/
olcs.FeatureConverter.prototype.convert =
function(layer, view, feature, context) {
olcs.FeatureConverter.prototype.convert = function(layer, view, feature, context) {
var proj = view.getProjection();
var resolution = view.getResolution();

Expand Down
Loading

0 comments on commit 2ea22cf

Please sign in to comment.