Description
The Print plugin does not allow configuring which projection is selected by default when the print dialog opens. The selection always fell back to the map projection or EPSG:3857.
Solution
Projection options are already supported via projectionOptions.projections (list of available CRS in the dropdown). The plugin should now support an optional default projection so the dialog opens with a chosen CRS pre-selected.
Configuration
Under the Print plugin cfg, use projectionOptions.defaultProjection. It should be one of the values from your projectionOptions.projections list.
Example (localConfig.json):
{
"name": "Print",
"cfg": {
"projectionOptions": {
"projections": [
{"name": "EPSG:32122 (Ohio North)", "value": "EPSG:32122"},
{"name": "EPSG:3857", "value": "EPSG:3857"},
{"name": "EPSG:4326", "value": "EPSG:4326"}
],
"defaultProjection": "EPSG:32122"
}
}
}
If defaultProjection is omitted, behavior is unchanged (map projection or EPSG:3857).
What kind of improvement you want to add? (check one with "x", remove the others)
Other useful information
Note: For any projection other than EPSG:4326 or EPSG:3857, you must define it in projectionDefs (with code, def, extent, worldExtent) so the map and preview render correctly.
Description
The Print plugin does not allow configuring which projection is selected by default when the print dialog opens. The selection always fell back to the map projection or EPSG:3857.
Solution
Projection options are already supported via
projectionOptions.projections(list of available CRS in the dropdown). The plugin should now support an optional default projection so the dialog opens with a chosen CRS pre-selected.Configuration
Under the Print plugin
cfg, useprojectionOptions.defaultProjection. It should be one of the values from yourprojectionOptions.projectionslist.Example (
localConfig.json):{ "name": "Print", "cfg": { "projectionOptions": { "projections": [ {"name": "EPSG:32122 (Ohio North)", "value": "EPSG:32122"}, {"name": "EPSG:3857", "value": "EPSG:3857"}, {"name": "EPSG:4326", "value": "EPSG:4326"} ], "defaultProjection": "EPSG:32122" } } }If
defaultProjectionis omitted, behavior is unchanged (map projection or EPSG:3857).What kind of improvement you want to add? (check one with "x", remove the others)
Other useful information
Note: For any projection other than EPSG:4326 or EPSG:3857, you must define it in
projectionDefs(withcode,def,extent,worldExtent) so the map and preview render correctly.