@geosdi/ngx-radar-dpc-plugin
v1.0.1
Published
Service to add radar-dpc layer to map
Downloads
36
Maintainers
Readme
NgxRadarDpcPlugin
Installation
npm i npm i earcutnpm i @geosdi/ngx-radar-dpc-plugin --save
Usage
init(map:Map, options:Partial<RadarPluginOptions> = {});
import { radarPlugin } from '@geosdi/ngx-radar-dpc-plugin';
addPlugin()
{
this.map = L.map('map', {
zoomControl: false,
preferCanvas: true,
}).setView([41.9, 12.5], 5);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap',
}).addTo(this.map);
radarPlugin.init(this.map, {
geocoding: true,
history: true,
download: true,
});
}
Options
| Option | Type | Default | Description
|-----------|---------|---------|-----------------------------|
| geocoding | boolean | true | enable the geocoding button |
| history | boolean | true | enable the history button |
| download | boolean | true | enable the download button |
Events
| Option | Description | data |
|----------------|------------------------------------------------------------|----------------------------------------------------------------------------------------------------|
| ws-new-product | Fired when a new product is notified by the websocket | period,productType,time |
| change-product | Fired executed when you change the product view on the map | allowedTiles,css_class,css_legend_class,description,key,label,legend,range_time,srcMax,srcMin,unit |
| change-history | Fired when you change the date view for history | active,maxDate,minDate |
Usage
radarPlugin.on('ws-new-product', (data) => {
});
radarPlugin.on('change-product', (data) => {
});
radarPlugin.on('change-history', (data) => {
});Product types
In the URL you can pass a query string: ?productType=VMI to select the product to display. By default it is VMI.
- VMI
- SRI
- CUM1
- CUM3
- CUM6
- CUM12
- CUM24
- TEMP
- IR_108
