🤖 Merge PR #46449 add bmapgl and update baidumap-web-sdk setStyleV2 by @Junior2Ran

This commit is contained in:
后悔编程哥 2020-08-01 13:27:42 +08:00 committed by GitHub
parent 63a55c6b3e
commit 8512bc7b9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 1844 additions and 1 deletions

View File

@ -57,7 +57,7 @@ declare namespace BMap {
setMinZoom(zoom: number): void;
setMaxZoom(zoom: number): void;
setMapStyle(mapStyle: MapStyle): void;
setMapStyle2(style: MapStyleV2): void;
setMapStyleV2(style: MapStyleV2): void;
setPanorama(pano: Panorama): void;
disable3DBuilding(): void;
getBounds(): Bounds;

View File

@ -0,0 +1,26 @@
import "bmapgl";
class TestFixture {
// document: http://lbsyun.baidu.com/index.php?title=jspopularGL
createMap(container: string | HTMLElement) {
navigator.geolocation.getCurrentPosition((position: Position) => {
const point = new BMapGL.Point(position.coords.longitude, position.coords.latitude);
const map = new BMapGL.Map(container);
map.centerAndZoom(point, 15);
}, console.log, { maximumAge: 3000, timeout: 5000, enableHighAccuracy: true });
}
addControl(map: BMapGL.Map) {
map.addControl(new BMapGL.ScaleControl({ anchor: BMAP_ANCHOR_TOP_LEFT }));
map.addControl(new BMapGL.NavigationControl());
map.addControl(new BMapGL.MapTypeControl({ mapTypes: [BMAP_NORMAL_MAP, BMAP_HYBRID_MAP] }));
map.addControl(new BMapGL.OverviewMapControl({ isOpen: true, anchor: BMAP_ANCHOR_BOTTOM_RIGHT }));
}
addMarker(map: BMapGL.Map, point: BMapGL.Point) {
const marker = new BMapGL.Marker(point);
map.addOverlay(marker);
marker.setAnimation(BMAP_ANIMATION_BOUNCE);
}
create_map(map: BMapGL.Map, city: string) {
map.centerAndZoom(city);
}
}

69
types/bmapgl/bmapgl.base.d.ts vendored Normal file
View File

@ -0,0 +1,69 @@
// 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.
***************************************************************************** */
declare namespace BMapGL {
type Callback = (...args: any[]) => void;
class Point {
constructor(lng: number, lat: number);
lng: number;
lat: number;
equals(other: Point): boolean;
}
class Pixel {
constructor(x: number, y: number);
x: number;
y: number;
equals(other: Pixel): boolean;
}
class Size {
constructor(width: number, height: number);
width: number;
height: number;
equals(other: Size): boolean;
}
class Bounds {
constructor(minX: number, minY: number, maxX: number, maxY: number);
constructor(sw: Point, ne: Point);
minX: number;
minY: number;
maxX: number;
maxY: number;
equals(other: Bounds): boolean;
containsPoint(point: Point): boolean;
containsBounds(bounds: Bounds): boolean;
intersects(other: Bounds): boolean;
extend(point: Point): void;
getCenter(): Point;
isEmpty(): boolean;
getSouthWest(): Point;
getNorthEast(): Point;
toSpan(): Point;
}
}

146
types/bmapgl/bmapgl.control.d.ts vendored Normal file
View File

@ -0,0 +1,146 @@
// 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.maptype.d.ts" />
/// <reference path="./bmapgl.overlay.d.ts" />
declare namespace BMapGL {
class Control {
constructor();
defaultAnchor: ControlAnchor;
defaultOffset: Size;
initialize(map: Map): HTMLElement;
setAnchor(anchor: ControlAnchor): void;
getAnchor(): ControlAnchor;
setOffset(offset: Size): void;
getOffset(): Size;
show(): void;
hide(): void;
isVisible(): boolean;
/** 自定义Control在add之后立马能读取到Container, 内置Control不能 */
getContainer(): HTMLElement | undefined;
}
interface NavigationControlOptions {
anchor?: ControlAnchor;
offset?: Size;
type?: NavigationControlType;
showZoomInfo?: boolean;
enableGeolocation?: boolean;
}
interface ScaleControlOptions {
anchor?: ControlAnchor;
offset?: Size;
}
interface CopyrightControlOptions {
anchor?: ControlAnchor;
offset?: Size;
}
type ControlAnchor = number;
class OverviewMapControl extends Control {
constructor(opts: OverviewMapControlOptions);
changeView(): void;
setSize(size: Size): void;
getSize(): Size;
onviewchanged: (event: { type: string, target: any, isOpen: boolean }) => void;
onviewchanging: (event: { type: string, target: any }) => void;
}
type LengthUnit = string;
class MapTypeControl extends Control {
constructor(opts?: MapTypeControlOptions);
}
class NavigationControl extends Control {
constructor(opts?: NavigationControlOptions);
getType(): NavigationControlOptions;
setType(type: NavigationControlType): void;
}
interface OverviewMapControlOptions {
anchor?: ControlAnchor;
offset?: Size;
size?: Size;
isOpen?: boolean;
}
class CopyrightControl extends Control {
constructor(opts?: CopyrightControlOptions);
addCopyright(copyright: Copyright): void;
removeCopyright(id: number): void;
getCopyright(id: number): Copyright;
getCopyrightCollection(): Copyright[];
}
interface MapTypeControlOptions {
type?: MapTypeControlType;
mapTypes?: MapType[];
}
type NavigationControlType = number;
class ScaleControl extends Control {
constructor(opts?: ScaleControlOptions);
getUnit(): LengthUnit;
setUnit(unit: LengthUnit): void;
}
interface Copyright {
id?: number;
content?: string;
bounds?: Bounds;
}
type MapTypeControlType = number;
class GeolocationControl extends Control {
constructor(opts?: GeolocationControlOptions);
}
interface GeolocationControlOptions {
anchor?: ControlAnchor;
offset?: Size;
showAddressBar?: boolean;
enableAutoLocation?: boolean;
locationIcon?: Icon;
}
type StatusCode = number;
class PanoramaControl extends Control {
constructor();
}
}
declare const BMAP_UNIT_METRIC: BMapGL.LengthUnit;
declare const BMAP_UNIT_IMPERIAL: BMapGL.LengthUnit;
declare const BMAP_ANCHOR_TOP_LEFT: BMapGL.ControlAnchor;
declare const BMAP_ANCHOR_TOP_RIGHT: BMapGL.ControlAnchor;
declare const BMAP_ANCHOR_BOTTOM_LEFT: BMapGL.ControlAnchor;
declare const BMAP_ANCHOR_BOTTOM_RIGHT: BMapGL.ControlAnchor;
declare const BMAP_NAVIGATION_CONTROL_LARGE: BMapGL.NavigationControlType;
declare const BMAP_NAVIGATION_CONTROL_SMALL: BMapGL.NavigationControlType;
declare const BMAP_NAVIGATION_CONTROL_PAN: BMapGL.NavigationControlType;
declare const BMAP_NAVIGATION_CONTROL_ZOOM: BMapGL.NavigationControlType;
declare const BMAP_MAPTYPE_CONTROL_HORIZONTAL: BMapGL.MapTypeControlType;
declare const BMAP_MAPTYPE_CONTROL_DROPDOWN: BMapGL.MapTypeControlType;
declare const BMAP_MAPTYPE_CONTROL_MAP: BMapGL.MapTypeControlType;
declare const BMAP_STATUS_PERMISSION_DENIED: BMapGL.StatusCode;
declare const BMAP_STATUS_SERVICE_UNAVAILABLE: BMapGL.StatusCode;
declare const BMAP_STATUS_TIMEOUT: BMapGL.StatusCode;

186
types/bmapgl/bmapgl.core.d.ts vendored Normal file
View File

@ -0,0 +1,186 @@
// 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.maptype.d.ts" />
/// <reference path="./bmapgl.panorama.d.ts" />
declare namespace BMapGL {
class Map {
constructor(container: string | HTMLElement, opts?: MapOptions);
enableDragging(): void;
disableDragging(): void;
enableScrollWheelZoom(): void;
disableScrollWheelZoom(): void;
enableDoubleClickZoom(): void;
disableDoubleClickZoom(): void;
enableKeyboard(): void;
disableKeyboard(): void;
enableInertialDragging(): void;
disableInertialDragging(): void;
enableContinuousZoom(): void;
disableContinuousZoom(): void;
enablePinchToZoom(): void;
disablePinchToZoom(): void;
enableAutoResize(): void;
disableAutoResize(): void;
setDefaultCursor(cursor: string): void;
getDefaultCursor(): string;
setDraggingCursor(cursor: string): void;
getDraggingCursor(): string;
setMinZoom(zoom: number): void;
setMaxZoom(zoom: number): void;
setMapStyle(mapStyle: MapStyle): void;
setMapStyleV2(style: MapStyleV2): void;
setPanorama(pano: Panorama): void;
disable3DBuilding(): void;
getBounds(): Bounds;
getCenter(): Point;
getDistance(start: Point, end: Point): number;
getMapType(): MapType;
getSize(): Size;
getViewport(view: Point[], viewportOptions?: ViewportOptions): Viewport;
getZoom(): number;
getPanorama(): Panorama;
centerAndZoom(center: Point, zoom: number): void;
centerAndZoom(city: string): void;
panTo(center: Point, opts?: PanOptions): void;
panBy(x: number, y: number, opts?: PanOptions): void;
reset(): void;
setCenter(center: Point | string): void;
setCurrentCity(city: string): void;
setMapType(mapType: MapType): void;
setViewport(view: Point[], viewportOptions?: ViewportOptions): void;
setZoom(zoom: number): void;
highResolutionEnabled(): boolean;
zoomIn(): void;
zoomOut(): void;
addHotspot(hotspot: Hotspot): void;
removeHotspot(hotspot: Hotspot): void;
clearHotspots(): void;
addControl(control: Control): void;
removeControl(control: Control): void;
getContainer(): HTMLElement;
addContextMenu(menu: ContextMenu): void;
removeContextMenu(menu: ContextMenu): void;
addOverlay(overlay: Overlay): void;
removeOverlay(overlay: Overlay): void;
clearOverlays(): void;
openInfoWindow(infoWnd: InfoWindow, point: Point): void;
closeInfoWindow(): void;
pointToOverlayPixel(point: Point): Pixel;
overlayPixelToPoint(pixel: Pixel): Point;
getInfoWindow(): InfoWindow;
getOverlays(): Overlay[];
getPanes(): MapPanes;
addTileLayer(tileLayer: TileLayer): void;
removeTileLayer(tilelayer: TileLayer): void;
getTileLayer(mapType: string): TileLayer;
pixelToPoint(pixel: Pixel): Point;
pointToPixel(point: Point): Pixel;
onclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void;
ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onrightclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void;
onrightdblclick: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void;
onmaptypechange: (event: { type: string, target: any }) => void;
onmousemove: (event: { type: string, target: any, point: Point, pixel: Pixel, overlay: Overlay }) => void;
onmouseover: (event: { type: string, target: any }) => void;
onmouseout: (event: { type: string, target: any }) => void;
onmovestart: (event: { type: string, target: any }) => void;
onmoving: (event: { type: string, target: any }) => void;
onmoveend: (event: { type: string, target: any }) => void;
onzoomstart: (event: { type: string, target: any }) => void;
onzoomend: (event: { type: string, target: any }) => void;
onaddoverlay: (event: { type: string, target: any }) => void;
onaddcontrol: (event: { type: string, target: any }) => void;
onremovecontrol: (event: { type: string, target: any }) => void;
onremoveoverlay: (event: { type: string, target: any }) => void;
onclearoverlays: (event: { type: string, target: any }) => void;
ondragstart: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
ondragging: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
ondragend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onaddtilelayer: (event: { type: string, target: any }) => void;
onremovetilelayer: (event: { type: string, target: any }) => void;
onload: (event: { type: string, target: any, point: Point, pixel: Pixel, zoom: number }) => void;
onresize: (event: { type: string, target: any, size: Size }) => void;
onhotspotclick: (event: { type: string, target: any, spots: HotspotOptions }) => void;
onhotspotover: (event: { type: string, target: any, spots: HotspotOptions }) => void;
onhotspotout: (event: { type: string, target: any, spots: HotspotOptions }) => void;
ontilesloaded: (event: { type: string, target: any }) => void;
ontouchstart: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
ontouchmove: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
ontouchend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onlongpress: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
addEventListener(event: string, handler: Callback): void;
removeEventListener(event: string, handler: Callback): void;
}
interface PanOptions {
noAnimation?: boolean;
}
interface MapOptions {
minZoom?: number;
maxZoom?: number;
mapType?: MapType;
enableHighResolution?: boolean;
enableAutoResize?: boolean;
enableMapClick?: boolean;
}
interface Viewport {
center: Point;
zoom: number;
}
interface ViewportOptions {
enableAnimation?: boolean;
margins?: number[];
zoomFactor?: number;
delay?: number;
}
type APIVersion = number;
interface MapStyle {
features: any[];
style: string;
}
interface MapStyleItem {
featureType?: string;
elementType?: string;
stylers: MapStyleItemStylers;
}
interface MapStyleItemStylers {
[k: string]: string | undefined;
color?: string;
visibility?: string;
level?: string;
curZoomRegionId?: string;
curZoomRegion?: string;
fontsize?: string;
weight?: string;
}
type MapStyleV2 = { styleJson: MapStyleItem[] } | { styleId: string };
}
declare const BMAP_API_VERSION: BMapGL.APIVersion;

94
types/bmapgl/bmapgl.maplayer.d.ts vendored Normal file
View File

@ -0,0 +1,94 @@
// 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.control.d.ts" />
declare namespace BMapGL {
class TileLayer {
constructor(opts?: TileLayerOptions);
getTilesUrl(tileCoord: Pixel, zoom: number): string;
getCopyright(): Copyright;
isTransparentPng(): boolean;
}
interface TileLayerOptions {
transparentPng?: boolean;
tileUrlTemplate?: string;
copyright?: Copyright;
zIndex?: number;
}
class TrafficLayer extends TileLayer {
constructor(opts?: TrafficLayerOptions);
}
interface TrafficLayerOptions {
predictDate?: PredictDate;
}
interface PredictDate {
weekday: number;
hour: number;
}
class CustomLayer extends TileLayer {
constructor(opts: CustomLayerOptions);
onhotspotclick: (event: { type: string, target: any, content: any }) => void;
}
interface Custompoi {
poiId: string;
databoxId: string;
title: string;
address: string;
phoneNumber: string;
postcode: string;
provinceCode: number;
province: string;
cityCode: number;
city: string;
districtCode: number;
district: string;
point: Point;
tags: string[];
typeId: number;
extendedData: any;
}
class PanoramaCoverageLayer extends TileLayer {
constructor();
}
interface CustomLayerOptions {
databoxId?: string;
geotableId?: string;
q?: string;
tags?: string;
filter?: string;
pointDensityType?: PointDensityType;
}
type PointDensityType = number;
}
declare const BMAP_POINT_DENSITY_HIGH: BMapGL.PointDensityType;
declare const BMAP_POINT_DENSITY_MEDIUM: BMapGL.PointDensityType;
declare const BMAP_POINT_DENSITY_LOW: BMapGL.PointDensityType;

61
types/bmapgl/bmapgl.maptype.d.ts vendored Normal file
View File

@ -0,0 +1,61 @@
// 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 BMAP_PERSPECTIVE_MAP: BMapGL.MapType;
declare const BMAP_SATELLITE_MAP: BMapGL.MapType;
declare const BMAP_HYBRID_MAP: BMapGL.MapType;

469
types/bmapgl/bmapgl.overlay.d.ts vendored Normal file
View File

@ -0,0 +1,469 @@
// 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.core.d.ts" />
/// <reference path="./bmapgl.rightmenu.d.ts" />
declare namespace BMapGL {
interface Overlay {
initialize?(map: Map): HTMLElement;
isVisible?(): boolean;
draw?(): void;
show?(): void;
hide?(): void;
}
type SymbolShapeType = number;
interface PolylineOptions {
strokeColor?: string;
strokeWeight?: number;
strokeOpacity?: number;
strokeStyle?: string;
enableMassClear?: boolean;
enableEditing?: boolean;
enableClicking?: boolean;
}
interface GroundOverlayOptions {
opacity?: number;
imageURL?: string;
displayOnMinLevel?: number;
displayOnMaxLevel?: number;
}
interface Marker extends Overlay {
openInfoWindow(infoWnd: InfoWindow): void;
closeInfoWindow(): void;
setIcon(icon: Icon): void;
getIcon(): Icon;
setPosition(position: Point): void;
getPosition(): Point;
setOffset(offset: Size): void;
getOffset(): Size;
setLabel(label: Label): void;
getLabel(): Label;
setTitle(title: string): void;
getTitle(): string;
setTop(isTop: boolean): void;
enableDragging(): void;
disableDragging(): void;
enableMassClear(): void;
disableMassClear(): void;
setZIndex(zIndex: number): void;
getMap(): Map;
addContextMenu(menu: ContextMenu): void;
removeContextMenu(menu: ContextMenu): void;
setAnimation(animation?: Animation): void;
setRotation(rotation: number): void;
getRotation(): number;
setShadow(shadow: Icon): void;
getShadow(): void;
addEventListener(event: string, handler: Callback): void;
removeEventListener(event: string, handler: Callback): void;
onclick: (event: { type: string, target: any }) => void;
ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onremove: (event: { type: string, target: any }) => void;
oninfowindowclose: (event: { type: string, target: any }) => void;
oninfowindowopen: (event: { type: string, target: any }) => void;
ondragstart: (event: { type: string, target: any }) => void;
ondragging: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
ondragend: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onrightclick: (event: { type: string, target: any }) => void;
}
class Marker {
constructor(point: Point, opts?: MarkerOptions);
}
interface SymbolOptions {
anchor?: Size;
fillColor?: string;
fillOpacity?: number;
scale?: number;
rotation?: number;
strokeColor?: string;
strokeOpacity?: number;
strokeWeight?: number;
}
class IconSequence {
constructor(symbol: symbol, offset?: string, repeat?: string, fixedRotation?: boolean);
}
interface PointCollection extends Overlay {
setPoints(points: Point[]): void;
setStyles(styles: PointCollectionOption): void;
clear(): void;
onclick: (event: { type: string, target: any, point: Point }) => void;
onmouseover: (event: { type: string, target: any, point: Point }) => void;
onmouseout: (event: { type: string, target: any, point: Point }) => void;
}
class PointCollection {
constructor(points: Point[], opts?: PointCollectionOption);
}
interface MarkerOptions {
offset?: Size;
icon?: Icon;
enableMassClear?: boolean;
enableDragging?: boolean;
enableClicking?: boolean;
raiseOnDrag?: boolean;
draggingCursor?: string;
rotation?: number;
shadow?: Icon;
title?: string;
}
interface InfoWindow extends Overlay {
setWidth(width: number): void;
setHeight(height: number): void;
redraw(): void;
setTitle(title: string | HTMLElement): void;
getTitle(): string | HTMLElement;
setContent(content: string | HTMLElement): void;
getContent(): string | HTMLElement;
getPosition(): Point;
enableMaximize(): void;
disableMaximize(): void;
isOpen(): boolean;
setMaxContent(content: string): void;
maximize(): void;
restore(): void;
enableAutoPan(): void;
disableAutoPan(): void;
enableCloseOnClick(): void;
disableCloseOnClick(): void;
addEventListener(event: string, handler: Callback): void;
removeEventListener(event: string, handler: Callback): void;
onclose: (event: { type: string, target: any, point: Point }) => void;
onopen: (event: { type: string, target: any, point: Point }) => void;
onmaximize: (event: { type: string, target: any }) => void;
onrestore: (event: { type: string, target: any }) => void;
onclickclose: (event: { type: string, target: any }) => void;
}
class InfoWindow {
constructor(content: string | HTMLElement, opts?: InfoWindowOptions);
}
interface Polygon extends Overlay {
setPath(path: Point[]): void;
getPath(): Point[];
setStrokeColor(color: string): void;
getStrokeColor(): string;
setFillColor(color: string): void;
getFillColor(): string;
setStrokeOpacity(opacity: number): void;
getStrokeOpacity(): number;
setFillOpacity(opacity: number): void;
getFillOpacity(): number;
setStrokeWeight(weight: number): void;
getStrokeWeight(): number;
setStrokeStyle(style: string): void;
getStrokeStyle(): string;
getBounds(): Bounds;
enableEditing(): void;
disableEditing(): void;
enableMassClear(): void;
disableMassClear(): void;
setPointAt(index: number, point: Point): void;
setPositionAt(index: number, point: Point): void;
getMap(): Map;
addEventListener(event: string, handler: Callback): void;
removeEventListener(event: string, handler: Callback): void;
onclick: (event: { type: string, target: any }) => void;
ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onremove: (event: { type: string, target: any }) => void;
onlineupdate: (event: { type: string, target: any }) => void;
}
class Polygon {
constructor(points: Point[], opts?: PolygonOptions);
}
interface PointCollectionOption {
shape?: ShapeType;
color?: string;
size?: SizeType;
}
type Animation = number;
interface InfoWindowOptions {
width?: number;
height?: number;
maxWidth?: number;
offset?: Size;
title?: string;
enableAutoPan?: boolean;
enableCloseOnClick?: boolean;
enableMessage?: boolean;
message?: string;
}
interface PolygonOptions {
strokeColor?: string;
fillColor?: string;
strokeWeight?: number;
strokeOpacity?: number;
fillOpacity?: number;
strokeStyle?: string;
enableMassClear?: boolean;
enableEditing?: boolean;
enableClicking?: boolean;
}
type ShapeType = number;
interface Icon extends Overlay {
anchor: Size;
size: Size;
imageOffset: Size;
imageSize: Size;
imageUrl: Size;
infoWindowAnchor: Size;
printImageUrl: string;
setImageUrl(imageUrl: string): void;
setSize(size: Size): void;
setImageSize(offset: Size): void;
setAnchor(anchor: Size): void;
setImageOffset(offset: Size): void;
setInfoWindowAnchor(anchor: Size): void;
setPrintImageUrl(url: string): void;
}
class Icon {
constructor(url: string, size: Size, opts?: IconOptions);
}
interface Label extends Overlay {
setStyle(styles: { [name: string]: string | number; }): void;
setContent(content: string): void;
setPosition(position: Point): void;
getPosition(): Point;
setOffset(offset: Size): void;
getOffset(): Size;
setTitle(title: string): void;
getTitle(): string;
enableMassClear(): void;
disableMassClear(): void;
setZIndex(zIndex: number): void;
getMap(): Map;
addEventListener(event: string, handler: Callback): void;
removeEventListener(event: string, handler: Callback): void;
onclick: (event: { type: string, target: any }) => void;
ondblclick: (event: { type: string, target: any }) => void;
onmousedown: (event: { type: string, target: any }) => void;
onmouseup: (event: { type: string, target: any }) => void;
onmouseout: (event: { type: string, target: any }) => void;
onmouseover: (event: { type: string, target: any }) => void;
onremove: (event: { type: string, target: any }) => void;
onrightclick: (event: { type: string, target: any }) => void;
}
class Label {
constructor(content: string, opts?: LabelOptions);
}
interface Circle extends Overlay {
setCenter(center: Point): void;
getCenter(): Point;
setRadius(radius: number): void;
getRadius(): number;
getBounds(): Bounds;
setStrokeColor(color: string): void;
getStrokeColor(): string;
setFillColor(color: string): void;
getFillColor(): string;
setStrokeOpacity(opacity: number): void;
getStrokeOpacity(): number;
setFillOpacity(opacity: number): void;
getFillOpacity(): number;
setStrokeWeight(weight: number): void;
getStrokeWeight(): number;
setStrokeStyle(style: string): void;
getStrokeStyle(): string;
enableEditing(): void;
disableEditing(): void;
enableMassClear(): void;
disableMassClear(): void;
getMap(): Map;
addEventListener(event: string, handler: Callback): void;
removeEventListener(event: string, handler: Callback): void;
onclick: (event: { type: string, target: any }) => void;
ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onremove: (event: { type: string, target: any }) => void;
onlineupdate: (event: { type: string, target: any }) => void;
}
class Circle {
constructor(center: Point, radius: number, opts?: CircleOptions);
}
type SizeType = number;
interface IconOptions {
anchor?: Size;
imageOffset?: Size;
infoWindowAnchor?: Size;
printImageUrl?: string;
}
interface LabelOptions {
offset?: Size;
position?: Point;
enableMassClear?: boolean;
}
interface CircleOptions {
strokeColor?: string;
fillColor?: string;
strokeWeight?: number;
strokeOpacity?: number;
fillOpacity?: number;
strokeStyle?: string;
enableMassClear?: boolean;
enableEditing?: boolean;
enableClicking?: boolean;
}
interface Hotspot extends Overlay {
setPosition(position: Point): void;
getPosition(): Point;
setText(text: string): void;
getText(): string;
setUserData(data: any): void;
getUserData(): any;
}
class Hotspot {
constructor(position: Point, opts?: HotspotOptions);
}
interface Symbol extends Overlay {
setPath(path: string | SymbolShapeType): void;
setAnchor(anchor: Size): void;
setRotation(rotation: number): void;
setScale(scale: number): void;
setStrokeWeight(strokeWeight: number): void;
setStrokeColor(color: string): void;
setStrokeOpacity(opacity: number): void;
setFillOpacity(opacity: number): void;
setFillColor(color: string): void;
}
class Symbol {
constructor(path: string | SymbolShapeType, opts?: SymbolOptions);
}
interface Polyline extends Overlay {
setPath(path: Point[]): void;
getPath(): Point[];
setStrokeColor(color: string): void;
getStrokeColor(): string;
setFillColor(color: string): void;
getFillColor(): string;
setStrokeOpacity(opacity: number): void;
getStrokeOpacity(): number;
setFillOpacity(opacity: number): void;
getFillOpacity(): number;
setStrokeWeight(weight: number): void;
getStrokeWeight(): number;
setStrokeStyle(style: string): void;
getStrokeStyle(): string;
getBounds(): Bounds;
enableEditing(): void;
disableEditing(): void;
enableMassClear(): void;
disableMassClear(): void;
setPointAt(index: number, point: Point): void;
setPositionAt(index: number, point: Point): void;
getMap(): Map;
addEventListener(event: string, handler: Callback): void;
removeEventListener(event: string, handler: Callback): void;
onclick: (event: { type: string, target: any }) => void;
ondblclick: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmousedown: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseup: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseout: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onmouseover: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onremove: (event: { type: string, target: any }) => void;
onlineupdate: (event: { type: string, target: any }) => void;
}
class Polyline {
constructor(points: Point[], opts?: PolylineOptions);
}
interface GroundOverlay extends Overlay {
setBounds(bounds: Bounds): void;
getBounds(): Bounds;
setOpacity(opcity: number): void;
getOpacity(): number;
setImageURL(url: string): void;
getImageURL(): string;
setDisplayOnMinLevel(level: number): void;
getDisplayOnMinLevel(): number;
setDispalyOnMaxLevel(level: number): void;
getDispalyOnMaxLevel(): number;
onclick: (event: { type: string, target: any }) => void;
ondblclick: (event: { type: string, target: any }) => void;
}
class GroundOverlay {
constructor(bounds: Bounds, opts?: GroundOverlayOptions);
}
interface HotspotOptions {
text?: string;
offsets?: number[];
userData?: any;
minZoom?: number;
maxZoom?: number;
}
interface MapPanes {
floatPane?: HTMLElement;
markerMouseTarget?: HTMLElement;
floatShadow?: HTMLElement;
labelPane?: HTMLElement;
markerPane?: HTMLElement;
markerShadow?: HTMLElement;
mapPane?: HTMLElement;
}
}
declare const BMap_Symbol_SHAPE_CIRCLE: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_RECTANGLE: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_RHOMBUS: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_STAR: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_POINT: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_PLANE: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_CAMERA: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_WARNING: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_SMILE: BMapGL.SymbolShapeType;
declare const BMap_Symbol_SHAPE_CLOCK: BMapGL.SymbolShapeType;
declare const BMAP_ANIMATION_DROP: BMapGL.Animation;
declare const BMAP_ANIMATION_BOUNCE: BMapGL.Animation;
declare const BMAP_POINT_SHAPE_CIRCLE: BMapGL.ShapeType;
declare const APE_STAR: BMapGL.ShapeType;
declare const APE_SQUARE: BMapGL.ShapeType;
declare const APE_RHOMBUS: BMapGL.ShapeType;
declare const APE_WATERDROP: BMapGL.ShapeType;
declare const BMAP_POINT_SIZE_TINY: BMapGL.SizeType;
declare const BMAP_POINT_SIZE_SMALLER: BMapGL.SizeType;
declare const BMAP_POINT_SIZE_SMALL: BMapGL.SizeType;
declare const BMAP_POINT_SIZE_NORMAL: BMapGL.SizeType;
declare const BMAP_POINT_SIZE_BIG: BMapGL.SizeType;
declare const BMAP_POINT_SIZE_BIGGER: BMapGL.SizeType;
declare const BMAP_POINT_SIZE_HUGE: BMapGL.SizeType;

133
types/bmapgl/bmapgl.panorama.d.ts vendored Normal file
View File

@ -0,0 +1,133 @@
// 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.control.d.ts" />
declare namespace BMapGL {
class Panorama {
constructor(container: string | HTMLElement, opts?: PanoramaOptions);
getLinks(): PanoramaLink[];
getId(): string;
getPosition(): Point;
getPov(): PanoramaPov;
getZoom(): number;
setId(id: string): void;
setPosition(position: Point): void;
setPov(pov: PanoramaPov): void;
setZoom(zoom: number): void;
enableScrollWheelZoom(): void;
disableScrollWheelZoom(): void;
show(): void;
hide(): void;
addOverlay(overlay: PanoramaLabel): void;
removeOverlay(overlay: PanoramaLabel): void;
getSceneType(): PanoramaSceneType;
setOptions(opts?: PanoramaOptions): void;
setPanoramaPOIType(): PanoramaPOIType;
onposition_changed: () => void;
onlinks_changed: () => void;
onpov_changed: () => void;
onzoom_changed: () => void;
onscene_type_changed: () => void;
}
interface PanoramaOptions {
navigationControl?: boolean;
linksControl?: boolean;
indoorSceneSwitchControl?: boolean;
albumsControl?: boolean;
albumsControlOptions?: AlbumsControlOptions;
}
interface PanoramaLink {
description: string;
heading: string;
id: string;
}
interface PanoramaPov {
heading: number;
pitch: number;
}
class PanoramaService {
constructor();
getPanoramaById(id: string, callback: (data: PanoramaData) => void): void;
getPanoramaByLocation(point: Point, radius?: number, callback?: (data: PanoramaData) => void): void;
}
interface PanoramaData {
id: string;
description: string;
links: PanoramaLink[];
position: Point;
tiles: PanoramaTileData;
}
interface PanoramaTileData {
centerHeading: number;
tileSize: Size;
worldSize: Size;
}
class PanoramaLabel {
constructor(content: string, opts?: PanoramaLabelOptions);
setPosition(position: Point): void;
getPosition(): Point;
getPov(): PanoramaPov;
setContent(content: string): void;
getContent(): string;
show(): void;
hide(): void;
setAltitude(altitude: number): void;
getAltitude(): number;
addEventListener(event: string, handler: Callback): void;
removeEventListener(event: string, handler: Callback): void;
onclick: (event: { type: string, target: any }) => void;
onmouseover: (event: { type: string, target: any }) => void;
onmouseout: (event: { type: string, target: any }) => void;
onremove: (event: { type: string, target: any }) => void;
}
interface PanoramaLabelOptions {
position?: Point;
altitude?: number;
}
interface AlbumsControlOptions {
anchor?: ControlAnchor;
offset?: Size;
maxWidth?: number | string;
imageHeight?: number;
}
type PanoramaSceneType = string;
type PanoramaPOIType = string;
}
declare const BMAP_PANORAMA_INDOOR_SCENE: string;
declare const BMAP_PANORAMA_STREET_SCENE: string;
declare const BMAP_PANORAMA_POI_HOTEL: string;
declare const BMAP_PANORAMA_POI_CATERING: string;
declare const BMAP_PANORAMA_POI_MOVIE: string;
declare const BMAP_PANORAMA_POI_TRANSIT: string;
declare const BMAP_PANORAMA_POI_INDOOR_SCENE: string;
declare const BMAP_PANORAMA_POI_NONE: string;

59
types/bmapgl/bmapgl.rightmenu.d.ts vendored Normal file
View File

@ -0,0 +1,59 @@
// 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" />
declare namespace BMapGL {
type ContextMenuIcon = string;
interface MenuItemOptions {
width?: number;
id?: string;
iconUrl?: string;
}
class MenuItem {
constructor(text: string, callback: (point: Point) => void, opts?: MenuItemOptions);
setText(text: string): void;
setIcon(iconUrl: string): void;
enable(): void;
disable(): void;
}
class ContextMenu {
constructor();
addItem(item: MenuItem): void;
getItem(index: number): MenuItem;
removeItem(item: MenuItem): void;
addSeparator(): void;
removeSeparator(index: number): void;
onopen: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
onclose: (event: { type: string, target: any, point: Point, pixel: Pixel }) => void;
}
}
declare const BMAP_CONTEXT_MENU_ICON_ZOOMIN: string;
declare const BMAP_CONTEXT_MENU_ICON_ZOOMOUT: string;

456
types/bmapgl/bmapgl.service.d.ts vendored Normal file
View File

@ -0,0 +1,456 @@
// 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.core.d.ts" />
declare namespace BMapGL {
interface LocalSearchSearchOptions {
forceLocal: boolean;
customData: any;
}
class LocalSearch {
constructor(location: Map | Point | string, opts?: LocalSearchOptions);
search(keyword: string | string[], option?: LocalSearchSearchOptions): void;
searchInBounds(keyword: string | string[], bounds: Bounds, option?: {
customData: any;
}): void;
searchNearby(keyword: string | string[], center: LocalResultPoi | string | Point, radius: number, option?: {
customData: any;
}): void;
getResults(): LocalResult | LocalResult[];
clearResults(): void;
gotoPage(page: number): void;
enableAutoViewport(): void;
disableAutoViewport(): void;
enableFirstResultSelection(): void;
disableFirstResultSelection(): void;
setLocation(location: Map | Point | string): void;
setPageCapacity(capacity: number): void;
getPageCapacity(): number;
setSearchCompleteCallback(callback: (results: LocalResult | LocalResult[]) => void): void;
setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void;
setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void;
setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void;
getStatus(): ServiceStatusCode;
}
type LineType = number;
interface WalkingRouteResult {
city: string;
getStart(): LocalResultPoi;
getEnd(): LocalResultPoi;
getNumPlans(): number;
getPlan(i: number): RoutePlan;
}
class BusLineSearch {
constructor(location: Map | Point | string, opts?: BusLineSearchOptions);
getBusList(keyword: string): void;
getBusLine(busLstItem: BusListItem): void;
clearResults(): void;
enableAutoViewport(): void;
disableAutoViewport(): void;
setLocation(location: Map | Point | string): void;
getStatus(): ServiceStatusCode;
toString(): string;
setGetBusListCompleteCallback(callback: (rs: BusListResult) => void): void;
setGetBusLineCompleteCallback(callback: (rs: BusLine) => void): void;
setBusListHtmlSetCallback(callback: (container: HTMLElement) => void): void;
setBusLineHtmlSetCallback(callback: (container: HTMLElement) => void): void;
setPolylinesSetCallback(callback: (ply: Polyline) => void): void;
setMarkersSetCallback(callback: (markers: Marker[]) => void): void;
}
interface LocalSearchOptions {
renderOptions?: RenderOptions;
onMarkersSet?: (pois: LocalResultPoi[]) => void;
onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void;
onResultsHtmlSet?: (container: HTMLElement) => void;
pageCapacity?: number;
onSearchComplete?: (results: LocalResult[]) => void;
}
class DrivingRoute {
constructor(location: Map | Point | string, opts?: DrivingRouteOptions);
search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi): void;
getResults(): DrivingRouteResult;
clearResults(): void;
enableAutoViewport(): void;
disableAutoViewport(): void;
setLocation(location: Map | Point | string): void;
setPolicy(policy: DrivingPolicy): void;
setSearchCompleteCallback(callback: (results: DrivingRouteResult) => void): void;
setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void;
setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void;
setPolylinesSetCallback(callback: (routes: Route[]) => void): void;
setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void;
getStatus(): ServiceStatusCode;
toString(): string;
}
class Geocoder {
constructor();
getPoint(address: string, callback: (point: Point) => void, city: string): void;
getLocation(point: Point, callback: (result: GeocoderResult) => void, opts?: LocationOptions): void;
}
interface BusLineSearchOptions {
renderOptions?: RenderOptions;
onGetBusListComplete?: (rs: BusListResult) => void;
onGetBusLineComplete?: (rs: BusLine) => void;
onBusListHtmlSet?: (container: HTMLElement) => void;
onBusLineHtmlSet?: (container: HTMLElement) => void;
onPolylinesSet?: (ply: Polyline) => void;
onMarkersSet?: (sts: Marker[]) => void;
}
interface CustomData {
geotableId: number;
tags: string;
filter: string;
}
interface DrivingRouteOptions {
renderOptions?: RenderOptions;
policy?: DrivingPolicy;
onSearchComplete?: (results: DrivingRouteResult) => void;
onMarkersSet?: (pois: LocalResultPoi[]) => void;
onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void;
onPolylinesSet?: (routes: Route[]) => void;
onResultsHtmlSet?: (container: HTMLElement) => void;
}
interface GeocoderResult {
point: Point;
address: string;
addressComponents: AddressComponent;
surroundingPoi: LocalResultPoi[];
business: string;
}
interface BusListResult {
keyword: string;
city: string;
moreResultsUrl: string;
getNumBusList(): number;
getBusListItem(i: number): BusListItem;
}
interface RenderOptions {
map: Map;
panel?: string | HTMLElement;
selectFirstResult?: boolean;
autoViewport?: boolean;
highlightMode?: HighlightModes;
}
type DrivingPolicy = number;
interface AddressComponent {
streetNumber: string;
street: string;
district: string;
city: string;
province: string;
}
interface BusLine {
name: string;
startTime: string;
endTime: string;
company: string;
getNumBusStations(): string;
getBusStation(i: number): BusStation;
getPath(): Point[];
getPolyline(): Polyline;
}
interface LocalResult {
keyword: string;
center: LocalResultPoi;
radius: number;
bounds: Bounds;
city: string;
moreResultsUrl: string;
province: string;
suggestions: string[];
getPoi(i: number): LocalResultPoi;
getCurrentNumPois(): number;
getNumPois(): number;
getNumPages(): number;
getPageIndex(): number;
getCityList(): any[];
}
interface DrivingRouteResult {
policy: DrivingPolicy;
city: string;
moreResultsUrl: string;
taxiFare: TaxiFare;
getStart(): LocalResultPoi;
getEnd(): LocalResultPoi;
getNumPlans(): number;
getPlan(i: number): RoutePlan;
}
interface LocationOptions {
poiRadius?: number;
numPois?: number;
}
interface BusListItem {
name: string;
}
interface LocalResultPoi {
title: string;
point: Point;
url: string;
address: string;
city: string;
phoneNumber: string;
postcode: string;
type: PoiType;
isAccurate: boolean;
province: string;
tags: string[];
detailUrl: string;
}
interface TaxiFare {
day: TaxiFareDetail;
night: TaxiFareDetail;
distance: number;
remark: string;
}
class LocalCity {
constructor(opts?: LocalCityOptions);
get(callback: (result: LocalCityResult) => void): void;
}
interface BusStation {
name: string;
position: Point;
}
type PoiType = number;
interface TaxiFareDetail {
initialFare: number;
unitFare: number;
totalFare: number;
}
interface LocalCityOptions {
renderOptions?: RenderOptions;
}
class Autocomplete {
constructor(opts?: AutocompleteOptions);
show(): void;
hide(): void;
setTypes(types: string[]): void;
setLocation(location: string | Map | Point): void;
search(keywords: string): void;
getResults(): AutocompleteResult;
setInputValue(keyword: string): void;
dispose(): void;
onconfirm: (event: { type: string, target: any, item: any }) => void;
onhighlight: (event: { type: string, target: any, fromitem: any, toitem: any }) => void;
}
class TransitRoute {
constructor(location: Map | Point | string, opts?: TransitRouteOptions);
search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi): void;
getResults(): TransitRouteResult;
clearResults(): void;
enableAutoViewport(): void;
disableAutoViewport(): void;
setPageCapacity(capacity: number): void;
setLocation(location: Map | Point | string): void;
setPolicy(policy: TransitPolicy): void;
setSearchCompleteCallback(callback: (results: TransitRouteResult) => void): void;
setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void;
setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void;
setPolylinesSetCallback(callback: (lines: Line[], routes: Route[]) => void): void;
setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void;
getStatus(): ServiceStatusCode;
toString(): string;
}
interface RoutePlan {
getNumRoutes(): number;
getRoute(i: number): Route;
getDistance(format?: boolean): string | number;
getDuration(format?: boolean): string | number;
getDragPois(): LocalResultPoi[];
}
interface LocalCityResult {
center: Point;
level: number;
name: string;
}
interface AutocompleteOptions {
location?: string | Map | Point;
types?: string[];
onSearchComplete?: (result: AutocompleteResult) => void;
input?: string | HTMLElement;
}
interface TransitRouteOptions {
renderOptions?: RenderOptions;
policy?: TransitPolicy;
pageCapacity?: number;
onSearchComplete?: (result: TransitRouteResult) => void;
onMarkersSet?: (pois: LocalResultPoi[], transfers: LocalResultPoi[]) => void;
onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void;
onPolylinesSet?: (lines: Line[]) => void;
onResultsHtmlSet?: (container: HTMLElement) => void;
}
interface Route {
getNumRoutes(): number;
getStep(i: number): Step;
getDistance(format?: boolean): string | number;
getIndex(): number;
getPolyline(): Polyline;
getPoints(): Point[];
getPath(): Point[];
getRouteType(): RouteType;
}
class TrafficControl {
constructor();
setPanelOffset(offset: Size): void;
show(): void;
hide(): void;
}
interface AutocompleteResultPoi {
province: string;
City: string; // wtf
district: string;
street: string;
streetNumber: string;
business: string;
}
type TransitPolicy = number;
type RouteType = number;
class Geolocation {
constructor();
getCurrentPosition(callback: (result: GeolocationResult) => void, opts?: PositionOptions): void;
getStatus(): ServiceStatusCode;
}
interface AutocompleteResult {
keyword: string;
getPoi(i: number): AutocompleteResultPoi;
getNumPois(): number;
}
interface TransitRouteResult {
policy: TransitPolicy;
city: string;
moreResultsUrl: string;
getStart(): LocalResultPoi;
getEnd(): LocalResultPoi;
getNumPlans(): number;
getPlan(i: number): TransitRoutePlan;
}
interface Step {
getPoint(): Point;
getPosition(): Point;
getIndex(): number;
getDescription(includeHtml: boolean): string;
getDistance(format?: boolean): string | number;
}
interface GeolocationResult {
point: Point;
accuracy: number;
}
class Boundary {
constructor();
get(name: string, callback: (result: string[]) => void): void;
}
class Convertor {
translate(points: Point[], from: number, to: number, callback: (result: {
points: Point[];
status: number;
}) => void): void;
}
interface TransitRoutePlan {
getNumLines(): number;
getLine(i: number): Line;
getNumRoutes(): number;
getRoute(i: number): Route;
getDistance(format?: boolean): string | number;
getDuration(format?: boolean): string | number;
getDescription(includeHtml: boolean): string;
}
class WalkingRoute {
constructor(location: Map | Point | string, opts?: WalkingRouteOptions);
search(start: string | Point | LocalResultPoi, end: string | Point | LocalResultPoi): void;
getResults(): WalkingRouteResult;
clearResults(): void;
enableAutoViewport(): void;
disableAutoViewport(): void;
setLocation(location: Map | Point | string): void;
setSearchCompleteCallback(callback: (result: WalkingRouteResult) => void): void;
setMarkersSetCallback(callback: (pois: LocalResultPoi[]) => void): void;
setInfoHtmlSetCallback(callback: (poi: LocalResultPoi, html: HTMLElement) => void): void;
setPolylinesSetCallback(callback: (routes: Route[]) => void): void;
setResultsHtmlSetCallback(callback: (container: HTMLElement) => void): void;
getStatus(): ServiceStatusCode;
toString(): string;
}
interface PositionOptions {
enableHighAccuracy?: boolean;
timeout?: number;
maximumAge?: number;
}
interface Line {
title: string;
type: LineType;
getNumViaStops(): number;
getGetOnStop(): LocalResultPoi;
getGetOffStop(): LocalResultPoi;
getPoints(): Point[];
getPath(): Point[];
getPolyline(): Polyline;
getDistance(format?: boolean): string | number;
}
interface WalkingRouteOptions {
renderOptions?: RenderOptions;
onSearchComplete?: (result: WalkingRouteResult) => void;
onMarkersSet?: (pois: LocalResultPoi[]) => void;
onPolylinesSet?: (routes: Route[]) => void;
onInfoHtmlSet?: (poi: LocalResultPoi, html: HTMLElement) => void;
onResultsHtmlSet?: (container: HTMLElement) => void;
}
type HighlightModes = number;
type ServiceStatusCode = number;
}
declare const BMAP_LINE_TYPE_BUS: BMapGL.LineType;
declare const BMAP_LINE_TYPE_SUBWAY: BMapGL.LineType;
declare const BMAP_LINE_TYPE_FERRY: BMapGL.LineType;
declare const BMAP_DRIVING_POLICY_LEAST_TIME: BMapGL.DrivingPolicy;
declare const BMAP_DRIVING_POLICY_LEAST_DISTANCE: BMapGL.DrivingPolicy;
declare const BMAP_DRIVING_POLICY_AVOID_HIGHWAYS: BMapGL.DrivingPolicy;
declare const BMAP_POI_TYPE_NORMAL: BMapGL.PoiType;
declare const BMAP_POI_TYPE_BUSSTOP: BMapGL.PoiType;
declare const BMAP_POI_TYPE_SUBSTOP: BMapGL.PoiType;
declare const BMAP_TRANSIT_POLICY_LEAST_TIME: BMapGL.TransitPolicy;
declare const BMAP_TRANSIT_POLICY_LEAST_TRANSFER: BMapGL.TransitPolicy;
declare const BMAP_TRANSIT_POLICY_LEAST_WALKING: BMapGL.TransitPolicy;
declare const BMAP_TRANSIT_POLICY_AVOID_SUBWAYS: BMapGL.TransitPolicy;
declare const BMAP_ROUTE_TYPE_DRIVING: BMapGL.RouteType;
declare const BMAP_ROUTE_TYPE_WALKING: BMapGL.RouteType;
declare const BMAP_HIGHLIGHT_STEP: BMapGL.HighlightModes;
declare const BMAP_HIGHLIGHT_ROUTE: BMapGL.HighlightModes;
declare const BMAP_STATUS_SUCCESS: BMapGL.ServiceStatusCode;
declare const BMAP_STATUS_CITY_LIST: BMapGL.ServiceStatusCode;
declare const BMAP_STATUS_UNKNOWN_LOCATION: BMapGL.ServiceStatusCode;
declare const BMAP_STATUS_UNKNOWN_ROUTE: BMapGL.ServiceStatusCode;
declare const BMAP_STATUS_INVALID_KEY: BMapGL.ServiceStatusCode;
declare const BMAP_STATUS_INVALID_REQUEST: BMapGL.ServiceStatusCode;

