Skip to content

Commit

Permalink
deploy 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
arietrouw committed Aug 13, 2024
1 parent 9c002e9 commit 2b7d387
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xyo-network/sdk-xyo-js",
"version": "3.0.0",
"version": "3.0.1",
"homepage": "https://xyo.network",
"bugs": {
"url": "https://github.com/XYOracleNetwork/sdk-xyo-js/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/ethers-wrappers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xyo-network/ethers-wrappers",
"version": "3.0.0",
"version": "3.0.1",
"homepage": "https://xyo.network",
"bugs": {
"url": "https://github.com/XYOracleNetwork/sdk-xyo-js/issues",
Expand Down
2 changes: 1 addition & 1 deletion packages/geo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xyo-network/sdk-geo",
"version": "3.0.0",
"version": "3.0.1",
"homepage": "https://xyo.network",
"bugs": {
"url": "https://github.com/XYOracleNetwork/sdk-xyo-js/issues",
Expand Down
14 changes: 7 additions & 7 deletions packages/geo/src/GeoJson.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Feature, FeatureCollection, Geometry, Point, Polygon } from 'geojson'
import { GeoJSONSourceSpecification, LngLat } from 'mapbox-gl'
import MapBox from 'mapbox-gl'

import { boundingBoxToCenter, boundingBoxToPolygon, tileFromQuadkey, tileToBoundingBox } from './mercator/index.ts'

class GeoJson {
private _lngLat?: LngLat
private _lngLat?: MapBox.LngLat
private _point?: Point
private _polygon?: Polygon
private _zoom?: number
Expand All @@ -22,7 +22,7 @@ class GeoJson {
}
}

static featuresSource(data: FeatureCollection): GeoJSONSourceSpecification {
static featuresSource(data: FeatureCollection): MapBox.GeoJSONSourceSpecification {
return {
data,
type: 'geojson',
Expand All @@ -37,12 +37,12 @@ class GeoJson {
}
}

center(): LngLat {
center(): MapBox.LngLat {
if (!this._lngLat) {
const tile = tileFromQuadkey(this.quadkey)
const bb = tileToBoundingBox(tile)
const point = boundingBoxToCenter(bb)
this._lngLat = new LngLat(point[0], point[1])
this._lngLat = new MapBox.LngLat(point[0], point[1])
}
return this._lngLat
}
Expand All @@ -65,7 +65,7 @@ class GeoJson {
return GeoJson.featureCollection([this.pointFeature()])
}

pointSource(): GeoJSONSourceSpecification {
pointSource(): MapBox.GeoJSONSourceSpecification {
return {
data: this.pointFeatureCollection(),
type: 'geojson',
Expand All @@ -87,7 +87,7 @@ class GeoJson {
return GeoJson.featureCollection([this.polygonFeature()])
}

polygonSource(): GeoJSONSourceSpecification {
polygonSource(): MapBox.GeoJSONSourceSpecification {
return GeoJson.featuresSource(this.polygonFeatureCollection())
}

Expand Down
6 changes: 3 additions & 3 deletions packages/geo/src/LayerBase.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AnyLayer, Map } from 'mapbox-gl'
import MapBox from 'mapbox-gl'

export abstract class LayerBase<T extends AnyLayer> {
export abstract class LayerBase<T extends MapBox.Layer> {
id: string
source: string

Expand All @@ -9,7 +9,7 @@ export abstract class LayerBase<T extends AnyLayer> {
this.source = source
}

update(map: Map, show = true) {
update(map: MapBox.Map, show = true) {
if (map.getLayer(this.id)) {
map.removeLayer(this.id)
}
Expand Down
4 changes: 2 additions & 2 deletions packages/geo/src/mercator/tile/to/boundingbox.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LngLat } from 'mapbox-gl'
import MapBox from 'mapbox-gl'

import { r2d } from '../../constants.ts'
import { MercatorBoundingBox, MercatorTile } from '../../types.ts'
Expand All @@ -17,7 +17,7 @@ const tileToBoundingBox = (tile: MercatorTile): MercatorBoundingBox => {
const w = toLongitude(tile[0], tile[2])
const s = toLatitude(tile[1] + 1, tile[2])
const n = toLatitude(tile[1], tile[2])
return new MercatorBoundingBox(new LngLat(w, s), new LngLat(e, n))
return new MercatorBoundingBox(new MapBox.LngLat(w, s), new MapBox.LngLat(e, n))
}

export { tileToBoundingBox }
6 changes: 3 additions & 3 deletions packages/geo/src/mercator/types.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { LngLat, LngLatBounds } from 'mapbox-gl'
import MapBox from 'mapbox-gl'

type MercatorTile = number[]
type MercatorBoundary = MercatorLngLat[]
class MercatorBoundingBox extends LngLatBounds {}
class MercatorLngLat extends LngLat {}
class MercatorBoundingBox extends MapBox.LngLatBounds {}
class MercatorLngLat extends MapBox.LngLat {}

export { MercatorBoundingBox, MercatorLngLat }
export type { MercatorBoundary, MercatorTile }
2 changes: 1 addition & 1 deletion packages/meta/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xyo-network/sdk-meta",
"version": "3.0.0",
"version": "3.0.1",
"homepage": "https://xyo.network",
"bugs": {
"url": "https://github.com/XYOracleNetwork/sdk-xyo-js/issues",
Expand Down

0 comments on commit 2b7d387

Please sign in to comment.