Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loaders.gl/wms

Package Overview
Dependencies
Maintainers
9
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaders.gl/wms - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

2

dist/lib/services/image-service.d.ts

@@ -17,3 +17,3 @@ import { LoaderOptions } from '@loaders.gl/loader-utils';

*/
export declare class ImageService<PropsT extends ImageServiceProps = ImageServiceProps> extends ImageSource<PropsT> {
export declare abstract class ImageService<PropsT extends ImageServiceProps = ImageServiceProps> extends ImageSource<PropsT> {
static type: string;

@@ -20,0 +20,0 @@ static testURL: (url: string) => boolean;

@@ -18,3 +18,3 @@ import { ImageLoader } from '@loaders.gl/images';

getGranularParameters(parameters) {
const [east, north, west, south] = parameters.bbox;
const [[east, north], [west, south]] = parameters.boundingBox;
return {

@@ -21,0 +21,0 @@ ...parameters,

@@ -14,2 +14,3 @@ import { ImageType } from '@loaders.gl/images';

export declare class ArcGISImageSource extends ImageService<ArcGISImageServerProps> {
data: string;
constructor(props: ArcGISImageServerProps);

@@ -16,0 +17,0 @@ getMetadata(): Promise<ImageSourceMetadata>;

@@ -5,2 +5,4 @@ import { ImageService } from "../../lib/services/image-service.js";

super(props);
this.data = void 0;
this.data = props.url;
}

@@ -7,0 +9,0 @@ async getMetadata() {

@@ -49,2 +49,4 @@ import type { DataSourceProps } from '@loaders.gl/loader-utils';

capabilities: CSWCapabilities | null;
data: string;
url: string;
/** A list of loaders used by the CSWService methods */

@@ -51,0 +53,0 @@ readonly loaders: (import("@loaders.gl/loader-utils").LoaderWithParser<CSWCapabilities, never, import("../../csw-capabilities-loader").CSWLoaderOptions> | import("@loaders.gl/loader-utils").LoaderWithParser<string, never, import("../../wms-error-loader").WMSLoaderOptions>)[];

@@ -10,3 +10,7 @@ import { DataSource } from '@loaders.gl/loader-utils';

this.capabilities = null;
this.data = void 0;
this.url = void 0;
this.loaders = [CSWErrorLoader, CSWCapabilitiesLoader];
this.url = props.url;
this.data = props.url;
}

@@ -13,0 +17,0 @@ async getMetadata() {

@@ -44,3 +44,4 @@ import type { ImageType } from '@loaders.gl/images';

version?: '1.3.0' | '1.1.1';
/** bounding box of the requested map image */
/** bounding box of the requested map image `[[w, s], [e, n]]` */
/** bounding box of the requested map image @deprecated Use .boundingBox */
bbox: [number, number, number, number];

@@ -66,13 +67,2 @@ /** pixel width of returned image */

};
/** GetMap parameters that are specific to the current view */
export type WMSGetMapViewParameters = {
/** pixel width of returned image */
width: number;
/** pixels */
height: number;
/** bounding box of the requested map image */
bbox: [number, number, number, number];
/** Coordinate Reference System for the image (not bounding box). can be provided in service constructor. */
crs?: string;
};
/**

@@ -152,2 +142,3 @@ * Parameters for GetFeatureInfo

readonly url: string;
readonly data: string;
/** In WMS 1.3.0, replaces references to EPSG:4326 with CRS:84. But not always supported. Default: false */

@@ -154,0 +145,0 @@ substituteCRS84: boolean;

@@ -18,2 +18,3 @@ import { ImageLoader } from '@loaders.gl/images';

this.url = void 0;
this.data = void 0;
this.substituteCRS84 = void 0;

@@ -25,2 +26,3 @@ this.flipCRS = void 0;

this.url = props.url;
this.data = props.url;
this.substituteCRS84 = (_props$substituteCRS = props.substituteCRS84) !== null && _props$substituteCRS !== void 0 ? _props$substituteCRS : false;

@@ -212,2 +214,10 @@ this.flipCRS = ['EPSG:4326'];

break;
case 'boundingBox':
const boundingBox = value;
let bbox2 = [...boundingBox[0], ...boundingBox[1]];
bbox2 = this._flipBoundingBox(boundingBox, wmsParameters);
if (bbox2) {
value = bbox2;
}
break;
case 'bbox':

@@ -214,0 +224,0 @@ const bbox = this._flipBoundingBox(value, wmsParameters);

{
"name": "@loaders.gl/wms",
"version": "4.0.0",
"version": "4.0.1",
"description": "Framework-independent loaders for the WMS (Web Map Service) standard",

@@ -54,10 +54,10 @@ "license": "MIT",

"@babel/runtime": "^7.3.1",
"@loaders.gl/images": "4.0.0",
"@loaders.gl/loader-utils": "4.0.0",
"@loaders.gl/schema": "4.0.0",
"@loaders.gl/xml": "4.0.0",
"@loaders.gl/images": "4.0.1",
"@loaders.gl/loader-utils": "4.0.1",
"@loaders.gl/schema": "4.0.1",
"@loaders.gl/xml": "4.0.1",
"@turf/rewind": "^5.1.5",
"deep-strict-equal": "^0.2.0"
},
"gitHead": "9b4211dc0ecd4134a1638ac0a29c5ea9008fd971"
"gitHead": "765e5a26a6bf3f2cc02cabffc4a1e3665ec92a53"
}

@@ -24,3 +24,3 @@ // loaders.gl, MIT license

*/
export class ImageService<
export abstract class ImageService<
PropsT extends ImageServiceProps = ImageServiceProps

@@ -53,3 +53,3 @@ > extends ImageSource<PropsT> {

protected getGranularParameters(parameters: GetImageParameters): Record<string, unknown> {
const [east, north, west, south] = parameters.bbox;
const [[east, north], [west, south]] = parameters.boundingBox;
return {...parameters, east, north, south, west};

@@ -56,0 +56,0 @@ }

@@ -23,4 +23,7 @@ // loaders.gl, MIT license

export class ArcGISImageSource extends ImageService<ArcGISImageServerProps> {
data: string;
constructor(props: ArcGISImageServerProps) {
super(props);
this.data = props.url;
}

@@ -27,0 +30,0 @@

@@ -71,2 +71,4 @@ // loaders.gl, MIT license

capabilities: CSWCapabilities | null = null;
data: string;
url: string;

@@ -79,2 +81,4 @@ /** A list of loaders used by the CSWService methods */

super(props);
this.url = props.url;
this.data = props.url;
}

@@ -81,0 +85,0 @@

@@ -68,3 +68,5 @@ // loaders.gl, MIT license

version?: '1.3.0' | '1.1.1';
/** bounding box of the requested map image */
/** bounding box of the requested map image `[[w, s], [e, n]]` */
// boundingBox: [min: [x: number, y: number], max: [x: number, y: number]];
/** bounding box of the requested map image @deprecated Use .boundingBox */
bbox: [number, number, number, number];

@@ -91,13 +93,13 @@ /** pixel width of returned image */

/** GetMap parameters that are specific to the current view */
export type WMSGetMapViewParameters = {
/** pixel width of returned image */
width: number;
/** pixels */
height: number;
/** bounding box of the requested map image */
bbox: [number, number, number, number];
/** Coordinate Reference System for the image (not bounding box). can be provided in service constructor. */
crs?: string;
};
// /** GetMap parameters that are specific to the current view */
// export type WMSGetMapViewParameters = {
// /** pixel width of returned image */
// width: number;
// /** pixels */
// height: number;
// /** bounding box of the requested map image */
// bbox: [number, number, number, number];
// /** Coordinate Reference System for the image (not bounding box). can be provided in service constructor. */
// crs?: string;
// };

@@ -185,2 +187,3 @@ /**

readonly url: string;
readonly data: string;

@@ -208,2 +211,3 @@ /** In WMS 1.3.0, replaces references to EPSG:4326 with CRS:84. But not always supported. Default: false */

this.url = props.url;
this.data = props.url;

@@ -237,2 +241,3 @@ this.substituteCRS84 = props.substituteCRS84 ?? false;

async getImage(parameters: GetImageParameters): Promise<ImageType> {
// @ts-expect-error
return await this.getMap(parameters);

@@ -501,2 +506,12 @@ }

case 'boundingBox':
// Coordinate order is flipped for certain CRS in WMS 1.3.0
const boundingBox = value as [[number, number], [number, number]];
let bbox2: number[] | null = [...boundingBox[0], ...boundingBox[1]];
bbox2 = this._flipBoundingBox(boundingBox, wmsParameters);
if (bbox2) {
value = bbox2;
}
break;
case 'bbox':

@@ -503,0 +518,0 @@ // Coordinate order is flipped for certain CRS in WMS 1.3.0

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc