Skip to content

Commit

Permalink
satisfy updated mapbox types
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesmac committed Oct 7, 2024
1 parent fc244d7 commit 2a5f678
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/sdk/packages/map/src/MapBoxClasses/MapHeat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { forget } from '@xylabs/forget'
import { GeoJson } from '@xyo-network/sdk-geo'
import type { Feature, Polygon } from 'geojson'
import type {
DataDrivenPropertyValueSpecification,
GeoJSONSource, GeoJSONSourceSpecification, Map, MapOptions,
} from 'mapbox-gl'
import { LngLatBounds } from 'mapbox-gl'
Expand Down Expand Up @@ -79,7 +80,7 @@ export class MapHeat extends MapBase<Polygon> {
const highUsageColor = endColor ?? '#FF0000'

// Max density at i=0, min density at i=steps
const dynamicFillColor = (factor: number, initialPad: number, i: number) => {
const dynamicFillColor = (factor: number, initialPad: number, i: number): DataDrivenPropertyValueSpecification<string> => {
const sinFade = Math.sin(((i / steps) * Math.PI) / 2)
const cosFade = Math.cos(((i / steps) * Math.PI) / 2)
// we want the divisor to always be at least 1x the desired factor but will go up to
Expand Down

0 comments on commit 2a5f678

Please sign in to comment.