UNPKG

thematic-earth

Version:

HTML-based, whole-Earth thematic maps using locally hosted data layers

2 lines 1.06 kB
/* Copyright (c) 2023 Read Write Tools. Legal use subject to the Thematic Earth Software License Agreement. */ import BaseFeature from'./base-feature.class.js';import expect from'../dev/expect.js';export default class GeneralFeature extends BaseFeature{constructor(e,t){super(),this.kvPairs=e,this.generalFeatureType=t}get featureType(){return this.generalFeatureType}computeFeatureStyle(e,t,r,a,s,o){expect(t,'Visualizer'),expect(r,'String'),expect(a,'String'),expect(s,'Number'),expect(o,'Number');let p=t.computeStyle(this.generalFeatureType,r,a,!1,'',this.kvPairs,s);expect(p,'CanvasParams'),this.setCanvasParamsPerLayerId(o,p)}runCourtesyValidator(e,t,r,a,s){e.runCourtesyValidator(this.generalFeatureType,t,r,'',this.kvPairs,a)}toGeoCoords(e,t){}toPlane(e,t){}toPixels(e,t){expect(e,'RenderClock'),expect(t,'CartesianTransformation')}toViewportCanvas(e,t){expect(e,'RenderClock'),expect(t,'Viewport')}drawFeature(e,t,r){expect(e,'RenderClock'),expect(t,'Earth'),expect(r,'Layer'),terminal.logic('Feature subclass must provide a drawFeature() function')}}