mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
64 lines
2.7 KiB
TypeScript
64 lines
2.7 KiB
TypeScript
// Type definitions for BaiduMap JsAPI GL v1.0
|
|
// Project: http://lbsyun.baidu.com/index.php?title=jspopularGL
|
|
// Definitions by: Junior2ran <http://github.com/Junior2ran>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/* *****************************************************************************
|
|
Copyright [Junior2ran] [hdr01@126.com]
|
|
|
|
This project is licensed under the MIT license.
|
|
Copyrights are respective of each contributor listed at the beginning of each definition file.
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
this software and associated documentation files (the "Software"), to deal in
|
|
the Software without restriction, including without limitation the rights to
|
|
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
of the Software, and to permit persons to whom the Software is furnished to do
|
|
so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|
|
***************************************************************************** */
|
|
|
|
/// <reference path="./bmapgl.base.d.ts" />
|
|
/// <reference path="./bmapgl.maplayer.d.ts" />
|
|
declare namespace BMapGL {
|
|
class MapType {
|
|
constructor(name: string, layers: TileLayer | TileLayer[], opts?: MapTypeOptions);
|
|
getName(): string;
|
|
getTileLayer(): TileLayer;
|
|
getMinZoom(): number;
|
|
getMaxZoom(): number;
|
|
getProjection(): Projection;
|
|
getTextColor(): string;
|
|
getTips(): string;
|
|
}
|
|
interface MapTypeOptions {
|
|
minZoom?: number;
|
|
maxZoom?: number;
|
|
errorImageUrl?: string;
|
|
textColor?: number;
|
|
tips?: string;
|
|
}
|
|
interface Projection {
|
|
lngLatToPoint(lngLat: Point): Pixel;
|
|
pointToLngLat(point: Pixel): Point;
|
|
}
|
|
type MercatorProjection = Projection;
|
|
type PerspectiveProjection = Projection;
|
|
}
|
|
declare const BMAP_NORMAL_MAP: BMapGL.MapType;
|
|
declare const BMAPGL_NORMAL_MAP: BMapGL.MapType;
|
|
declare const BMAP_EARTH_MAP: BMapGL.MapType;
|
|
declare const BMAP_PERSPECTIVE_MAP: BMapGL.MapType;
|
|
declare const BMAP_SATELLITE_MAP: BMapGL.MapType;
|
|
declare const BMAP_HYBRID_MAP: BMapGL.MapType;
|