Desktop density and script coordinates
The desktop map uses egui's current display density. Script project, unproject, queryRenderedFeatures, padding and layer styles remain in logical pixels. Actual GPU textures, image dimensions and RGBA rows use physical pixels. Scripts do not multiply screen points by the display ratio.
| Value | Unit |
|---|---|
| Camera viewport.width/height, screen points, padding | Logical pixels |
| viewport.pixelRatio | Physical pixels per logical pixel |
| Image width/height and RGBA row length | Physical pixels |
| Zoom and imagery resource LOD | Logical camera semantics |
A 516×353 logical viewport at pixelRatio=2 produces a 1032×706 image. Fractional density can yield fractional logical dimensions: a physical 746×639 target at 1.25 has a 596.8×511.2 logical viewport. Requests, style widths and text layout use the logical camera. Basemap imagery projects logical corners into the actual dense target; local and online export imagery is sampled again at physical pixel centres.
import { map } from 'sqsmap';
map.jumpTo({ center: [181, 40], zoom: 19, pitch: 65, bearing: 33,
padding: { left: 30, right: 2, top: 15, bottom: 4 } });
const receipt = await map.sqs.flush({ render: true });
const point = await map.project([181, 40]);
const features = await map.queryRenderedFeatures(point);
console.log(receipt.cameraState.viewport, point, features);
flush({render:true}) waits for an actual frame drawn after that command. Motion can still be running; command application alone does not certify a drawn image. Window or density changes preflight device budgets and padding, then end the old animation with the historical reason viewport-change. Provisional layout after changing interface zoom neither allocates a map target nor reports drawing success.
Local acceptance covers actual Linux desktop windows at densities1/1.25/2, the shared pitched script, paint changes and rendering during animation, plus four-density basemap GPU and export sampling tests. Offline background globe and legacy planar3D sessions verify physical targets and 2x exports. Complex globe business content, terrain, point clouds and density transitions still require further acceptance. Software GPU does not replace Windows/macOS, mobile devices, hardware or formal-release acceptance.
See native display density for Rust host entries and the script reference for full script signatures.