Fixing the test :

* There is a new required parameter in OpenLayers.
* Explicitly set the type of void functions !

I also add some tests.
This commit is contained in:
aba
2016-02-05 19:47:36 +01:00
parent de36bab90b
commit dff6dc8250
2 changed files with 38 additions and 15 deletions

View File

@@ -360,10 +360,22 @@ var imageWMS: ol.source.ImageWMS = new ol.source.ImageWMS({
// ol.source.TileWMS
//
var tileWMS: ol.source.TileWMS = new ol.source.TileWMS({
params: {},
serverType: stringValue,
url:stringValue
});
//
// ol.source.WMTS
//
var wmts: ol.source.WMTS = new ol.source.WMTS({
tileGrid: new ol.tilegrid.WMTS({}),
layer: "",
style: "",
matrixSet: "",
wrapX: true
});
//
// ol.animation
//
@@ -521,3 +533,14 @@ jsonValue = geojsonFormat.writeFeaturesObject(featureArray);
jsonValue = geojsonFormat.writeFeaturesObject(featureArray, writeOptions);
jsonValue = geojsonFormat.writeGeometryObject(geometry);
jsonValue = geojsonFormat.writeGeometryObject(geometry, writeOptions);
//
// ol.interactions
//
var modify: ol.interaction.Modify = new ol.interaction.Modify({
features: new ol.Collection<ol.Feature>(featureArray)
});
var draw: ol.interaction.Draw = new ol.interaction.Draw({
type: "Point"
})

View File

@@ -2888,7 +2888,7 @@ declare module ol {
* @param destination The desired projection. Can be a string identifier or a ol.proj.Projection object.
* @return This geometry. Note that original geometry is modified in place.
*/
transform(source: ol.proj.ProjectionLike, destination: ol.proj.ProjectionLike);
transform(source: ol.proj.ProjectionLike, destination: ol.proj.ProjectionLike): ol.geom.Geometry;
}
/**
@@ -4104,18 +4104,18 @@ declare module ol {
* Add a single feature to the source. If you want to add a batch of features at once,
* call source.addFeatures() instead.
*/
addFeature(feature: ol.Feature);
addFeature(feature: ol.Feature):void;
/**
* Add a batch of features to the source.
*/
addFeatures(features: ol.Feature[]);
addFeatures(features: ol.Feature[]):void;
/**
* Remove all features from the source.
* @param Skip dispatching of removefeature events.
*/
clear(fast?: boolean);
clear(fast?: boolean):void;
/**
* Get the extent of the features currently in the source.
*/
@@ -4194,9 +4194,9 @@ declare module ol {
getScale(): number;
getSnapToPiexl(): boolean;
setOpacity(opacity: number);
setRotation(rotation: number);
setScale(scale: number);
setOpacity(opacity: number):void;
setRotation(rotation: number):void;
setScale(scale: number):void;
}
interface GeometryFunction {
@@ -4214,12 +4214,12 @@ declare module ol {
getLineJoin(): string;
getMitterLimit(): number;
getWidth(): number;
setColor(color: ol.Color|string);
setLineCap(lineCap: string);
setLineDash(lineDash: number[]);
setLineJoin(lineJoin: string);
setMiterLimit(miterLimit: number);
setWidth(width: number);
setColor(color: ol.Color|string):void;
setLineCap(lineCap: string):void;
setLineDash(lineDash: number[]):void;
setLineJoin(lineJoin: string):void;
setMiterLimit(miterLimit: number):void;
setWidth(width: number):void;
}
/**
@@ -4243,8 +4243,8 @@ declare module ol {
getText(): ol.style.Text;
getZIndex(): number;
setGeometry(geometry: string | ol.geom.Geometry | ol.style.GeometryFunction);
setZIndex( zIndex: number);
setGeometry(geometry: string | ol.geom.Geometry | ol.style.GeometryFunction):void;
setZIndex( zIndex: number):void;
}
/**