ts-maps 0.2.6 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +21 -0
- package/README.md +202 -141
- package/dist/core-map/assets/embedded-icons.d.ts +8 -0
- package/dist/core-map/control/AttributionControl.d.ts +12 -0
- package/dist/core-map/control/Control.d.ts +14 -0
- package/dist/core-map/control/LayersControl.d.ts +38 -0
- package/dist/core-map/control/ScaleControl.d.ts +14 -0
- package/dist/core-map/control/ZoomControl.d.ts +14 -0
- package/dist/core-map/control/index.d.ts +5 -0
- package/dist/core-map/core/Browser.d.ts +24 -0
- package/dist/core-map/core/Class.d.ts +12 -0
- package/dist/core-map/core/Events.d.ts +31 -0
- package/dist/core-map/core/Handler.d.ts +12 -0
- package/dist/core-map/core/Util.d.ts +24 -0
- package/dist/core-map/core/index.d.ts +7 -0
- package/dist/core-map/dom/Animation.d.ts +50 -0
- package/dist/core-map/dom/DomEvent.DoubleTap.d.ts +6 -0
- package/dist/core-map/dom/DomEvent.PointerEvents.d.ts +4 -0
- package/dist/core-map/dom/DomEvent.d.ts +15 -0
- package/dist/core-map/dom/DomUtil.d.ts +22 -0
- package/dist/core-map/dom/Draggable.d.ts +26 -0
- package/dist/core-map/dom/PosAnimation.d.ts +19 -0
- package/dist/core-map/dom/easing.d.ts +41 -0
- package/dist/core-map/dom/index.d.ts +8 -0
- package/dist/core-map/geo/LatLng.d.ts +18 -0
- package/dist/core-map/geo/LatLngBounds.d.ts +27 -0
- package/dist/core-map/geo/TerrainSource.d.ts +35 -0
- package/dist/core-map/geo/crs/CRS.d.ts +23 -0
- package/dist/core-map/geo/crs/EPSG3395.d.ts +7 -0
- package/dist/core-map/geo/crs/EPSG3857.d.ts +10 -0
- package/dist/core-map/geo/crs/EPSG4326.d.ts +7 -0
- package/dist/core-map/geo/crs/EarthCRS.d.ts +7 -0
- package/dist/core-map/geo/crs/SimpleCRS.d.ts +11 -0
- package/dist/core-map/geo/crs/index.d.ts +6 -0
- package/dist/core-map/geo/elevation.d.ts +23 -0
- package/dist/core-map/geo/index.d.ts +13 -0
- package/dist/core-map/geo/index.js +1204 -0
- package/dist/core-map/geo/projection/Projection.Globe.d.ts +30 -0
- package/dist/core-map/geo/projection/Projection.LonLat.d.ts +11 -0
- package/dist/core-map/geo/projection/Projection.Mercator.d.ts +6 -0
- package/dist/core-map/geo/projection/Projection.SphericalMercator.d.ts +6 -0
- package/dist/core-map/geo/projection/index.d.ts +5 -0
- package/dist/core-map/geo/terrainMesh.d.ts +21 -0
- package/dist/core-map/geometry/Bounds.d.ts +23 -0
- package/dist/core-map/geometry/LineUtil.d.ts +13 -0
- package/dist/core-map/geometry/Point.d.ts +35 -0
- package/dist/core-map/geometry/PolyUtil.d.ts +6 -0
- package/dist/core-map/geometry/RTree.d.ts +35 -0
- package/dist/core-map/geometry/Transformation.d.ts +12 -0
- package/dist/core-map/geometry/earcut.d.ts +17 -0
- package/dist/core-map/geometry/index.d.ts +10 -0
- package/dist/core-map/geometry/index.js +1586 -0
- package/dist/core-map/index.d.ts +59 -0
- package/dist/core-map/layer/BlanketOverlay.d.ts +24 -0
- package/dist/core-map/layer/DivOverlay.d.ts +40 -0
- package/dist/core-map/layer/FeatureGroup.d.ts +11 -0
- package/dist/core-map/layer/GeoJSON.d.ts +17 -0
- package/dist/core-map/layer/GeoJSONClusterSource.d.ts +54 -0
- package/dist/core-map/layer/HeatmapLayer.d.ts +40 -0
- package/dist/core-map/layer/ImageOverlay.d.ts +27 -0
- package/dist/core-map/layer/Layer.d.ts +18 -0
- package/dist/core-map/layer/LayerGroup.d.ts +16 -0
- package/dist/core-map/layer/Popup.d.ts +18 -0
- package/dist/core-map/layer/SVGOverlay.d.ts +4 -0
- package/dist/core-map/layer/Tooltip.d.ts +15 -0
- package/dist/core-map/layer/VideoOverlay.d.ts +4 -0
- package/dist/core-map/layer/index.d.ts +18 -0
- package/dist/core-map/layer/marker/DefaultIcon.d.ts +7 -0
- package/dist/core-map/layer/marker/DivIcon.d.ts +5 -0
- package/dist/core-map/layer/marker/Icon.d.ts +10 -0
- package/dist/core-map/layer/marker/Marker.Drag.d.ts +17 -0
- package/dist/core-map/layer/marker/Marker.d.ts +37 -0
- package/dist/core-map/layer/marker/index.d.ts +5 -0
- package/dist/core-map/layer/tile/GridLayer.d.ts +88 -0
- package/dist/core-map/layer/tile/RasterDEMLayer.d.ts +46 -0
- package/dist/core-map/layer/tile/TileLayer.d.ts +22 -0
- package/dist/core-map/layer/tile/VectorTileMapLayer.d.ts +145 -0
- package/dist/core-map/layer/tile/WMSTileLayer.d.ts +12 -0
- package/dist/core-map/layer/tile/index.d.ts +15 -0
- package/dist/core-map/layer/tile/urlTemplate.d.ts +17 -0
- package/dist/core-map/layer/vector/Canvas.d.ts +52 -0
- package/dist/core-map/layer/vector/Circle.d.ts +7 -0
- package/dist/core-map/layer/vector/CircleMarker.d.ts +22 -0
- package/dist/core-map/layer/vector/Path.d.ts +20 -0
- package/dist/core-map/layer/vector/Polygon.d.ts +13 -0
- package/dist/core-map/layer/vector/Polyline.d.ts +30 -0
- package/dist/core-map/layer/vector/Rectangle.d.ts +6 -0
- package/dist/core-map/layer/vector/Renderer.d.ts +12 -0
- package/dist/core-map/layer/vector/Renderer.getRenderer.d.ts +1 -0
- package/dist/core-map/layer/vector/SVG.d.ts +21 -0
- package/dist/core-map/layer/vector/index.d.ts +10 -0
- package/dist/core-map/map/Map.d.ts +353 -0
- package/dist/core-map/map/Style.d.ts +29 -0
- package/dist/core-map/map/handler/BoxZoomHandler.d.ts +23 -0
- package/dist/core-map/map/handler/DoubleClickZoomHandler.d.ts +6 -0
- package/dist/core-map/map/handler/DragHandler.d.ts +27 -0
- package/dist/core-map/map/handler/KeyboardHandler.d.ts +18 -0
- package/dist/core-map/map/handler/PinchZoomHandler.d.ts +20 -0
- package/dist/core-map/map/handler/ScrollWheelZoomHandler.d.ts +12 -0
- package/dist/core-map/map/handler/TapHoldHandler.d.ts +15 -0
- package/dist/core-map/map/handler/TwoFingerPitchHandler.d.ts +21 -0
- package/dist/core-map/map/handler/TwoFingerRotateHandler.d.ts +17 -0
- package/dist/core-map/map/index.d.ts +11 -0
- package/dist/core-map/mvt/VectorTile.d.ts +9 -0
- package/dist/core-map/mvt/VectorTileFeature.d.ts +59 -0
- package/dist/core-map/mvt/VectorTileLayer.d.ts +13 -0
- package/dist/core-map/proto/Pbf.d.ts +84 -0
- package/dist/core-map/renderer/webgl/GLContext.d.ts +22 -0
- package/dist/core-map/renderer/webgl/WebGLTileRenderer.d.ts +86 -0
- package/dist/core-map/renderer/webgl/index.d.ts +9 -0
- package/dist/core-map/renderer/webgl/mat4.d.ts +14 -0
- package/dist/core-map/services/index.d.ts +26 -0
- package/dist/core-map/services/index.js +1230 -0
- package/dist/core-map/services/providers/Google.d.ts +16 -0
- package/dist/core-map/services/providers/Mapbox.d.ts +26 -0
- package/dist/core-map/services/providers/Maptiler.d.ts +11 -0
- package/dist/core-map/services/providers/Nominatim.d.ts +11 -0
- package/dist/core-map/services/providers/OSRM.d.ts +20 -0
- package/dist/core-map/services/providers/Photon.d.ts +10 -0
- package/dist/core-map/services/providers/Valhalla.d.ts +20 -0
- package/dist/core-map/services/types.d.ts +84 -0
- package/dist/core-map/storage/TileCache.d.ts +40 -0
- package/dist/core-map/storage/cachedFetch.d.ts +13 -0
- package/dist/core-map/storage/defaultCache.d.ts +3 -0
- package/dist/core-map/storage/index.d.ts +13 -0
- package/dist/core-map/storage/index.js +283 -0
- package/dist/core-map/storage/offlineRegion.d.ts +26 -0
- package/dist/core-map/style-spec/diff.d.ts +17 -0
- package/dist/core-map/style-spec/expressions/Color.d.ts +16 -0
- package/dist/core-map/style-spec/expressions/compile.d.ts +4 -0
- package/dist/core-map/style-spec/expressions/errors.d.ts +8 -0
- package/dist/core-map/style-spec/expressions/index.d.ts +16 -0
- package/dist/core-map/style-spec/expressions/legacyFilter.d.ts +6 -0
- package/dist/core-map/style-spec/expressions/operators/conversion.d.ts +1 -0
- package/dist/core-map/style-spec/expressions/operators/interpolate.d.ts +14 -0
- package/dist/core-map/style-spec/expressions/operators/logical.d.ts +1 -0
- package/dist/core-map/style-spec/expressions/operators/lookup.d.ts +1 -0
- package/dist/core-map/style-spec/expressions/operators/math.d.ts +1 -0
- package/dist/core-map/style-spec/expressions/operators/string.d.ts +1 -0
- package/dist/core-map/style-spec/expressions/registry.d.ts +29 -0
- package/dist/core-map/style-spec/expressions/types.d.ts +48 -0
- package/dist/core-map/style-spec/expressions/validate.d.ts +13 -0
- package/dist/core-map/style-spec/index.d.ts +68 -0
- package/dist/core-map/style-spec/index.js +2529 -0
- package/dist/core-map/style-spec/schema.d.ts +381 -0
- package/dist/core-map/style-spec/types.d.ts +375 -0
- package/dist/core-map/style-spec/validate.d.ts +14 -0
- package/dist/core-map/symbols/CollisionIndex.d.ts +21 -0
- package/dist/core-map/symbols/GlyphAtlas.d.ts +38 -0
- package/dist/core-map/symbols/IconAtlas.d.ts +18 -0
- package/dist/core-map/symbols/index.d.ts +6 -0
- package/dist/core-map/symbols/index.js +501 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +18414 -1857
- package/package.json +50 -58
- package/src/core-map/ts-maps.css +725 -0
- package/dist/components/base.d.ts +0 -17
- package/dist/components/concerns/interactable.d.ts +0 -1
- package/dist/components/line.d.ts +0 -29
- package/dist/components/marker.d.ts +0 -50
- package/dist/components/region.d.ts +0 -46
- package/dist/components/tooltip.d.ts +0 -22
- package/dist/core/apply-transform.d.ts +0 -7
- package/dist/core/coords-to-point.d.ts +0 -12
- package/dist/core/create-lines.d.ts +0 -2
- package/dist/core/create-markers.d.ts +0 -2
- package/dist/core/create-regions.d.ts +0 -2
- package/dist/core/create-series.d.ts +0 -3
- package/dist/core/get-inset-for-point.d.ts +0 -13
- package/dist/core/get-marker-position.d.ts +0 -6
- package/dist/core/index.d.ts +0 -1
- package/dist/core/reposition-labels.d.ts +0 -2
- package/dist/core/reposition-lines.d.ts +0 -2
- package/dist/core/reposition-markers.d.ts +0 -2
- package/dist/core/resize.d.ts +0 -3
- package/dist/core/set-focus.d.ts +0 -2
- package/dist/core/set-scale.d.ts +0 -2
- package/dist/core/setup-container-events.d.ts +0 -2
- package/dist/core/setup-container-touch-events.d.ts +0 -2
- package/dist/core/setup-element-events.d.ts +0 -2
- package/dist/core/setup-zoom-buttons.d.ts +0 -2
- package/dist/core/update-size.d.ts +0 -2
- package/dist/data-visualization.d.ts +0 -17
- package/dist/defaults/events.d.ts +0 -1
- package/dist/defaults/options.d.ts +0 -1
- package/dist/event-handler.d.ts +0 -1
- package/dist/legend.d.ts +0 -17
- package/dist/map.d.ts +0 -81
- package/dist/maps/brasil.d.ts +0 -2
- package/dist/maps/brasil.js +0 -7
- package/dist/maps/canada.d.ts +0 -2
- package/dist/maps/canada.js +0 -7
- package/dist/maps/iraq.d.ts +0 -2
- package/dist/maps/iraq.js +0 -84
- package/dist/maps/italy.d.ts +0 -2
- package/dist/maps/italy.js +0 -7
- package/dist/maps/russia.d.ts +0 -2
- package/dist/maps/russia.js +0 -366
- package/dist/maps/spain.d.ts +0 -2
- package/dist/maps/spain.js +0 -7
- package/dist/maps/us-aea-en.d.ts +0 -2
- package/dist/maps/us-aea-en.js +0 -7
- package/dist/maps/us-lcc-en.d.ts +0 -2
- package/dist/maps/us-lcc-en.js +0 -7
- package/dist/maps/us-merc-en.d.ts +0 -2
- package/dist/maps/us-merc-en.js +0 -7
- package/dist/maps/us-mill-en.d.ts +0 -2
- package/dist/maps/us-mill-en.js +0 -7
- package/dist/maps/world-merc.d.ts +0 -2
- package/dist/maps/world-merc.js +0 -7
- package/dist/maps/world.d.ts +0 -2
- package/dist/maps/world.js +0 -7
- package/dist/projection.d.ts +0 -1
- package/dist/scales/ordinal-scale.d.ts +0 -12
- package/dist/series.d.ts +0 -14
- package/dist/svg/base-element.d.ts +0 -19
- package/dist/svg/canvas-element.d.ts +0 -21
- package/dist/svg/image-element.d.ts +0 -12
- package/dist/svg/shape-element.d.ts +0 -19
- package/dist/svg/text-element.d.ts +0 -7
- package/dist/types.d.ts +0 -418
- package/dist/util/deep-merge.d.ts +0 -2
- package/dist/util/index.d.ts +0 -18
- package/dist/utils.d.ts +0 -87
- package/dist/vector-map.d.ts +0 -5
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Chris Breuer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,170 +2,208 @@
|
|
|
2
2
|
|
|
3
3
|
[![npm version][npm-version-src]][npm-version-href]
|
|
4
4
|
[![GitHub Actions][github-actions-src]][github-actions-href]
|
|
5
|
-
[![Commitizen friendly]
|
|
5
|
+
[![Commitizen friendly][commitizen-friendly]][commitizen-href]
|
|
6
6
|
|
|
7
7
|
# ts-maps
|
|
8
8
|
|
|
9
|
-
>
|
|
9
|
+
> A zero-dependency, TypeScript-native, interactive mapping library.
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
|
-
- 🗺️
|
|
14
|
-
- High-quality SVG-based interactive maps
|
|
15
|
-
- Multiple projection types (Mercator, Equal Earth)
|
|
16
|
-
- Built-in world maps and custom regions
|
|
13
|
+
- 🗺️ **`TsMap`** — modern interactive slippy map with fractional zoom,
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- Heat maps and bubble charts
|
|
21
|
-
- Interactive legends and tooltips
|
|
15
|
+
bearing, pitch, and unified camera animations (`flyTo`, `easeTo`,
|
|
16
|
+
`jumpTo`).
|
|
22
17
|
|
|
23
|
-
-
|
|
24
|
-
- Zero dependencies
|
|
25
|
-
- Works with any framework
|
|
26
|
-
- Official React and Vue bindings
|
|
18
|
+
- 🧱 **Vector tiles** — in-house MVT decoder + Mapbox GL Style Spec
|
|
27
19
|
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
- Comprehensive type definitions
|
|
20
|
+
subset with a full expression engine (`interpolate`, `step`, `case`,
|
|
21
|
+
`match`, `coalesce`, `feature-state`). `queryRenderedFeatures` and
|
|
22
|
+
`querySourceFeatures` backed by a per-tile R-tree.
|
|
32
23
|
|
|
33
|
-
|
|
24
|
+
- 🏔️ **3D** — `fill-extrusion`, atmospheric `setFog`, `setSky`, and
|
|
34
25
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
DEM-based `setTerrain` with auto-loaded tiles from a `raster-dem`
|
|
27
|
+
source. `addCustomLayer()` lets apps render raw WebGL2 alongside.
|
|
28
|
+
|
|
29
|
+
- 🌍 **Globe** — seamless Mercator-to-globe transition around zoom 5.5
|
|
30
|
+
|
|
31
|
+
with an atmosphere halo.
|
|
32
|
+
|
|
33
|
+
- 🧭 **Services** — geocoding / directions / isochrones / matrix
|
|
34
|
+
|
|
35
|
+
adapters with keyless defaults (Nominatim, OSRM, Valhalla) and
|
|
36
|
+
opt-in commercial providers (Mapbox, Google, Maptiler, Photon).
|
|
37
|
+
|
|
38
|
+
- 📴 **Offline** — IndexedDB-backed `TileCache`, `saveOfflineRegion`
|
|
39
|
+
|
|
40
|
+
pre-fetcher, worker pool for off-main-thread tile decode.
|
|
41
|
+
|
|
42
|
+
- 🧩 **Layer-scoped events** — `map.on('click', 'layer-id', handler)`.
|
|
43
|
+
|
|
44
|
+
- 🎯 **Zero runtime deps.** Subpath exports (`ts-maps/services`,
|
|
45
|
+
|
|
46
|
+
`ts-maps/style-spec`, …) let callers pull in just one slice.
|
|
38
47
|
|
|
39
|
-
|
|
40
|
-
pnpm add ts-maps
|
|
48
|
+
- 🔒 **TypeScript-native** — strict types, `isolatedDeclarations`
|
|
41
49
|
|
|
42
|
-
|
|
43
|
-
yarn add ts-maps
|
|
50
|
+
compliant, typed events, declaration files for every public module.
|
|
44
51
|
|
|
45
|
-
|
|
46
|
-
|
|
52
|
+
## Installation
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
bun add ts-maps # or: npm install ts-maps / pnpm add ts-maps / yarn add ts-maps
|
|
47
56
|
```
|
|
48
57
|
|
|
49
58
|
### Framework Bindings
|
|
50
59
|
|
|
51
60
|
```bash
|
|
52
|
-
# React
|
|
53
|
-
|
|
61
|
+
bun add @ts-maps/react # React
|
|
62
|
+
bun add @ts-maps/vue # Vue 3
|
|
63
|
+
bun add @ts-maps/svelte # Svelte
|
|
64
|
+
bun add @ts-maps/solid # SolidJS
|
|
65
|
+
bun add ts-maps-nuxt # Nuxt module
|
|
66
|
+
bun add @ts-maps/react-native # React Native (WebView-hosted)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Subpath imports for tree-shaking
|
|
54
70
|
|
|
55
|
-
|
|
56
|
-
|
|
71
|
+
Pull in only the part you need:
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import { defaultGeocoder } from 'ts-maps/services'
|
|
75
|
+
import { validateStyle } from 'ts-maps/style-spec'
|
|
76
|
+
import { TileCache } from 'ts-maps/storage'
|
|
77
|
+
import { LatLng, LatLngBounds } from 'ts-maps/geo'
|
|
57
78
|
```
|
|
58
79
|
|
|
80
|
+
Full list: `services`, `style-spec`, `storage`, `geo`, `geometry`,
|
|
81
|
+
`symbols`.
|
|
82
|
+
|
|
59
83
|
## Quick Start
|
|
60
84
|
|
|
61
|
-
```
|
|
62
|
-
import
|
|
63
|
-
import {
|
|
64
|
-
|
|
65
|
-
// Create a map instance
|
|
66
|
-
const map = new VectorMap({
|
|
67
|
-
container: 'map',
|
|
68
|
-
map: 'world',
|
|
69
|
-
theme: 'light',
|
|
70
|
-
style: {
|
|
71
|
-
regions: {
|
|
72
|
-
fill: '#e4e4e4',
|
|
73
|
-
stroke: '#ffffff',
|
|
74
|
-
strokeWidth: 1,
|
|
75
|
-
},
|
|
76
|
-
hover: {
|
|
77
|
-
fill: '#2ca25f',
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
})
|
|
85
|
+
```ts
|
|
86
|
+
import 'ts-maps/styles.css'
|
|
87
|
+
import { Marker, tileLayer, TsMap } from 'ts-maps'
|
|
81
88
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
89
|
+
const map = new TsMap('map', {
|
|
90
|
+
center: [40.758, -73.9855],
|
|
91
|
+
zoom: 13,
|
|
85
92
|
})
|
|
93
|
+
|
|
94
|
+
tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
|
95
|
+
attribution: '© OpenStreetMap contributors',
|
|
96
|
+
}).addTo(map)
|
|
97
|
+
|
|
98
|
+
new Marker([40.758, -73.9855])
|
|
99
|
+
.addTo(map)
|
|
100
|
+
.bindPopup('Hello from ts-maps')
|
|
101
|
+
.openPopup()
|
|
86
102
|
```
|
|
87
103
|
|
|
88
|
-
###
|
|
104
|
+
### Vector tiles + style spec
|
|
89
105
|
|
|
90
|
-
```
|
|
91
|
-
import
|
|
92
|
-
import { VectorMap } from 'ts-maps'
|
|
106
|
+
```ts
|
|
107
|
+
import { vectorTileLayer } from 'ts-maps'
|
|
93
108
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
109
|
+
vectorTileLayer({
|
|
110
|
+
url: 'https://tiles.example.com/{z}/{x}/{y}.pbf',
|
|
111
|
+
layers: [
|
|
112
|
+
{ id: 'water', type: 'fill', sourceLayer: 'water', paint: { 'fill-color': '#0ea5e9' } },
|
|
113
|
+
{ id: 'major-roads', type: 'line', sourceLayer: 'transportation',
|
|
114
|
+
filter: ['match', ['get', 'class'], ['primary', 'trunk'], true, false],
|
|
115
|
+
paint: { 'line-color': '#6b7280', 'line-width': ['interpolate', ['linear'], ['zoom'], 10, 0.5, 16, 3] } },
|
|
116
|
+
],
|
|
117
|
+
}).addTo(map)
|
|
118
|
+
|
|
119
|
+
// Layer-scoped events:
|
|
120
|
+
map.on('click', 'major-roads', (e) => {
|
|
121
|
+
console.log('road clicked', e.features[0].properties)
|
|
97
122
|
})
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### 3D — fog, sky, terrain, fill-extrusion, custom WebGL
|
|
98
126
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
map.
|
|
127
|
+
```ts
|
|
128
|
+
map.setPitch(50)
|
|
129
|
+
|
|
130
|
+
map.addSource('terrain-dem', {
|
|
131
|
+
type: 'raster-dem',
|
|
132
|
+
tiles: ['https://tiles.example.com/terrain-rgb/{z}/{x}/{y}.png'],
|
|
133
|
+
tileSize: 512,
|
|
134
|
+
encoding: 'mapbox',
|
|
135
|
+
})
|
|
136
|
+
map.setTerrain({ source: 'terrain-dem', exaggeration: 1.4 })
|
|
137
|
+
map.setSky({ 'sky-color': '#87ceeb', 'horizon-color': '#ffffff' })
|
|
138
|
+
map.setFog({ color: 'rgb(245, 247, 250)', 'horizon-blend': 0.1 })
|
|
139
|
+
|
|
140
|
+
// Bilinear ground elevation lookup (uses the loaded DEM tile pyramid).
|
|
141
|
+
const metres = map.queryTerrainElevation({ lng: -74, lat: 40.7 })
|
|
142
|
+
|
|
143
|
+
// Custom WebGL layer — rendered every frame alongside the built-in layers:
|
|
144
|
+
map.addCustomLayer({
|
|
145
|
+
id: 'my-layer',
|
|
146
|
+
type: 'custom',
|
|
147
|
+
render(gl, projectionMatrix) { /* …your GL draws here… */ },
|
|
148
|
+
})
|
|
110
149
|
```
|
|
111
150
|
|
|
112
|
-
###
|
|
113
|
-
|
|
114
|
-
```
|
|
115
|
-
import
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<div id="map" />
|
|
132
|
-
)}
|
|
133
|
-
</div>
|
|
134
|
-
)
|
|
135
|
-
}
|
|
151
|
+
### Services — geocoding, directions, isochrones, matrix
|
|
152
|
+
|
|
153
|
+
```ts
|
|
154
|
+
import { services } from 'ts-maps'
|
|
155
|
+
|
|
156
|
+
const geocoder = services.defaultGeocoder() // Nominatim, keyless
|
|
157
|
+
const hits = await geocoder.search('Tower Bridge, London')
|
|
158
|
+
|
|
159
|
+
const directions = services.defaultDirections() // OSRM, keyless
|
|
160
|
+
const routes = await directions.getDirections(
|
|
161
|
+
[{ lat: 51.5055, lng: -0.0754 }, { lat: 51.5074, lng: -0.1278 }],
|
|
162
|
+
{ profile: 'driving' },
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
const matrix = services.defaultMatrix() // OSRM /table
|
|
166
|
+
const m = await matrix.getMatrix(
|
|
167
|
+
[{ lat: 51.5055, lng: -0.0754 }, { lat: 51.5074, lng: -0.1278 }, { lat: 51.5155, lng: -0.1408 }],
|
|
168
|
+
{ profile: 'driving' },
|
|
169
|
+
)
|
|
136
170
|
```
|
|
137
171
|
|
|
138
|
-
###
|
|
172
|
+
### Offline tiles
|
|
139
173
|
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
import type { VectorMapOptions } from 'ts-maps'
|
|
143
|
-
import { useVectorMap } from 'ts-maps-vue'
|
|
174
|
+
```ts
|
|
175
|
+
import { saveOfflineRegion, TileCache } from 'ts-maps'
|
|
144
176
|
|
|
145
|
-
const {
|
|
146
|
-
|
|
147
|
-
|
|
177
|
+
const cache = new TileCache({ maxBytes: 200 * 1024 * 1024 })
|
|
178
|
+
await saveOfflineRegion({
|
|
179
|
+
bounds: [-0.20, 51.50, -0.05, 51.53],
|
|
180
|
+
zoomRange: [10, 14],
|
|
181
|
+
tileUrl: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
182
|
+
cache,
|
|
148
183
|
})
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
<template>
|
|
152
|
-
<div class="map-container">
|
|
153
|
-
<div v-if="isLoading">
|
|
154
|
-
Loading...
|
|
155
|
-
</div>
|
|
156
|
-
<div v-else id="map" />
|
|
157
|
-
</div>
|
|
158
|
-
</template>
|
|
184
|
+
// Later, when tearing down: await cache.close()
|
|
159
185
|
```
|
|
160
186
|
|
|
187
|
+
### Static image export
|
|
188
|
+
|
|
189
|
+
```ts
|
|
190
|
+
const dataUrl = await map.toDataURL()
|
|
191
|
+
const blob = await map.toBlob('image/png')
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
See the [docs folder][docs] for the full concept guides, API reference,
|
|
195
|
+
and runnable examples.
|
|
196
|
+
|
|
197
|
+
[docs]: ../../docs
|
|
198
|
+
|
|
161
199
|
## Documentation
|
|
162
200
|
|
|
163
|
-
- [Introduction]
|
|
164
|
-
- [Installation]
|
|
165
|
-
- [Usage Guide]
|
|
166
|
-
- [API Reference]
|
|
167
|
-
- [Examples]
|
|
168
|
-
- [Playground]
|
|
201
|
+
- [Introduction][introduction]
|
|
202
|
+
- [Installation][installation]
|
|
203
|
+
- [Usage Guide][usage-guide]
|
|
204
|
+
- [API Reference][api-reference]
|
|
205
|
+
- [Examples][examples]
|
|
206
|
+
- [Playground][playground]
|
|
169
207
|
|
|
170
208
|
## Development
|
|
171
209
|
|
|
@@ -179,36 +217,36 @@ cd ts-maps
|
|
|
179
217
|
2. Install dependencies:
|
|
180
218
|
|
|
181
219
|
```bash
|
|
182
|
-
|
|
220
|
+
bun install
|
|
183
221
|
```
|
|
184
222
|
|
|
185
223
|
3. Start development:
|
|
186
224
|
|
|
187
225
|
```bash
|
|
188
|
-
|
|
226
|
+
bun run dev
|
|
189
227
|
```
|
|
190
228
|
|
|
191
229
|
## Changelog
|
|
192
230
|
|
|
193
|
-
Please see our [releases]
|
|
231
|
+
Please see our [releases][releases] page for more information on what has changed recently.
|
|
194
232
|
|
|
195
233
|
## Contributing
|
|
196
234
|
|
|
197
|
-
Please see [CONTRIBUTING]
|
|
235
|
+
Please see [CONTRIBUTING][contributing] for details.
|
|
198
236
|
|
|
199
237
|
## Community
|
|
200
238
|
|
|
201
239
|
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
|
|
202
240
|
|
|
203
|
-
[Discussions on GitHub]
|
|
241
|
+
[Discussions on GitHub][discussions-on-github]
|
|
204
242
|
|
|
205
243
|
For casual chit-chat with others using this package:
|
|
206
244
|
|
|
207
|
-
[Join the Stacks Discord Server]
|
|
245
|
+
[Join the Stacks Discord Server][join-the-stacks-discord-server]
|
|
208
246
|
|
|
209
247
|
## Postcardware
|
|
210
248
|
|
|
211
|
-
|
|
249
|
+
"Software that is free, but hopes for a postcard." We love receiving postcards from around the world showing where `ts-maps` is being used! We showcase them on our website too.
|
|
212
250
|
|
|
213
251
|
Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States 🌎
|
|
214
252
|
|
|
@@ -216,26 +254,49 @@ Our address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United St
|
|
|
216
254
|
|
|
217
255
|
We would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.
|
|
218
256
|
|
|
219
|
-
- [JetBrains]
|
|
220
|
-
- [The Solana Foundation]
|
|
257
|
+
- [JetBrains][jetbrains]
|
|
258
|
+
- [The Solana Foundation][the-solana-foundation]
|
|
221
259
|
|
|
222
260
|
## Credits
|
|
223
261
|
|
|
224
|
-
- [
|
|
225
|
-
|
|
226
|
-
|
|
262
|
+
- [Leaflet][leaflet] — the module layout and public API shape of the
|
|
263
|
+
|
|
264
|
+
interactive map API follow its design.
|
|
265
|
+
|
|
266
|
+
- [Mapbox GL JS][mapbox-gl-js] — the style spec, expression engine, and
|
|
267
|
+
|
|
268
|
+
vector-tile renderer are modeled after its design.
|
|
269
|
+
|
|
270
|
+
- [Chris Breuer][chris-breuer]
|
|
271
|
+
- [All Contributors][all-contributors]
|
|
227
272
|
|
|
228
273
|
## License
|
|
229
274
|
|
|
230
|
-
The MIT License (MIT). Please see [LICENSE]
|
|
275
|
+
The MIT License (MIT). Please see [LICENSE][license] for more information.
|
|
231
276
|
|
|
232
277
|
Made with 💙
|
|
233
278
|
|
|
234
279
|
<!-- Badges -->
|
|
235
|
-
[npm-version-src]: https://img.shields.io/npm/v
|
|
236
|
-
[npm-version-href]: https://npmjs.com/package
|
|
237
|
-
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/
|
|
238
|
-
[github-actions-href]: https://github.com/stacksjs/
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
[
|
|
280
|
+
[npm-version-src]: https://img.shields.io/npm/v/ts-maps?style=flat-square
|
|
281
|
+
[npm-version-href]: https://npmjs.com/package/ts-maps
|
|
282
|
+
[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/ts-maps/ci.yml?style=flat-square&branch=main
|
|
283
|
+
[github-actions-href]: https://github.com/stacksjs/ts-maps/actions?query=workflow%3Aci
|
|
284
|
+
[commitizen-friendly]: https://img.shields.io/badge/commitizen-friendly-brightgreen.svg
|
|
285
|
+
[introduction]: https://ts-maps.dev/intro
|
|
286
|
+
[installation]: https://ts-maps.dev/install
|
|
287
|
+
[usage-guide]: https://ts-maps.dev/usage
|
|
288
|
+
[api-reference]: https://ts-maps.dev/api
|
|
289
|
+
[examples]: https://ts-maps.dev/examples
|
|
290
|
+
[playground]: https://ts-maps.dev/playground
|
|
291
|
+
[releases]: https://github.com/stacksjs/ts-maps/releases
|
|
292
|
+
[contributing]: https://github.com/stacksjs/stacks/blob/main/.github/CONTRIBUTING.md
|
|
293
|
+
[discussions-on-github]: https://github.com/stacksjs/ts-maps/discussions
|
|
294
|
+
[join-the-stacks-discord-server]: https://stacksjs.com/discord
|
|
295
|
+
[jetbrains]: https://www.jetbrains.com/
|
|
296
|
+
[the-solana-foundation]: https://solana.com/
|
|
297
|
+
[leaflet]: https://leafletjs.com/
|
|
298
|
+
[mapbox-gl-js]: https://github.com/mapbox/mapbox-gl-js
|
|
299
|
+
[chris-breuer]: https://github.com/chrisbbreuer
|
|
300
|
+
[all-contributors]: https://github.com/stacksjs/ts-maps/contributors
|
|
301
|
+
[license]: https://github.com/stacksjs/ts-maps/blob/main/LICENSE.md
|
|
302
|
+
[commitizen-href]: http://commitizen.github.io/cz-cli/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*.svg)` in CSS).
|
|
2
|
+
*/
|
|
3
|
+
/** Classic map pin (Leaflet-compatible proportions). */
|
|
4
|
+
export declare const MARKER_ICON_DATA_URI: string;
|
|
5
|
+
/** Soft drop shadow under the default pin. */
|
|
6
|
+
export declare const MARKER_SHADOW_DATA_URI: string;
|
|
7
|
+
/** Layers control toggle (stacked tiles). */
|
|
8
|
+
export declare const LAYERS_TOGGLE_DATA_URI: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Control } from './Control';
|
|
2
|
+
export declare class AttributionControl extends Control {
|
|
3
|
+
_attributions: Record<string, number>;
|
|
4
|
+
initialize(options?: any): void;
|
|
5
|
+
onAdd(map: any): HTMLElement;
|
|
6
|
+
onRemove(map: any): void;
|
|
7
|
+
_addAttribution(ev: any): void;
|
|
8
|
+
setPrefix(prefix: string | false): this;
|
|
9
|
+
addAttribution(text: string): this;
|
|
10
|
+
removeAttribution(text: string): this;
|
|
11
|
+
_update(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Class } from '../core/Class';
|
|
2
|
+
export declare class Control extends Class {
|
|
3
|
+
_map: any;
|
|
4
|
+
_container?: HTMLElement;
|
|
5
|
+
onAdd(_map: any): HTMLElement;
|
|
6
|
+
onRemove(_map: any): void;
|
|
7
|
+
initialize(...args: any[]): void;
|
|
8
|
+
getPosition(): string;
|
|
9
|
+
setPosition(position: string): this;
|
|
10
|
+
getContainer(): HTMLElement | undefined;
|
|
11
|
+
addTo(map: any): this;
|
|
12
|
+
remove(): this;
|
|
13
|
+
_refocusOnMap(e: any): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Control } from './Control';
|
|
2
|
+
declare interface LayerEntry {
|
|
3
|
+
layer: any
|
|
4
|
+
name: string
|
|
5
|
+
overlay?: boolean
|
|
6
|
+
}
|
|
7
|
+
export declare class LayersControl extends Control {
|
|
8
|
+
_layerControlInputs: any[];
|
|
9
|
+
_layers: LayerEntry[];
|
|
10
|
+
_lastZIndex: number;
|
|
11
|
+
_handlingClick: boolean;
|
|
12
|
+
_preventClick: boolean;
|
|
13
|
+
_section: HTMLElement;
|
|
14
|
+
_separator: HTMLElement;
|
|
15
|
+
_baseLayersList: HTMLElement;
|
|
16
|
+
_overlaysList: HTMLElement;
|
|
17
|
+
_layersLink: HTMLAnchorElement;
|
|
18
|
+
_collapseDelayTimeout?: ReturnType<typeof setTimeout>;
|
|
19
|
+
initialize(baseLayers?: Record<string, any>, overlays?: Record<string, any>, options?: any): void;
|
|
20
|
+
onAdd(map: any): HTMLElement;
|
|
21
|
+
addTo(map: any): this;
|
|
22
|
+
onRemove(): void;
|
|
23
|
+
addBaseLayer(layer: any, name: string): this;
|
|
24
|
+
addOverlay(layer: any, name: string): this;
|
|
25
|
+
removeLayer(layer: any): this;
|
|
26
|
+
expand(): this;
|
|
27
|
+
collapse(ev?: any): this;
|
|
28
|
+
_initLayout(): void;
|
|
29
|
+
_getLayer(id: number): LayerEntry | undefined;
|
|
30
|
+
_addLayer(layer: any, name: string, overlay?: boolean): void;
|
|
31
|
+
_update(): this;
|
|
32
|
+
_onLayerChange(e: any): void;
|
|
33
|
+
_addItem(obj: LayerEntry): HTMLLabelElement;
|
|
34
|
+
_onInputClick(e: any): void;
|
|
35
|
+
_checkDisabledLayers(): void;
|
|
36
|
+
_expandIfNotCollapsed(): this;
|
|
37
|
+
_expandSafely(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Control } from './Control';
|
|
2
|
+
export declare class ScaleControl extends Control {
|
|
3
|
+
_mScale?: HTMLElement;
|
|
4
|
+
_iScale?: HTMLElement;
|
|
5
|
+
onAdd(map: any): HTMLElement;
|
|
6
|
+
onRemove(map: any): void;
|
|
7
|
+
_addScales(options: any, className: string, container: HTMLElement): void;
|
|
8
|
+
_update(): void;
|
|
9
|
+
_updateScales(maxMeters: number): void;
|
|
10
|
+
_updateMetric(maxMeters: number): void;
|
|
11
|
+
_updateImperial(maxMeters: number): void;
|
|
12
|
+
_updateScale(scale: HTMLElement, text: string, ratio: number): void;
|
|
13
|
+
_getRoundNum(num: number): number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Control } from './Control';
|
|
2
|
+
export declare class ZoomControl extends Control {
|
|
3
|
+
_zoomInButton?: HTMLAnchorElement;
|
|
4
|
+
_zoomOutButton?: HTMLAnchorElement;
|
|
5
|
+
_disabled?: boolean;
|
|
6
|
+
onAdd(map: any): HTMLElement;
|
|
7
|
+
onRemove(map: any): void;
|
|
8
|
+
disable(): this;
|
|
9
|
+
enable(): this;
|
|
10
|
+
_zoomIn(e: any): void;
|
|
11
|
+
_zoomOut(e: any): void;
|
|
12
|
+
_createButton(html: string, title: string, className: string, container: HTMLElement, fn: (e: any) => void): HTMLAnchorElement;
|
|
13
|
+
_updateDisabled(): void;
|
|
14
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Browser feature detection used internally.
|
|
2
|
+
declare function userAgentContains(str: string): boolean;
|
|
3
|
+
declare const chrome: unknown;
|
|
4
|
+
declare const safari: unknown;
|
|
5
|
+
declare const mobile: boolean;
|
|
6
|
+
declare const pointer: boolean;
|
|
7
|
+
declare const touchNative: boolean;
|
|
8
|
+
declare const touch: unknown;
|
|
9
|
+
declare const retina: boolean;
|
|
10
|
+
declare const mac: boolean;
|
|
11
|
+
declare const linux: boolean;
|
|
12
|
+
declare const Browser: BrowserInfo;
|
|
13
|
+
export declare interface BrowserInfo {
|
|
14
|
+
chrome: boolean
|
|
15
|
+
safari: boolean
|
|
16
|
+
mobile: boolean
|
|
17
|
+
pointer: boolean
|
|
18
|
+
touch: boolean
|
|
19
|
+
touchNative: boolean
|
|
20
|
+
retina: boolean
|
|
21
|
+
mac: boolean
|
|
22
|
+
linux: boolean
|
|
23
|
+
}
|
|
24
|
+
export default Browser;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class Class {
|
|
2
|
+
static include(props: Record<string, any>): typeof Class;
|
|
3
|
+
static setDefaultOptions(options: Record<string, any>): typeof Class;
|
|
4
|
+
static mergeOptions(options: Record<string, any>): typeof Class;
|
|
5
|
+
static addInitHook(fn: string | (() => void), ...args: any[]): typeof Class;
|
|
6
|
+
options?: Record<string, any>;
|
|
7
|
+
_initHooksCalled: boolean;
|
|
8
|
+
_initHooks?: Array<() => void>;
|
|
9
|
+
initialize(..._args: any[]): void;
|
|
10
|
+
constructor(...args: any[]);
|
|
11
|
+
callInitHooks(): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Class } from './Class';
|
|
2
|
+
export declare interface EventListener {
|
|
3
|
+
fn: (event?: any) => void
|
|
4
|
+
ctx?: any
|
|
5
|
+
once?: boolean
|
|
6
|
+
}
|
|
7
|
+
export type EventHandler = (_event?: any) => void;
|
|
8
|
+
// A set of methods shared between event-powered classes (like Map and Marker).
|
|
9
|
+
export declare class Evented extends Class {
|
|
10
|
+
static __REMOVED_EVENTS: string[];
|
|
11
|
+
_events?: Record<string, EventListener[]>;
|
|
12
|
+
_eventParents?: Record<number, Evented>;
|
|
13
|
+
_firingCount?: number;
|
|
14
|
+
on(types: string | Record<string, EventHandler>, fn?: EventHandler | any, context?: any): this;
|
|
15
|
+
off(types?: string | Record<string, EventHandler>, fn?: EventHandler | any, context?: any): this;
|
|
16
|
+
_on(type: string, fn: EventHandler, context?: any, _once?: boolean): void;
|
|
17
|
+
_off(type: string, fn?: EventHandler, context?: any): void;
|
|
18
|
+
fire(type: string, data?: Record<string, any>, propagate?: boolean): this;
|
|
19
|
+
listens(type: string, fn?: EventHandler | boolean, context?: any, propagate?: boolean): boolean;
|
|
20
|
+
_listens(type: string, fn?: EventHandler, context?: any): number | false;
|
|
21
|
+
once(types: string | Record<string, EventHandler>, fn?: EventHandler | any, context?: any): this;
|
|
22
|
+
addEventParent(obj: Evented): this;
|
|
23
|
+
removeEventParent(obj: Evented): this;
|
|
24
|
+
_propagateEvent(e: any): void;
|
|
25
|
+
addEventListener: Evented['on'];
|
|
26
|
+
removeEventListener: Evented['off'];
|
|
27
|
+
clearAllEventListeners: Evented['off'];
|
|
28
|
+
addOneTimeEventListener: Evented['once'];
|
|
29
|
+
fireEvent: Evented['fire'];
|
|
30
|
+
hasEventListeners: Evented['listens'];
|
|
31
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Class } from './Class';
|
|
2
|
+
export declare class Handler extends Class {
|
|
3
|
+
_map: any;
|
|
4
|
+
_enabled: boolean;
|
|
5
|
+
static addTo(this: any, map: any, name: string): any;
|
|
6
|
+
initialize(...args: any[]): void;
|
|
7
|
+
enable(): this;
|
|
8
|
+
disable(): this;
|
|
9
|
+
enabled(): boolean;
|
|
10
|
+
addHooks(): void;
|
|
11
|
+
removeHooks(): void;
|
|
12
|
+
}
|