Skip to main content

queryWindow

The box a query layer asks for when the map shows view: the view with a margin, snapped outward to a grid in proportion to its size. A few pixels of panning give the same window, so they send the same request (and the same cache entry), and a small pan stays inside the window and needs none. Latitudes are kept within what a map shows, and longitudes within -180 to 180, except that a view across the antimeridian gets a window across it: the short box, with west inside -180 to 180 and east past 180 (see queryBoxes for the boxes to ask a provider). A view that does not cross the line gets a window that stops at it, margin or not.

This is a function exported by @mapcairn/core, checked against version 0.2.0.

Signature​

import { queryWindow } from "@mapcairn/core";

function queryWindow(view: Bounds): Bounds;

Parameters​

  • view (Bounds)

Returns​

Bounds

See also​

Source: packages/core/src/layers/query.ts:55