Filter: gfpdf_gv_static_map_viewport
Filter the viewport (centre + zoom) used for the Static Map.
Defaults to null on every map — the PDF never derives a centre from the request — so returning a value here is the only way to override the default marker-fit framing. Return null to keep it, or an array [ 'lat' => float, 'lng' => float, 'zoom' => int\|null ] to force a centre. A null zoom keeps the View's configured zoom.
Parameters
| Name | Type | Description |
|---|---|---|
| $viewport | array|null | Always null by default. |
| $view | \View | |
| $entry | array | |
| $field | \GV\Field|\GV\Widget|null | The entry_map field being rendered — or, on a map drawn over a whole result set, the Map widget it is drawn for. |
| $context | string | RenderContext::SINGLE or RenderContext::DIRECTORY. |
Since
- 2.0
Source
Defined in src/Pdf/Maps/StaticMapRenderer.php at line 1540