73
types/bmapgl/bmapgl.tools.d.ts vendored Normal file
View File

@ -0,0 +1,73 @@
// 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.core.d.ts" />
/// <reference path="./bmapgl.overlay.d.ts" />
declare namespace BMapGL {
class PushpinTool {
constructor(map: Map, opts?: PushpinToolOptions)
open(): boolean;
close(): boolean;
setIcon(icon: Icon): Icon;
getIcon(): Icon;
setCursor(cursor: string): string;
getCursor(): string;
toString(): string;
onmarkend: (event: { type: string, target: any, marker: Marker }) => void;
}
interface PushpinToolOptions {
icon?: Icon;
cursor?: string;
followText?: string;
}
class DistanceTool {
constructor(map: Map);
open(): boolean;
close(): void;
toString(): string;
ondrawend: (event: { type: string, target: any, points: Point[], polylines: Polyline[], distance: number }) => void;
}
class DragAndZoomTool {
constructor(map: Map, opts?: DragAndZoomToolOptions);
open(): boolean;
close(): void;
toString(): string;
ondrawend: (event: { type: string, target: any, bounds: Bounds[] }) => void;
}
interface DragAndZoomToolOptions {
zoomType?: ZoomType;
autoClose?: boolean;
followText?: string;
}
type ZoomType = number;
}
declare const BMAP_ZOOM_IN: BMapGL.ZoomType;
declare const BMAP_ZOOM_OUT: BMapGL.ZoomType;

40
types/bmapgl/index.d.ts vendored Normal file
View File

@ -0,0 +1,40 @@
// Type definitions for non-npm package bmapgl-browser
// 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.control.d.ts" />
/// <reference path="./bmapgl.core.d.ts" />
/// <reference path="./bmapgl.maplayer.d.ts" />
/// <reference path="./bmapgl.maptype.d.ts" />
/// <reference path="./bmapgl.overlay.d.ts" />
/// <reference path="./bmapgl.panorama.d.ts" />
/// <reference path="./bmapgl.rightmenu.d.ts" />
/// <reference path="./bmapgl.service.d.ts" />
/// <reference path="./bmapgl.tools.d.ts" />

View File

@ -0,0 +1,24 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"bmapgl-tests.ts"
]
}

7
types/bmapgl/tslint.json Normal file
View File

@ -0,0 +1,7 @@
{
"extends": "dtslint/dt.json",
"rules": {
"dt-header": false,
"no-unnecessary-class": false
}
}