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

@loaders.gl/wms

Package Overview
Dependencies
Maintainers
8
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.3.2 to 4.4.0-alpha.1

dist/arcgis/arcgis-feature-source.d.ts

2

dist/csw-capabilities-loader.js

@@ -7,3 +7,3 @@ // loaders.gl

// @ts-ignore TS2304: Cannot find name '__VERSION__'.
const VERSION = typeof "4.3.1" !== 'undefined' ? "4.3.1" : 'latest';
const VERSION = typeof "4.4.0-alpha.0" !== 'undefined' ? "4.4.0-alpha.0" : 'latest';
/**

@@ -10,0 +10,0 @@ * Loader for the response to the CSW GetCapability request

@@ -7,3 +7,3 @@ // loaders.gl

// @ts-ignore TS2304: Cannot find name '__VERSION__'.
const VERSION = typeof "4.3.1" !== 'undefined' ? "4.3.1" : 'latest';
const VERSION = typeof "4.4.0-alpha.0" !== 'undefined' ? "4.4.0-alpha.0" : 'latest';
/**

@@ -10,0 +10,0 @@ * Loader for the response to the CSW GetCapability request

@@ -7,3 +7,3 @@ // loaders.gl

// @ts-ignore TS2304: Cannot find name '__VERSION__'.
const VERSION = typeof "4.3.1" !== 'undefined' ? "4.3.1" : 'latest';
const VERSION = typeof "4.4.0-alpha.0" !== 'undefined' ? "4.4.0-alpha.0" : 'latest';
/**

@@ -10,0 +10,0 @@ * Loader for the response to the CSW GetCapability request

@@ -7,3 +7,3 @@ // loaders.gl

// @ts-ignore TS2304: Cannot find name '__VERSION__'.
const VERSION = typeof "4.3.1" !== 'undefined' ? "4.3.1" : 'latest';
const VERSION = typeof "4.4.0-alpha.0" !== 'undefined' ? "4.4.0-alpha.0" : 'latest';
/**

@@ -10,0 +10,0 @@ * Loader for the response to the GML GetCapability request

@@ -22,9 +22,8 @@ export type { CSWLoaderOptions } from "./csw-capabilities-loader.js";

export { GMLLoader as _GMLLoader } from "./gml-loader.js";
export { WMSSource, WMSImageSource } from "./services/ogc/wms-service.js";
export { getArcGISServices as _getArcGISServices } from "./services/arcgis/arcgis-server.js";
export { ArcGISImageServerSource as _ArcGISImageServerSource } from "./services/arcgis/arcgis-image-server.js";
export { WMSSource, WMSImageSource } from "./wms-source.js";
export { getArcGISServices as _getArcGISServices } from "./arcgis/arcgis-server.js";
export { ArcGISImageServerSource as _ArcGISImageServerSource } from "./arcgis/arcgis-image-source.js";
export { ImageSource } from '@loaders.gl/loader-utils';
export type { ImageType } from '@loaders.gl/images';
export type { ImageServiceType } from "./lib/deprecated/create-image-source.js";
export { createImageSource } from "./lib/deprecated/create-image-source.js";
//# sourceMappingURL=index.d.ts.map

@@ -16,9 +16,8 @@ // loaders.gl

// OGC Services
// export {CSWSource} from './services/ogc/csw-service';
export { WMSSource, WMSImageSource } from "./services/ogc/wms-service.js";
// export {CSWSource} from './csw-source';
export { WMSSource, WMSImageSource } from "./wms-source.js";
// ArcGIS SourceLoaders
export { getArcGISServices as _getArcGISServices } from "./services/arcgis/arcgis-server.js";
export { ArcGISImageServerSource as _ArcGISImageServerSource } from "./services/arcgis/arcgis-image-server.js";
// DEPRECATED: TODO - remove once deck.gl has been udpated
export { getArcGISServices as _getArcGISServices } from "./arcgis/arcgis-server.js";
export { ArcGISImageServerSource as _ArcGISImageServerSource } from "./arcgis/arcgis-image-source.js";
export { ImageSource } from '@loaders.gl/loader-utils';
export { createImageSource } from "./lib/deprecated/create-image-source.js";

@@ -1,11 +0,9 @@

import type { Source, ImageSource, ImageSourceProps } from '@loaders.gl/loader-utils';
import type { WMSImageSourceProps } from "../../services/ogc/wms-service.js";
/** @deprecated */
export type ImageServiceType = 'wms' | 'arcgis-image-server' | 'template';
import type { Source, SourceArrayDataSourceType, DataSourceOptions } from '@loaders.gl/loader-utils';
import type { WMSSourceOptions } from "../../wms-source.js";
export type ImageSourceType = 'wms' | 'arcgis-image-server' | 'template';
/**
* * @deprecated Use createDataSource from @loaders.gl/core
*/
type CreateImageSourceProps = ImageSourceProps & WMSImageSourceProps & {
url: string;
type?: ImageServiceType | 'auto';
type CreateImageSourceOptions = DataSourceOptions & WMSSourceOptions & {
type?: ImageSourceType | 'auto';
};

@@ -21,4 +19,10 @@ /**

*/
export declare function createImageSource(props: CreateImageSourceProps, sources?: Source<import("@loaders.gl/loader-utils").DataSource<import("@loaders.gl/loader-utils").DataSourceProps>, any>[]): ImageSource;
export declare function createImageSource<SourceArrayT extends Source[]>(options: {
url: string;
type: string;
loadOptions: any;
options: Readonly<CreateImageSourceOptions>;
sources: Readonly<Source[]>;
}): SourceArrayDataSourceType<SourceArrayT>;
export {};
//# sourceMappingURL=create-image-source.d.ts.map
// loaders.gl
// SPDX-License-Identifier: MIT
// Copyright (c) vis.gl contributors
import { WMSSource } from "../../services/ogc/wms-service.js";
import { ArcGISImageServerSource } from "../../services/arcgis/arcgis-image-server.js";
import { WMSSource } from "../../wms-source.js";
import { ArcGISImageServerSource } from "../../arcgis/arcgis-image-source.js";
const SOURCES = [WMSSource, ArcGISImageServerSource];

@@ -16,9 +16,9 @@ /**

*/
export function createImageSource(props, sources = SOURCES) {
const { type = 'auto' } = props;
const source = type === 'auto' ? guessSourceType(props.url, sources) : getSourceOfType(type, sources);
export function createImageSource(options) {
const { type = 'auto', url, sources = SOURCES, loadOptions } = options;
const source = type === 'auto' ? guessSourceType(url, sources) : getSourceOfType(type, sources);
if (!source) {
throw new Error('Not a valid image source type');
}
return source.createDataSource(props.url, props);
return source.createDataSource(url, { core: { loadOptions } });
}

@@ -25,0 +25,0 @@ /** Guess service type from URL */

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

// @ts-ignore TS2304: Cannot find name '__VERSION__'.
const VERSION = typeof "4.3.1" !== 'undefined' ? "4.3.1" : 'latest';
const VERSION = typeof "4.4.0-alpha.0" !== 'undefined' ? "4.4.0-alpha.0" : 'latest';
/**

@@ -8,0 +8,0 @@ * Loader for the response to the WFS GetCapability request

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

// @ts-ignore TS2304: Cannot find name '__VERSION__'.
const VERSION = typeof "4.3.1" !== 'undefined' ? "4.3.1" : 'latest';
const VERSION = typeof "4.4.0-alpha.0" !== 'undefined' ? "4.4.0-alpha.0" : 'latest';
/**

@@ -8,0 +8,0 @@ * Loader for the response to the WCS GetCapability request

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

// @ts-ignore TS2304: Cannot find name '__VERSION__'.
const VERSION = typeof "4.3.1" !== 'undefined' ? "4.3.1" : 'latest';
const VERSION = typeof "4.4.0-alpha.0" !== 'undefined' ? "4.4.0-alpha.0" : 'latest';
/**

@@ -9,0 +9,0 @@ * Loader for the response to the WMTS GetCapability request

@@ -7,3 +7,3 @@ // loaders.gl

// @ts-ignore TS2304: Cannot find name '__VERSION__'.
const VERSION = typeof "4.3.1" !== 'undefined' ? "4.3.1" : 'latest';
const VERSION = typeof "4.4.0-alpha.0" !== 'undefined' ? "4.4.0-alpha.0" : 'latest';
/**

@@ -10,0 +10,0 @@ * Loader for the response to the WMS GetCapability request

@@ -7,3 +7,3 @@ // loaders.gl

// @ts-ignore TS2304: Cannot find name '__VERSION__'.
const VERSION = typeof "4.3.1" !== 'undefined' ? "4.3.1" : 'latest';
const VERSION = typeof "4.4.0-alpha.0" !== 'undefined' ? "4.4.0-alpha.0" : 'latest';
/**

@@ -10,0 +10,0 @@ * Loader for the response to the WMS GetCapability request

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

@@ -53,6 +53,6 @@ "license": "MIT",

"dependencies": {
"@loaders.gl/images": "4.3.2",
"@loaders.gl/loader-utils": "4.3.2",
"@loaders.gl/schema": "4.3.2",
"@loaders.gl/xml": "4.3.2",
"@loaders.gl/images": "4.4.0-alpha.1",
"@loaders.gl/loader-utils": "4.4.0-alpha.1",
"@loaders.gl/schema": "4.4.0-alpha.1",
"@loaders.gl/xml": "4.4.0-alpha.1",
"@turf/rewind": "^5.1.5",

@@ -62,5 +62,5 @@ "deep-strict-equal": "^0.2.0"

"peerDependencies": {
"@loaders.gl/core": "^4.3.0"
"@loaders.gl/core": "4.4.0-alpha.0"
},
"gitHead": "b4203b8703f64a38d6f79a3113bc7bb51d45c93a"
"gitHead": "f1732de45907bd500bf4eedb4803beca8bf4bfb0"
}

@@ -59,14 +59,12 @@ // loaders.gl

// export {CSWSource} from './services/ogc/csw-service';
export {WMSSource, WMSImageSource} from './services/ogc/wms-service';
// export {CSWSource} from './csw-source';
export {WMSSource, WMSImageSource} from './wms-source';
// ArcGIS SourceLoaders
export {getArcGISServices as _getArcGISServices} from './services/arcgis/arcgis-server';
export {ArcGISImageServerSource as _ArcGISImageServerSource} from './services/arcgis/arcgis-image-server';
export {getArcGISServices as _getArcGISServices} from './arcgis/arcgis-server';
export {ArcGISImageServerSource as _ArcGISImageServerSource} from './arcgis/arcgis-image-source';
// DEPRECATED: TODO - remove once deck.gl has been udpated
export {ImageSource} from '@loaders.gl/loader-utils';
export type {ImageType} from '@loaders.gl/images';
export type {ImageServiceType} from './lib/deprecated/create-image-source';
export {createImageSource} from './lib/deprecated/create-image-source';

@@ -5,11 +5,10 @@ // loaders.gl

import type {Source, ImageSource, ImageSourceProps} from '@loaders.gl/loader-utils';
import type {WMSImageSourceProps} from '../../services/ogc/wms-service';
import {WMSSource} from '../../services/ogc/wms-service';
import {ArcGISImageServerSource} from '../../services/arcgis/arcgis-image-server';
import type {Source, SourceArrayDataSourceType, DataSourceOptions} from '@loaders.gl/loader-utils';
import type {WMSSourceOptions} from '../../wms-source';
import {WMSSource} from '../../wms-source';
import {ArcGISImageServerSource} from '../../arcgis/arcgis-image-source';
/** @deprecated */
export type ImageServiceType = 'wms' | 'arcgis-image-server' | 'template';
export type ImageSourceType = 'wms' | 'arcgis-image-server' | 'template';
const SOURCES: Source[] = [WMSSource, ArcGISImageServerSource];
const SOURCES = [WMSSource, ArcGISImageServerSource] as const;

@@ -19,6 +18,5 @@ /**

*/
type CreateImageSourceProps = ImageSourceProps &
WMSImageSourceProps & {
url: string;
type?: ImageServiceType | 'auto';
type CreateImageSourceOptions = DataSourceOptions &
WMSSourceOptions & {
type?: ImageSourceType | 'auto';
};

@@ -35,6 +33,12 @@

*/
export function createImageSource(props: CreateImageSourceProps, sources = SOURCES): ImageSource {
const {type = 'auto'} = props;
const source: Source | null =
type === 'auto' ? guessSourceType(props.url, sources) : getSourceOfType(type, sources);
export function createImageSource<SourceArrayT extends Source[]>(options: {
url: string;
type: string;
loadOptions: any;
options: Readonly<CreateImageSourceOptions>; // Readonly<SourceArrayOptionsType<SourceArrayT>>,
sources: Readonly<Source[]>;
}): SourceArrayDataSourceType<SourceArrayT> {
const {type = 'auto', url, sources = SOURCES, loadOptions} = options;
const source: SourceArrayT[number] | null =
type === 'auto' ? guessSourceType(url, sources) : getSourceOfType(type, sources);

@@ -44,7 +48,7 @@ if (!source) {

}
return source.createDataSource(props.url, props) as unknown as ImageSource;
return source.createDataSource(url, {core: {loadOptions}});
}
/** Guess service type from URL */
function getSourceOfType(type: string, sources: Source[]): Source | null {
function getSourceOfType(type: string, sources: Readonly<Source[]>): Source | null {
// if (type === 'template') {

@@ -64,3 +68,3 @@ // return ImageSource;

/** Guess source type from URL */
function guessSourceType(url: string, sources: Source[]): Source | null {
function guessSourceType(url: string, sources: Readonly<Source[]>): Source | null {
for (const source of sources) {

@@ -67,0 +71,0 @@ if (source.testURL && source.testURL(url)) {

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