@ciniki/iclient-maplibregl
Version:
@supermapgis/iclient-maplibregl 是一套基于 Maplibre GL 的云 GIS 网络客户端开发平台, 支持访问 SuperMap iServer / iEdge / iPortal / iManager / Online 的地图、服务和资源,为用户提供了完整专业的 GIS 能力, 同时提供了优秀的可视化功能。
34 lines (31 loc) • 1.22 kB
JavaScript
/* Copyright© 2000 - 2025 SuperMap Software Co.Ltd. All rights reserved.
* This program are made available under the terms of the Apache License, Version 2.0
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
import maplibregl from 'maplibre-gl';
/**
* @class ServiceBase
* @category iServer Core
* @classdesc maplibregl.supermap 服务基类。
* @version 11.1.0
* @param {string} url - 服务地址。
* @param {Object} options - 参数。
* @param {string} [options.proxy] - 服务代理地址。
* @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
* @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
* @param {Object} [options.headers] - 请求头。
* @fires ServiceBase#initialized
* @usage
*/
export class ServiceBase extends maplibregl.Evented {
constructor(url, options) {
super();
this.options = options || {};
this.url = url;
/**
* @event ServiceBase#initialized
* @description 构造函数构造成功之后触发。
* @property {Object} this - this 对象。
*/
this.fire('initialized', this);
}
}