mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-06 13:11:46 +00:00
add setExtent to ol.proj.Projection and make transform ol.geom.Point accept ol.proj.Projection (#9076)
* make transform `ol.geom.Point` accept `ol.proj.Projection` * transform is described here: http://openlayers.org/en/v3.0.0/apidoc/ol.geom.Point.html#transform ** "Can be a string identifier or a ol.proj.Projection object." * add `setExtent` to ol.proj.Projection * setExtent is described here: http://openlayers.org/en/v3.0.0/apidoc/ol.proj.Projection.html#setExtent ** "Type `ol.Extent`"
This commit is contained in:
committed by
Horiuchi_H
parent
067edc80b9
commit
cf059e978e
@@ -136,6 +136,7 @@ coordinate = geometryResult.getClosestPoint(coordinate);
|
||||
geometryResult.getClosestPoint(coordinate, coordinate);
|
||||
extent = geometryResult.getExtent();
|
||||
geometryResult.getExtent(extent);
|
||||
geometryResult.transform(projection, projection);
|
||||
|
||||
//
|
||||
//
|
||||
@@ -337,6 +338,7 @@ var tileLayer: ol.layer.Tile = new ol.layer.Tile({
|
||||
projection = new ol.proj.Projection({
|
||||
code:stringValue,
|
||||
});
|
||||
projection.setExtent(projection.getExtent());
|
||||
|
||||
//
|
||||
// ol.Map
|
||||
|
||||
Vendored
+7
-1
@@ -2936,7 +2936,7 @@ declare namespace 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): ol.geom.Geometry;
|
||||
transform(source: ol.proj.ProjectionLike | ol.proj.Projection, destination: ol.proj.ProjectionLike | ol.proj.Projection): ol.geom.Geometry;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4054,6 +4054,12 @@ declare namespace ol {
|
||||
constructor(options: olx.Projection);
|
||||
|
||||
getExtent(): Extent;
|
||||
|
||||
/**
|
||||
* Set the validity extent for this projection.
|
||||
* @param extent The new extent of the projection.
|
||||
*/
|
||||
setExtent(extent: Extent): void;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user