@loaders.gl/wms
Advanced tools
Comparing version 4.3.2 to 4.4.0-alpha.1
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
558024
10499
2
+ Added@loaders.gl/images@4.4.0-alpha.1(transitive)
+ Added@loaders.gl/loader-utils@4.4.0-alpha.1(transitive)
+ Added@loaders.gl/schema@4.4.0-alpha.1(transitive)
+ Added@loaders.gl/worker-utils@4.4.0-alpha.1(transitive)
+ Added@loaders.gl/xml@4.4.0-alpha.1(transitive)
+ Added@swc/helpers@0.5.15(transitive)
+ Added@types/command-line-args@5.2.3(transitive)
+ Added@types/command-line-usage@5.0.4(transitive)
+ Added@types/node@20.17.11(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedapache-arrow@18.1.0(transitive)
+ Addedarray-back@3.1.06.2.2(transitive)
+ Addedchalk@4.1.2(transitive)
+ Addedchalk-template@0.4.0(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addedcommand-line-args@5.2.1(transitive)
+ Addedcommand-line-usage@7.0.3(transitive)
+ Addedfind-replace@3.0.0(transitive)
+ Addedflatbuffers@24.12.23(transitive)
+ Addedhas-flag@4.0.0(transitive)
+ Addedjson-bignum@0.0.3(transitive)
+ Addedlodash.camelcase@4.3.0(transitive)
+ Addedsupports-color@7.2.0(transitive)
+ Addedtable-layout@4.1.1(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedtypical@4.0.07.3.0(transitive)
+ Addedundici-types@6.19.8(transitive)
+ Addedwordwrapjs@5.1.0(transitive)
- Removed@loaders.gl/core@4.3.3(transitive)
- Removed@loaders.gl/images@4.3.2(transitive)
- Removed@loaders.gl/loader-utils@4.3.24.3.3(transitive)
- Removed@loaders.gl/schema@4.3.24.3.3(transitive)
- Removed@loaders.gl/worker-utils@4.3.24.3.3(transitive)
- Removed@loaders.gl/xml@4.3.2(transitive)