Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@giscience/ol-print-layout-control
Advanced tools
An extension of an OpenLayers Control. It Helps the user to define a map area that fits to the desired output page format and orientation.
Add this OpenLayers-Control to your OpenLayers-Map.
It Helps the user to define a map area that fits to the desired output page format and orientation.
Works with ol@^7.0.0.
https://user-images.githubusercontent.com/2814068/195790425-99978d1a-6619-47a9-93b5-8c642664af5e.mp4
Load ol-print-layout-control.js
after OpenLayers.
It will be available as new ol.control.PrintLayout()
<script src="https://unpkg.com/@giscience/ol-print-layout-control"></script>
<link rel="stylesheet" href="https://unpkg.com/@giscience/ol-print-layout-control/dist/ol-print-layout-control.css" />
<script>
const map = new ol.Map({
target: 'map',
view: new ol.View({
center: ol.proj.fromLonLat([8.68, 49.41]),
zoom: 15
}),
layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
]
});
const printLayoutControl = new ol.control.PrintLayout({
format: PAPER_FORMAT.A3,
orientation: ORIENTATION.LANDSCAPE,
margin: {top: 2, bottom: 2, left: 2, right: 2}
});
map.addControl(printLayoutControl);
</script>
Install the npm package: @giscience/ol-print-layout-control
After import
from the module it will be available as new PrintLayout()
.
npm install @giscience/ol-print-layout-control
Extends Control
The print-layout-control. Add an instance of this to your OpenLayers Map.
opt_options
Options (optional, default {}
)Options
{format: 'A4', orientation: 'portrait', margin: {top: 2, bottom: 2, left: 2, right: 2}}] opt_optionsorientation
ORIENTATION format
any Returns Margin
margin
Margin Computes the scale denominator for the printed map
Get the print box size (width, height) in dots (px) for printing.
This is useful to determine the OGC-WMS params 'WIDTH' and 'HEIGHT'
dpi
{number} the desired print resolution in dots-per-inch (dpi) (optional, default 192
)Returns {width: number, height: number}
Type: {top: number, bottom: number, left: number, right: number}
Extends OlObject
The Margin Class to set paper margins in cm.
marginProps
Partial<MarginProps> (optional, default {}
)Returns MarginProps
topMarginInCm
number bottomMarginInCm
number leftMarginInCm
number rightMarginInCm
number Originally ol-print-layout-control
has been developed for the
SketchMapTool.
FAQs
An extension of an OpenLayers Control. It Helps the user to define a map area that fits to the desired output page format and orientation.
The npm package @giscience/ol-print-layout-control receives a total of 13 weekly downloads. As such, @giscience/ol-print-layout-control popularity was classified as not popular.
We found that @giscience/ol-print-layout-control demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.