@dlr-eoc/map-ol
Advanced tools
Comparing version 11.1.0 to 12.0.0-alpha.1
import { ApplicationRef, EnvironmentInjector } from '@angular/core'; | ||
import { Layer, popup, TGeoExtent } from '@dlr-eoc/services-layers'; | ||
import { Layer, popup, TGeoExtent, IPopupParams, IAnyObject } from '@dlr-eoc/services-layers'; | ||
import olMap from 'ol/Map'; | ||
@@ -21,22 +21,6 @@ import olView, { FitOptions as olFitOptions } from 'ol/View'; | ||
export declare type Tgroupfiltertype = 'baselayers' | 'layers' | 'overlays' | 'Baselayers' | 'Overlays' | 'Layers'; | ||
/** | ||
* While @dlr-eoc/services-layers.popup already contains instructions about how to build a popup, | ||
* IPopupArgs adds additional, map-ol-specific context like the olLayer, the feature, and the olMapBrowserEvent. | ||
*/ | ||
export interface IPopupArgs { | ||
modelName: string; | ||
properties: popup['properties']; | ||
layer: olLayer<any>; | ||
feature?: olFeature<any> | olRenderFeature; | ||
event: olMapBrowserEvent<PointerEvent>; | ||
popupFn?: popup['popupFunction']; | ||
dynamicPopup?: popup['dynamicPopup']; | ||
export interface IPopupEvent { | ||
popupObj: popup; | ||
popupParams: IPopupParams; | ||
} | ||
export interface IDynamicPopupArgs { | ||
properties: popup['properties']; | ||
layer: IPopupArgs['layer']; | ||
feature?: IPopupArgs['feature']; | ||
event: olMapBrowserEvent<PointerEvent>; | ||
dynamicPopup: popup['dynamicPopup']; | ||
} | ||
export declare class MapOlService { | ||
@@ -59,2 +43,3 @@ private app; | ||
private dynamicPopupComponents; | ||
popupEvents: Subject<IPopupEvent>; | ||
constructor(app: ApplicationRef, envInjector: EnvironmentInjector); | ||
@@ -270,2 +255,3 @@ /** | ||
* - opacity > 0 | ||
* - check for popup.asObservable and create map | ||
* - pixel coordinate in layer extent | ||
@@ -287,2 +273,3 @@ * - layer has popup | ||
* 3. set cursor for Layers with a color value or feature | ||
* if no layer has been hit and the map popup.asObservable has items, then publish a null event for them | ||
* 4. differentiate between raster and vector | ||
@@ -292,3 +279,3 @@ * | ||
* 6. overwrite properties if popup property is: popup | popup[] | ||
* 7. check for popupFunction, asyncPopup and dynamicPopup | ||
* 7. check for popupFunction, asyncPopup, dynamicPopup and asObservable | ||
* 8. use addPopup() or addPopupObj() | ||
@@ -308,2 +295,10 @@ * | ||
/** | ||
* Check for popup.asObservable to publish null properties if layer is not hit. | ||
*/ | ||
private checkForPopupAsObservable; | ||
/** | ||
* Publish null properties for popup.asObservable if layer is not hit. | ||
*/ | ||
private publishNullPropertiesAsObservable; | ||
/** | ||
* To filtered out layers with no popup or show the popup beneath e.g. text overlays | ||
@@ -326,4 +321,8 @@ * in map.forEachLayerAtPixel for raster and map.forEachFeatureAtPixel for vector | ||
rasterOnEvent(evt: olMapBrowserEvent<PointerEvent>, layer: olLayer<any>, color?: Uint8ClampedArray | Uint8Array | Float32Array | DataView): void; | ||
/** | ||
* @param featurProperties: properties of olFeature | ||
*/ | ||
private prepareAddPopup; | ||
addPopup(args: IPopupArgs, popupObj: any, html?: string, event?: 'click' | 'move', removePopups?: boolean): void; | ||
private publishPopupEvent; | ||
addPopup(popupParams: IPopupParams, popupObj?: popup, popupContent?: string | IAnyObject, event?: 'click' | 'move', removePopups?: boolean): void; | ||
private createPopupContainer; | ||
@@ -381,3 +380,3 @@ /** USED in map-ol.component */ | ||
/** USED in map-ol.component */ | ||
setZoom(zoom: number, notifier?: 'map' | 'user'): void; | ||
setZoom(zoom: number): void; | ||
/** USED in map-ol.component */ | ||
@@ -384,0 +383,0 @@ getZoom(): number; |
{ | ||
"name": "@dlr-eoc/map-ol", | ||
"version": "11.1.0", | ||
"version": "12.0.0-alpha.1", | ||
"main": "src/public-api", | ||
@@ -20,5 +20,5 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@dlr-eoc/services-map-state": "11.1.0", | ||
"@dlr-eoc/services-layers": "11.1.0", | ||
"@dlr-eoc/utils-maps": "11.1.0", | ||
"@dlr-eoc/services-map-state": "12.0.0-alpha.1", | ||
"@dlr-eoc/services-layers": "12.0.0-alpha.1", | ||
"@dlr-eoc/utils-maps": "12.0.0-alpha.1", | ||
"ol": "^7.3.0", | ||
@@ -25,0 +25,0 @@ "ol-mapbox-style": "^9.2.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1106526
9267
2
+ Added@dlr-eoc/services-layers@12.0.0-alpha.1(transitive)
+ Added@dlr-eoc/services-map-state@12.0.0-alpha.1(transitive)
+ Added@dlr-eoc/utils-maps@12.0.0-alpha.1(transitive)
- Removed@dlr-eoc/services-layers@11.1.0(transitive)
- Removed@dlr-eoc/services-map-state@11.1.0(transitive)
- Removed@dlr-eoc/utils-maps@11.1.0(transitive)