- webpack config separation for development and production
- load only the necessary classes from leaflet
This commit is contained in:
parent
7857e2c5bb
commit
bc44385846
13 changed files with 883 additions and 209 deletions
|
|
@ -4,18 +4,19 @@ import '../styles.css';
|
|||
|
||||
import { ParameterFilter, Phenomenon, Station } from '@helgoland/core';
|
||||
import { GeoSearchOptions, LayerOptions } from '@helgoland/map';
|
||||
import * as L from 'leaflet';
|
||||
import { Marker, MapOptions, Control, icon, LatLngBoundsExpression } from 'leaflet';
|
||||
// optional, to adapt leaflet markers
|
||||
L.Marker.prototype.options.icon = L.icon({
|
||||
iconRetinaUrl: 'assets/img/marker-icon-2x.png',
|
||||
iconUrl: 'assets/img/marker-icon.png',
|
||||
shadowUrl: 'assets/img/marker-shadow.png',
|
||||
iconSize: [25, 41],
|
||||
iconAnchor: [12, 41],
|
||||
popupAnchor: [1, -34],
|
||||
tooltipAnchor: [16, -28],
|
||||
shadowSize: [41, 41]
|
||||
});
|
||||
|
||||
Marker.prototype.options.icon = icon({
|
||||
iconRetinaUrl: 'assets/img/marker-icon-2x.png',
|
||||
iconUrl: 'assets/img/marker-icon.png',
|
||||
shadowUrl: 'assets/img/marker-shadow.png',
|
||||
iconSize: [25, 41],
|
||||
iconAnchor: [12, 41],
|
||||
popupAnchor: [1, -34],
|
||||
tooltipAnchor: [16, -28],
|
||||
shadowSize: [41, 41]
|
||||
});
|
||||
|
||||
|
||||
@Component({
|
||||
|
|
@ -39,25 +40,25 @@ export class AppComponent {
|
|||
// public providerUrl = 'https://geo.irceline.be/sos/api/v2/';
|
||||
public providerUrl = 'https://geomon.geologie.ac.at/52n-sos-webapp/api/';
|
||||
|
||||
public fitBounds: L.LatLngBoundsExpression = [[49.5, 3.27], [51.5, 5.67]];
|
||||
public fitBounds: LatLngBoundsExpression = [[ 9.47996951665, 46.4318173285], [16.9796667823, 49.0390742051]];
|
||||
// public zoomControlOptions: L.Control.ZoomOptions = { position: 'topleft' };
|
||||
public avoidZoomToSelection = false;
|
||||
public baseMaps: Map<string, LayerOptions> = new Map<string, LayerOptions>();
|
||||
public overlayMaps: Map<string, LayerOptions> = new Map<string, LayerOptions>();
|
||||
public layerControlOptions: L.Control.LayersOptions = { position: 'bottomleft' };
|
||||
public layerControlOptions: Control.LayersOptions = { position: 'bottomleft' };
|
||||
public cluster = false;
|
||||
public loadingStations: boolean;
|
||||
public stationFilter: ParameterFilter = {
|
||||
// phenomenon: '8'
|
||||
};
|
||||
public statusIntervals = false;
|
||||
public mapOptions: L.MapOptions = { dragging: true, zoomControl: false };
|
||||
public mapOptions: MapOptions = { dragging: true, zoomControl: false };
|
||||
|
||||
public onStationSelected(station: Station) {
|
||||
private onStationSelected(station: Station) {
|
||||
console.log('Clicked station: ' + station.properties.label);
|
||||
}
|
||||
|
||||
mapInitialized(newItem: string) {
|
||||
private onMapInitialized(newItem: string) {
|
||||
// alert(newItem);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue