Skip to content

Commit

Permalink
fixed type issues
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Deubler <[email protected]>
  • Loading branch information
TerminalTim committed Nov 25, 2024
1 parent b697ae4 commit c974a4d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 20 deletions.
19 changes: 0 additions & 19 deletions packages/core/src/features/Feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,25 +113,6 @@ export class Feature<GeometryType = string> implements GeoJSONFeature<GeometryTy
// need for quick data merge across multiple tile searches
private _m: number = 0;

/**
* pointerenter event listener for internal use only
* @hidden
* @internal
*/
pointerenter: () => void;
/**
* pointerleave event listener for internal use only
* @hidden
* @internal
*/
pointerleave: () => void;
/**
* pointerup event listener for internal use only
* @hidden
* @internal
*/
pointerup: () => void;

constructor(feature: GeoJSONFeature<GeometryType>, prov?: FeatureProvider) {
this.id = feature.id;

Expand Down
21 changes: 21 additions & 0 deletions packages/editor/src/features/feature/Feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {EditorFeatureProperties, DefaultEditorProperties} from './EditorProperti
import {FeatureProperties} from './Properties';
import InternalEditor from '../../IEditor';
import {GeoJSONCoordinate} from '@here/xyz-maps-core';
import {MapEvent} from '@here/xyz-maps-display';


type EditableProvider = EditableRemoteTileProvider;
Expand Down Expand Up @@ -87,6 +88,26 @@ class Feature extends GeoJSONFeature {
[privateProperty: string]: any
};

/**
* pointerenter event listener for internal use only
* @hidden
* @internal
*/
pointerenter: (e?: MapEvent) => void;
/**
* pointerleave event listener for internal use only
* @hidden
* @internal
*/
pointerleave: (e: MapEvent) => void;
/**
* pointerup event listener for internal use only
* @hidden
* @internal
*/
pointerup: (e: MapEvent) => void;


constructor(geojsonFeature, provider?: EditableProvider) {
super(geojsonFeature, provider);
// @ts-ignore
Expand Down
4 changes: 3 additions & 1 deletion packages/editor/src/tools/turnrestriction/TurnRestriction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@ import {movePointOnPath} from '../../geometry';
import linkTools from '../../features/link/NavlinkTools';
import {isTurnAllowed, isPedestrianOnly, getProperty, setProperty} from './utils';
import Overlay from '../../features/Overlay';
import {Feature} from '../../features/feature/Feature';
import {Navlink} from '../../features/link/Navlink';
import InternalEditor from '../../IEditor';


const DISTANCE_METER = 8 * 1e-5;

const TURN_RESTRICTION = 'TURN_RESTRICTION_';
Expand Down Expand Up @@ -70,7 +72,7 @@ class TurnRestriction {
type: TURN_RESTRICTION + 'LINE',
sign: TURN_RESTRICTION + curSign
});
const sign = overlay.addImage(rotPnt, null, {
const sign = <Feature>overlay.addImage(rotPnt, null, {
'type': TURN_RESTRICTION + curSign,
'rotation': -geotools.calcBearing(p1, rotPnt)
});
Expand Down

0 comments on commit c974a4d

Please sign in to comment.