@nora-soderlund/google-maps-solar-api
Advanced tools
Comparing version 1.0.5 to 1.0.6
export * from "./constants"; | ||
export * from "./requests/getDataLayers"; | ||
export * from "./requests/getTiff"; | ||
export * from "./requests/getGeoTiff"; | ||
export * from "./requests/findClosestBuildingInsights"; | ||
export * from "./helpers/getDataLayersForBounds"; | ||
export * from "./types/BuildingInsights"; | ||
@@ -6,0 +7,0 @@ export * from "./types/CashPurchaseSavings"; |
@@ -19,4 +19,5 @@ "use strict"; | ||
__exportStar(require("./requests/getDataLayers"), exports); | ||
__exportStar(require("./requests/getTiff"), exports); | ||
__exportStar(require("./requests/getGeoTiff"), exports); | ||
__exportStar(require("./requests/findClosestBuildingInsights"), exports); | ||
__exportStar(require("./helpers/getDataLayersForBounds"), exports); | ||
__exportStar(require("./types/BuildingInsights"), exports); | ||
@@ -23,0 +24,0 @@ __exportStar(require("./types/CashPurchaseSavings"), exports); |
{ | ||
"name": "@nora-soderlund/google-maps-solar-api", | ||
"description": "A TypeScript implementation of Google Maps Solar API endpoints.", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"build": "npx tsc" | ||
"build": "npx tsc", | ||
"test": "npx jest tests" | ||
}, | ||
"devDependencies": { | ||
"@jest/globals": "^29.7.0", | ||
"@types/jest": "^29.5.5", | ||
"ts-jest": "^29.1.1", | ||
"typescript": "^5.2.2" | ||
@@ -15,3 +19,7 @@ }, | ||
"url": "https://github.com/nora-soderlund/google-maps-solar-api" | ||
}, | ||
"license": "MIT", | ||
"dependencies": { | ||
"geolib": "^3.3.4" | ||
} | ||
} |
@@ -54,7 +54,7 @@ # google-maps-solar-api | ||
https://nora-soderlund.se/articles/integrating-the-new-solar-api-in-google-maps | ||
https://nora-soderlund.com/articles/integrating-the-new-solar-api-in-google-maps | ||
Another example of visualizing potential solar panel placements in dynamic maps: | ||
https://nora-soderlund.se/articles/visualizing-potential-solar-panel-placements-in-google-maps | ||
https://nora-soderlund.com/articles/visualizing-potential-solar-panel-placements-in-google-maps | ||
@@ -75,5 +75,26 @@ ## References | ||
#### `getTiff(apiKeyOrProxyUrl: string | URL, url: string): Promise<ArrayBuffer>` | ||
#### `getGeoTiff(apiKeyOrProxyUrl: string | URL, url: string): Promise<ArrayBuffer>` | ||
Returns a raw [ArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer) object of the GeoTIFF file or throws a generic Error if the request failed. | ||
See [geoTiff.get](https://developers.google.com/maps/documentation/solar/reference/rest/v1/geoTiff/get) on the Solar API reference. | ||
### Helpers | ||
#### `getDataLayersForBounds(bounds: LatLngBox, pixelSizeMeters: number, paddingMeters: number = 0): DataLayerBounds` | ||
Used for getting a connected area coverage. Does not perform any asynchronous requests. Returns a [DataLayerBounds](#datalayerbounds) object. | ||
#### `DataLayerBounds` | ||
##### `dataLayerView: DataLayerView;` | ||
The highest supported data layer view, for radius meters over 175m, the DataLayerView in the request must not include monthly flux or hourly shade. | ||
##### `tiles: LatLng[];` | ||
The tiles that make up the generated bounds, use with `radiusMetersPerTile` | ||
##### `radiusMetersPerTile: number;` | ||
The radius in meters for each tile. | ||
##### `bounds: LatLngBox;` | ||
The generated bounds for the new tiles. | ||
##### `horizontalTiles: number;` | ||
##### `verticalTiles: number;` | ||
The horizontal and vertical tiles count. |
export const GOOGLE_MAPS_SOLAR_API_BASE = "https://solar.googleapis.com/"; |
export * from "./constants"; | ||
export * from "./requests/getDataLayers"; | ||
export * from "./requests/getTiff"; | ||
export * from "./requests/getGeoTiff"; | ||
export * from "./requests/findClosestBuildingInsights" | ||
export * from "./helpers/getDataLayersForBounds"; | ||
export * from "./types/BuildingInsights"; | ||
@@ -8,0 +10,0 @@ export * from "./types/CashPurchaseSavings"; |
@@ -0,0 +0,0 @@ import { GOOGLE_MAPS_SOLAR_API_BASE } from "../constants"; |
@@ -0,0 +0,0 @@ import { GOOGLE_MAPS_SOLAR_API_BASE } from "../constants"; |
@@ -0,0 +0,0 @@ import { Date } from "./Date"; |
@@ -0,0 +0,0 @@ import { Money } from "./Money"; |
@@ -0,0 +0,0 @@ import { Date } from "./Date"; |
@@ -0,0 +0,0 @@ export type DataLayerView = |
@@ -0,0 +0,0 @@ export type Date = { |
@@ -0,0 +0,0 @@ import { Money } from "./Money"; |
@@ -0,0 +0,0 @@ import { CashPurchaseSavings } from "./CashPurchaseSavings"; |
@@ -0,0 +0,0 @@ import { Money } from "./Money"; |
@@ -0,0 +0,0 @@ export type ImageryQuality = |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { LatLng } from "./LatLng"; |
@@ -0,0 +0,0 @@ import { Money } from "./Money"; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { LatLng } from "./LatLng"; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { Money } from "./Money"; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { LatLng } from "./LatLng"; |
@@ -0,0 +0,0 @@ import { RoofSegmentSummary } from "./RoofSegmentSummary"; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { FinancialAnalysis } from "./FinancialAnalysis"; |
@@ -108,3 +108,4 @@ { | ||
"skipLibCheck": true /* Skip type checking all .d.ts files. */ | ||
} | ||
}, | ||
"exclude": [ "node_modules", "tests" ] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No License Found
License(Experimental) License information could not be found.
Found 1 instance in 1 package
106704
145
0
1746
99
1
4
+ Addedgeolib@^3.3.4
+ Addedgeolib@3.3.4(transitive)