![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@nora-soderlund/google-maps-solar-api
Advanced tools
A TypeScript implementation of Google Maps Solar API endpoints.
This is a TypeScript package for calling the new Solar API endpoints, including full types for all query inputs and body responses.
npm install @nora-soderlund/google-maps-solar-api
import { findClosestBuildingInsights } from "@nora-soderlund/google-maps-solar-api";
const buildingInsights = await findClosestBuildingInsights("API_KEY", {
location: {
latitude: 57.70936,
longitude: 11.97345
}
});
import { getDataLayers } from "@nora-soderlund/google-maps-solar-api";
const dataLayers = await getDataLayers("API_KEY", {
location: coordinate,
radiusMeters: 100,
view: "IMAGERY_AND_ANNUAL_FLUX_LAYERS"
});
You can use your own Solar API proxy to implement this package in your clients and apply rate limiting or session authentication on your end.
Simply pass a URL object instead of a string in replacement of the API key. Only the host will be used, the protocol must be HTTPS.
import { findClosestBuildingInsights } from "@nora-soderlund/google-maps-solar-api";
const proxyUrl = new URL("https://my-solar-api-proxy.com");
const buildingInsights = await findClosestBuildingInsights(proxyUrl, {
location: {
latitude: 57.70936,
longitude: 11.97345
}
});
Subsequent request will be sent to e.g. https://my-solar-api-proxy.com/v1/buildingInsights:findClosest?...
.
See my developer blog article for an example of using the Solar API data layers with a dynamic Google Maps instance:
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.com/articles/visualizing-potential-solar-panel-placements-in-google-maps
findClosestBuildingInsights(apiKeyOrProxyUrl: string | URL, query: FindClosestBuildingInsightsParameters): Promise<BuildingInsights>
Returns a BuildingInsights object or throws a generic Error if the request failed.
See buildingInsights.findClosest on the Solar API reference.
getDataLayers(apiKeyOrProxyUrl: string | URL, query: GetDataLayersParameters): Promise<DataLayers>
Returns a DataLayers object or throws a generic Error if the request failed.
See dataLayers.get on the Solar API reference.
getGeoTiff(apiKeyOrProxyUrl: string | URL, url: string): Promise<ArrayBuffer>
Returns a raw ArrayBuffer object of the GeoTIFF file or throws a generic Error if the request failed.
See geoTiff.get on the Solar API reference.
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 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.
FAQs
A TypeScript implementation of Google Maps Solar API endpoints.
The npm package @nora-soderlund/google-maps-solar-api receives a total of 169 weekly downloads. As such, @nora-soderlund/google-maps-solar-api popularity was classified as not popular.
We found that @nora-soderlund/google-maps-solar-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.