Optional extra stops to refine extent transforms
Add optional extra stops to refine some non-parallel transforms Refine extent transforms use by Gratucule by using 32 points (8 per side) instead of the standard corners only transform Update Graticule class description with current limitations Correct projection extent in Mollweide example and revise opening zoom level correspondingly
This commit is contained in:
@@ -476,12 +476,14 @@ export function transform(coordinate, source, destination) {
|
||||
* @param {import("./extent.js").Extent} extent The extent to transform.
|
||||
* @param {ProjectionLike} source Source projection-like.
|
||||
* @param {ProjectionLike} destination Destination projection-like.
|
||||
* @param {number=} opt_stops Number of stops per side used for the transform.
|
||||
* By default only the corners are used.
|
||||
* @return {import("./extent.js").Extent} The transformed extent.
|
||||
* @api
|
||||
*/
|
||||
export function transformExtent(extent, source, destination) {
|
||||
export function transformExtent(extent, source, destination, opt_stops) {
|
||||
const transformFunc = getTransform(source, destination);
|
||||
return applyTransform(extent, transformFunc);
|
||||
return applyTransform(extent, transformFunc, undefined, opt_stops);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user