@maptiler/client 1.0.2 → 1.1.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/.github/workflows/npm-publish.yml +0 -1
- package/dist/maptiler-client.cjs +465 -21
- package/dist/maptiler-client.cjs.map +1 -1
- package/dist/maptiler-client.d.ts +395 -2
- package/dist/maptiler-client.min.mjs +1 -1
- package/dist/maptiler-client.mjs +461 -22
- package/dist/maptiler-client.mjs.map +1 -1
- package/dist/maptiler-client.umd.js +465 -21
- package/dist/maptiler-client.umd.js.map +1 -1
- package/dist/maptiler-client.umd.min.js +1 -1
- package/docs/assets/custom.css +118 -0
- package/docs/assets/highlight.css +10 -10
- package/docs/assets/main.js +56 -52
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +23 -0
- package/docs/classes/{ClientConfig.html → config.ClientConfig.html} +34 -24
- package/docs/classes/{ServiceError.html → services_ServiceError.ServiceError.html} +26 -16
- package/docs/functions/language.getAutoLanguageGeocoding.html +60 -0
- package/docs/functions/services_simplify.default.html +65 -0
- package/docs/images/maptiler-logo-256.png +0 -0
- package/docs/index.html +118 -57
- package/docs/modules/config.html +71 -0
- package/docs/modules/language.html +71 -0
- package/docs/modules/services_ServiceError.html +61 -0
- package/docs/modules/services_coordinates.html +84 -0
- package/docs/modules/services_data.html +66 -0
- package/docs/modules/services_geocoding.html +76 -0
- package/docs/modules/services_geolocation.html +68 -0
- package/docs/modules/services_simplify.html +61 -0
- package/docs/modules/services_staticMaps.html +74 -0
- package/docs/modules.html +23 -83
- package/docs/types/config.FetchFunction.html +71 -0
- package/docs/types/language.LanguageGeocodingString.html +58 -0
- package/docs/types/services_coordinates.CoordinateExport.html +71 -0
- package/docs/types/services_coordinates.CoordinateGrid.html +69 -0
- package/docs/types/services_coordinates.CoordinateId.html +71 -0
- package/docs/types/services_coordinates.CoordinateSearch.html +93 -0
- package/docs/types/services_coordinates.CoordinateSearchResult.html +75 -0
- package/docs/types/services_coordinates.CoordinateTransformResult.html +76 -0
- package/docs/types/services_coordinates.CoordinateTransformation.html +89 -0
- package/docs/types/services_coordinates.CoordinatesSearchOptions.html +83 -0
- package/docs/types/services_coordinates.CoordinatesTransformOptions.html +85 -0
- package/docs/types/services_coordinates.XYZ.html +73 -0
- package/docs/types/services_data.GetDataOptions.html +64 -0
- package/docs/types/services_geocoding.Coordinates.html +60 -0
- package/docs/types/services_geocoding.FeatureHierarchy.html +71 -0
- package/docs/types/services_geocoding.GeocodingFeature.html +60 -0
- package/docs/types/services_geocoding.GeocodingOptions.html +79 -0
- package/docs/types/services_geocoding.GeocodingSearchResult.html +77 -0
- package/docs/types/services_geocoding.ReverseGeocodingOptions.html +71 -0
- package/docs/types/services_geolocation.GeolocationInfoOptions.html +65 -0
- package/docs/types/services_geolocation.GeolocationResult.html +128 -0
- package/docs/types/services_staticMaps.AutomaticStaticMapOptions.html +61 -0
- package/docs/types/services_staticMaps.BoundedStaticMapOptions.html +61 -0
- package/docs/types/services_staticMaps.CenteredStaticMapOptions.html +61 -0
- package/docs/types/{StaticMapBaseOptions.html → services_staticMaps.StaticMapBaseOptions.html} +26 -45
- package/docs/types/services_staticMaps.StaticMapMarker.html +61 -0
- package/docs/variables/config.config.html +58 -0
- package/docs/variables/{LanguageGeocoding.html → language.LanguageGeocoding.html} +20 -42
- package/docs/variables/services_coordinates.coordinates.html +110 -0
- package/docs/variables/services_data.data.html +80 -0
- package/docs/variables/{geocoding.html → services_geocoding.geocoding.html} +35 -53
- package/docs/variables/services_geolocation.geolocation.html +79 -0
- package/docs/variables/services_staticMaps.staticMaps.html +128 -0
- package/docsmd/README.md +143 -36
- package/docsmd/assets/custom.css +118 -0
- package/docsmd/classes/ClientConfig.md +5 -5
- package/docsmd/classes/MapStyleVariant.md +217 -0
- package/docsmd/classes/ReferenceMapStyle.md +169 -0
- package/docsmd/classes/ServiceError.md +3 -3
- package/examples/test-browser-umd.html +1 -1
- package/images/maptiler-logo-256.png +0 -0
- package/package.json +5 -5
- package/readme.md +65 -5
- package/src/index.ts +17 -0
- package/src/mapstyle.ts +841 -0
- package/src/services/staticMaps.ts +5 -4
- package/tsconfig.json +0 -1
- package/typedoc.css +118 -0
- package/typedoc.json +7 -3
- package/docs/types/AutomaticStaticMapOptions.html +0 -80
- package/docs/types/BoundedStaticMapOptions.html +0 -80
- package/docs/types/CenteredStaticMapOptions.html +0 -80
- package/docs/types/CoordinateExport.html +0 -85
- package/docs/types/CoordinateGrid.html +0 -83
- package/docs/types/CoordinateId.html +0 -85
- package/docs/types/CoordinateSearch.html +0 -107
- package/docs/types/CoordinateSearchResult.html +0 -89
- package/docs/types/CoordinateTransformResult.html +0 -90
- package/docs/types/CoordinateTransformation.html +0 -103
- package/docs/types/Coordinates.html +0 -78
- package/docs/types/CoordinatesSearchOptions.html +0 -97
- package/docs/types/CoordinatesTransformOptions.html +0 -99
- package/docs/types/FeatureHierarchy.html +0 -89
- package/docs/types/FetchFunction.html +0 -93
- package/docs/types/GeocodingFeature.html +0 -78
- package/docs/types/GeocodingOptions.html +0 -97
- package/docs/types/GeocodingSearchResult.html +0 -95
- package/docs/types/GeolocationInfoOptions.html +0 -87
- package/docs/types/GeolocationResult.html +0 -150
- package/docs/types/GetDataOptions.html +0 -87
- package/docs/types/LanguageGeocodingString.html +0 -80
- package/docs/types/ReverseGeocodingOptions.html +0 -89
- package/docs/types/StaticMapMarker.html +0 -80
- package/docs/types/XYZ.html +0 -87
- package/docs/variables/config.html +0 -80
- package/docs/variables/coordinates-1.html +0 -124
- package/docs/variables/data.html +0 -103
- package/docs/variables/geolocation.html +0 -101
- package/docs/variables/staticMaps.html +0 -147
- package/docsmd/images/JS-logo.svg +0 -4
- package/docsmd/images/TS-logo.svg +0 -6
- package/docsmd/images/maptiler-client-logo.afdesign +0 -0
- package/docsmd/images/maptiler-client-logo.svg +0 -75
- package/docsmd/images/maptiler-logo.svg +0 -23
- package/docsmd/images/screenshots/static-bounded-europe-1024.png +0 -0
- package/docsmd/images/screenshots/static-bounded-europe-2048.png +0 -0
- package/docsmd/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
- package/docsmd/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
- package/docsmd/images/screenshots/static-with-path.png +0 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/* Overiding the default dark mode with color scheme from the light mode */
|
|
2
|
+
@media (prefers-color-scheme: dark) {
|
|
3
|
+
:root {
|
|
4
|
+
--color-background: var(--light-color-background);
|
|
5
|
+
--color-background-secondary: var(--light-color-background-secondary);
|
|
6
|
+
--color-background-warning: var(--light-color-background-warning);
|
|
7
|
+
--color-warning-text: var(--light-color-warning-text);
|
|
8
|
+
--color-icon-background: var(--light-color-icon-background);
|
|
9
|
+
--color-accent: var(--light-color-accent);
|
|
10
|
+
--color-text: var(--light-color-text);
|
|
11
|
+
--color-text-aside: var(--light-color-text-aside);
|
|
12
|
+
--color-link: var(--light-color-link);
|
|
13
|
+
--color-ts: var(--light-color-ts);
|
|
14
|
+
--color-ts-interface: var(--light-color-ts-interface);
|
|
15
|
+
--color-ts-enum: var(--light-color-ts-enum);
|
|
16
|
+
--color-ts-class: var(--light-color-ts-class);
|
|
17
|
+
--color-ts-function: var(--light-color-ts-function);
|
|
18
|
+
--color-ts-namespace: var(--light-color-ts-namespace);
|
|
19
|
+
--color-ts-private: var(--light-color-ts-private);
|
|
20
|
+
--color-ts-variable: var(--light-color-ts-variable);
|
|
21
|
+
--external-icon: var(--light-external-icon);
|
|
22
|
+
--color-scheme: var(--light-color-scheme);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
body {
|
|
27
|
+
background: #fff;
|
|
28
|
+
font-family: "Open Sans", sans-serif;
|
|
29
|
+
color: #6B7C92;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
|
|
33
|
+
font-family: "Ubuntu","Open Sans",sans-serif;
|
|
34
|
+
color: #525a65;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.tsd-page-toolbar {
|
|
38
|
+
background: #fff;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
#tsd-search > .title {
|
|
42
|
+
background-image: url("data:image/svg+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%20standalone%3D%22no%22%3F%3E%0A%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%0A%3Csvg%20width%3D%22100%25%22%20height%3D%22100%25%22%20viewBox%3D%220%200%20161%2041%22%20version%3D%221.1%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%20xml%3Aspace%3D%22preserve%22%20xmlns%3Aserif%3D%22http%3A%2F%2Fwww.serif.com%2F%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linejoin%3Around%3Bstroke-miterlimit%3A2%3B%22%3E%0A%20%20%20%20%3Cg%20transform%3D%22matrix(1%2C0%2C0%2C1%2C-1.20801%2C-0.711928)%22%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.965%2C33.743C14.023%2C35.769%2019.5%2C41.264%2019.497%2C41.269C19.477%2C41.305%2024.938%2C35.908%2027.113%2C33.768L19.526%2C26.3L11.965%2C33.743Z%22%20style%3D%22fill%3Argb(58%2C24%2C136)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M19.526%2C26.3L27.113%2C33.768C27.124%2C33.756%2027.138%2C33.741%2027.15%2C33.731L34.73%2C26.27L27.143%2C18.802L19.526%2C26.3Z%22%20style%3D%22fill%3Argb(3%2C161%2C196)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M34.73%2C26.27L34.749%2C26.25C38.942%2C22.123%2038.945%2C15.435%2034.762%2C11.302L27.144%2C18.802L34.73%2C26.27Z%22%20style%3D%22fill%3Argb(5%2C208%2C223)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M11.908%2C18.802L4.349%2C26.243C4.351%2C26.245%204.352%2C26.248%204.355%2C26.25L11.953%2C33.73C11.957%2C33.734%2011.961%2C33.738%2011.966%2C33.743L19.526%2C26.3L11.908%2C18.802Z%22%20style%3D%22fill%3Argb(118%2C31%2C232)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M19.526%2C11.303L27.143%2C18.802L34.762%2C11.303C34.755%2C11.298%2034.753%2C11.295%2034.749%2C11.29L27.15%2C3.81C27.149%2C3.808%2027.146%2C3.806%2027.144%2C3.804L19.526%2C11.303Z%22%20style%3D%22fill%3Argb(255%2C170%2C1)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M4.317%2C11.328C0.161%2C15.46%200.172%2C22.124%204.349%2C26.243L11.908%2C18.802L4.317%2C11.328Z%22%20style%3D%22fill%3Argb(241%2C23%2C93)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M19.526%2C11.303L11.934%2C3.829L4.355%2C11.29C4.341%2C11.303%204.33%2C11.317%204.316%2C11.329L11.908%2C18.802L19.526%2C11.303Z%22%20style%3D%22fill%3Argb(251%2C58%2C27)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M27.144%2C3.804C22.946%2C-0.321%2016.148%2C-0.319%2011.953%2C3.81L11.934%2C3.829L19.526%2C11.303L27.144%2C3.804Z%22%20style%3D%22fill%3Argb(251%2C201%2C53)%3Bfill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M58.567%2C28.139L58.567%2C20.497C58.567%2C18.616%2057.566%2C16.908%2055.595%2C16.908C53.654%2C16.908%2052.508%2C18.616%2052.508%2C20.497L52.508%2C28.139L48.922%2C28.139L48.922%2C13.84L52.244%2C13.84L52.508%2C15.578C53.273%2C14.129%2054.949%2C13.609%2056.33%2C13.609C58.066%2C13.609%2059.8%2C14.304%2060.624%2C16.271C61.918%2C14.245%2063.595%2C13.667%2065.476%2C13.667C69.593%2C13.667%2071.622%2C16.155%2071.622%2C20.44L71.622%2C28.139L68.034%2C28.139L68.034%2C20.44C68.034%2C18.559%2067.24%2C16.966%2065.301%2C16.966C63.359%2C16.966%2062.153%2C18.616%2062.153%2C20.497L62.153%2C28.139L58.567%2C28.139Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M86.765%2C13.87L90.206%2C13.87L90.206%2C28.139L86.824%2C28.139L86.647%2C26.056C85.825%2C27.734%2083.561%2C28.543%2081.943%2C28.573C77.651%2C28.603%2074.474%2C25.997%2074.474%2C20.989C74.474%2C16.069%2077.798%2C13.493%2082.033%2C13.522C83.973%2C13.522%2085.824%2C14.419%2086.647%2C15.838L86.765%2C13.87ZM78.062%2C20.989C78.062%2C23.71%2079.973%2C25.331%2082.355%2C25.331C88%2C25.331%2088%2C16.677%2082.355%2C16.677C79.973%2C16.677%2078.062%2C18.269%2078.062%2C20.989Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M93.236%2C34.105L93.236%2C13.87L96.589%2C13.87L96.822%2C15.838C97.94%2C14.245%2099.882%2C13.551%20101.528%2C13.551C105.996%2C13.551%20108.968%2C16.822%20108.968%2C21.019C108.968%2C25.187%20106.291%2C28.487%20101.645%2C28.487C100.118%2C28.487%2097.852%2C28.023%2096.822%2C26.461L96.822%2C34.104L93.236%2C34.104L93.236%2C34.105ZM105.381%2C21.019C105.381%2C18.791%20103.851%2C16.966%20101.264%2C16.966C98.676%2C16.966%2097.146%2C18.791%2097.146%2C21.019C97.146%2C23.247%2098.823%2C25.073%20101.264%2C25.073C103.705%2C25.073%20105.381%2C23.247%20105.381%2C21.019Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M115.378%2C9.528L115.378%2C13.84L120.319%2C13.84L120.319%2C15.026L115.378%2C15.026L115.378%2C23.739C115.378%2C25.679%20115.791%2C27.04%20118.055%2C27.04C118.76%2C27.04%20119.554%2C26.808%20120.289%2C26.461L120.789%2C27.617C119.877%2C28.054%20118.965%2C28.342%20118.055%2C28.342C114.968%2C28.342%20113.967%2C26.547%20113.967%2C23.74L113.967%2C15.027L110.879%2C15.027L110.879%2C13.84L113.967%2C13.84L113.967%2C9.672L115.378%2C9.528Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M125.554%2C9.18C125.554%2C10.685%20123.23%2C10.685%20123.23%2C9.18C123.23%2C7.675%20125.554%2C7.675%20125.554%2C9.18ZM123.643%2C13.782L123.643%2C28.14L125.082%2C28.14L125.082%2C13.782L123.643%2C13.782Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Crect%20x%3D%22129.199%22%20y%3D%227.878%22%20width%3D%221.441%22%20height%3D%2220.261%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M153.488%2C13.84L153.547%2C16.389C154.459%2C14.448%20156.518%2C13.696%20158.37%2C13.696C159.459%2C13.667%20160.515%2C13.956%20161.486%2C14.536L160.839%2C15.693C160.076%2C15.23%20159.221%2C15.027%20158.37%2C15.027C155.663%2C15.057%20153.576%2C17.198%20153.576%2C19.804L153.576%2C28.14L152.135%2C28.14L152.135%2C13.84L153.488%2C13.84Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M135.54%2C23.414C135.541%2C23.415%20135.543%2C23.417%20135.543%2C23.418L147.303%2C20.354C147.302%2C20.349%20147.302%2C20.345%20147.302%2C20.341L135.54%2C23.414Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%20%20%20%20%3Cpath%20d%3D%22M141.214%2C27.28C138.654%2C27.28%20136.461%2C25.701%20135.543%2C23.458L135.535%2C23.458L135.542%2C23.457C135.542%2C23.456%20135.541%2C23.455%20135.54%2C23.454L147.301%2C20.38C147.301%2C20.385%20147.302%2C20.389%20147.302%2C20.394L148.555%2C20.068C148.049%2C16.446%20144.956%2C13.658%20141.214%2C13.658C137.12%2C13.658%20133.802%2C16.996%20133.802%2C21.113C133.802%2C25.23%20137.12%2C28.569%20141.214%2C28.569C144.276%2C28.569%20146.905%2C26.7%20148.035%2C24.037L146.855%2C23.532C145.921%2C25.734%20143.747%2C27.28%20141.214%2C27.28ZM135.083%2C21.113C135.083%2C17.708%20137.828%2C14.946%20141.214%2C14.946C143.862%2C14.946%20146.117%2C16.634%20146.976%2C18.999L135.16%2C22.085C135.11%2C21.768%20135.083%2C21.444%20135.083%2C21.113Z%22%20style%3D%22fill-rule%3Anonzero%3B%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E%0A");
|
|
43
|
+
background-repeat: no-repeat;
|
|
44
|
+
color: #0000;
|
|
45
|
+
font-size: 1.5em;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.tsd-page-title h2 {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.tsd-page-toolbar--hide {
|
|
53
|
+
transform: none;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.col-menu--hide {
|
|
57
|
+
top: 4em;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
.tsd-page-toolbar {
|
|
62
|
+
border-color: #d3dbec;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.col-menu {
|
|
66
|
+
border-left: none;
|
|
67
|
+
background-color: #F3F6FF;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.menu-sticky-wrap {
|
|
71
|
+
top: 2.5rem;
|
|
72
|
+
margin-top: 2.5rem;
|
|
73
|
+
/* height: 100vh; */
|
|
74
|
+
height: calc(100vh - 2.5rem);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.tsd-generator {
|
|
78
|
+
display: none;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.settings {
|
|
82
|
+
display: none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.tsd-navigation a {
|
|
86
|
+
color: #252525;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.tsd-navigation.primary ul li a:hover {
|
|
90
|
+
border-color: #b3deff;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.tsd-navigation.primary li.selected > a,
|
|
94
|
+
.tsd-navigation.primary li.current > a {
|
|
95
|
+
border-color: #8bc9f9;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.tsd-index-panel > .tsd-index-heading {
|
|
99
|
+
display: none;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
#tsd-search.has-focus {
|
|
103
|
+
background-color: #fff;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.tsd-navigation.secondary {
|
|
107
|
+
border-top: solid 1px #d3dbec;
|
|
108
|
+
padding-top: 1rem;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
pre {
|
|
112
|
+
border-color: #d3dbec;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
code, pre {
|
|
116
|
+
border-radius: 3px;
|
|
117
|
+
background-color: #fafbff;
|
|
118
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[MapTiler Client
|
|
1
|
+
[MapTiler Client - v1.1.0](../README.md) / ClientConfig
|
|
2
2
|
|
|
3
3
|
# Class: ClientConfig
|
|
4
4
|
|
|
@@ -35,7 +35,7 @@ Get the MapTiler Cloud API key
|
|
|
35
35
|
|
|
36
36
|
#### Defined in
|
|
37
37
|
|
|
38
|
-
[config.ts:41](https://github.com/maptiler/maptiler-client-js/blob/
|
|
38
|
+
[config.ts:41](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L41)
|
|
39
39
|
|
|
40
40
|
• `set` **apiKey**(`k`): `void`
|
|
41
41
|
|
|
@@ -53,7 +53,7 @@ Set the MapTiler Cloud API key
|
|
|
53
53
|
|
|
54
54
|
#### Defined in
|
|
55
55
|
|
|
56
|
-
[config.ts:34](https://github.com/maptiler/maptiler-client-js/blob/
|
|
56
|
+
[config.ts:34](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L34)
|
|
57
57
|
|
|
58
58
|
___
|
|
59
59
|
|
|
@@ -69,7 +69,7 @@ Get the fetch fucntion
|
|
|
69
69
|
|
|
70
70
|
#### Defined in
|
|
71
71
|
|
|
72
|
-
[config.ts:55](https://github.com/maptiler/maptiler-client-js/blob/
|
|
72
|
+
[config.ts:55](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L55)
|
|
73
73
|
|
|
74
74
|
• `set` **fetch**(`f`): `void`
|
|
75
75
|
|
|
@@ -87,4 +87,4 @@ Set a the custom fetch function to replace the default one
|
|
|
87
87
|
|
|
88
88
|
#### Defined in
|
|
89
89
|
|
|
90
|
-
[config.ts:48](https://github.com/maptiler/maptiler-client-js/blob/
|
|
90
|
+
[config.ts:48](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/config.ts#L48)
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
[MapTiler Client - v1.1.0](../README.md) / MapStyleVariant
|
|
2
|
+
|
|
3
|
+
# Class: MapStyleVariant
|
|
4
|
+
|
|
5
|
+
An instance of MapStyleVariant contains information about a style to use that belong to a reference style
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Constructors
|
|
10
|
+
|
|
11
|
+
- [constructor](MapStyleVariant.md#constructor)
|
|
12
|
+
|
|
13
|
+
### Methods
|
|
14
|
+
|
|
15
|
+
- [getDescription](MapStyleVariant.md#getdescription)
|
|
16
|
+
- [getFullName](MapStyleVariant.md#getfullname)
|
|
17
|
+
- [getId](MapStyleVariant.md#getid)
|
|
18
|
+
- [getImageURL](MapStyleVariant.md#getimageurl)
|
|
19
|
+
- [getName](MapStyleVariant.md#getname)
|
|
20
|
+
- [getReferenceStyle](MapStyleVariant.md#getreferencestyle)
|
|
21
|
+
- [getType](MapStyleVariant.md#gettype)
|
|
22
|
+
- [getVariant](MapStyleVariant.md#getvariant)
|
|
23
|
+
- [getVariants](MapStyleVariant.md#getvariants)
|
|
24
|
+
- [hasVariant](MapStyleVariant.md#hasvariant)
|
|
25
|
+
|
|
26
|
+
## Constructors
|
|
27
|
+
|
|
28
|
+
### constructor
|
|
29
|
+
|
|
30
|
+
• **new MapStyleVariant**(`name`, `variantType`, `id`, `referenceStyle`, `description`, `imageURL`)
|
|
31
|
+
|
|
32
|
+
#### Parameters
|
|
33
|
+
|
|
34
|
+
| Name | Type | Description |
|
|
35
|
+
| :------ | :------ | :------ |
|
|
36
|
+
| `name` | `string` | Human-friendly name |
|
|
37
|
+
| `variantType` | `string` | Variant name the variant is addressed to from its reference style: `MapStyle.REFERNCE_STYLE_NAME.VARIANT_TYPE` |
|
|
38
|
+
| `id` | `string` | MapTiler Cloud id |
|
|
39
|
+
| `referenceStyle` | [`ReferenceMapStyle`](ReferenceMapStyle.md) | Reference map style, used to retrieve sibling variants |
|
|
40
|
+
| `description` | `string` | Human-friendly description |
|
|
41
|
+
| `imageURL` | `string` | URL to an image describing the style variant |
|
|
42
|
+
|
|
43
|
+
#### Defined in
|
|
44
|
+
|
|
45
|
+
[mapstyle.ts:21](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L21)
|
|
46
|
+
|
|
47
|
+
## Methods
|
|
48
|
+
|
|
49
|
+
### getDescription
|
|
50
|
+
|
|
51
|
+
▸ **getDescription**(): `string`
|
|
52
|
+
|
|
53
|
+
Get the human-friendly description
|
|
54
|
+
|
|
55
|
+
#### Returns
|
|
56
|
+
|
|
57
|
+
`string`
|
|
58
|
+
|
|
59
|
+
#### Defined in
|
|
60
|
+
|
|
61
|
+
[mapstyle.ts:84](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L84)
|
|
62
|
+
|
|
63
|
+
___
|
|
64
|
+
|
|
65
|
+
### getFullName
|
|
66
|
+
|
|
67
|
+
▸ **getFullName**(): `string`
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`string`
|
|
72
|
+
|
|
73
|
+
#### Defined in
|
|
74
|
+
|
|
75
|
+
[mapstyle.ts:61](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L61)
|
|
76
|
+
|
|
77
|
+
___
|
|
78
|
+
|
|
79
|
+
### getId
|
|
80
|
+
|
|
81
|
+
▸ **getId**(): `string`
|
|
82
|
+
|
|
83
|
+
Get the MapTiler Cloud id
|
|
84
|
+
|
|
85
|
+
#### Returns
|
|
86
|
+
|
|
87
|
+
`string`
|
|
88
|
+
|
|
89
|
+
#### Defined in
|
|
90
|
+
|
|
91
|
+
[mapstyle.ts:77](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L77)
|
|
92
|
+
|
|
93
|
+
___
|
|
94
|
+
|
|
95
|
+
### getImageURL
|
|
96
|
+
|
|
97
|
+
▸ **getImageURL**(): `string`
|
|
98
|
+
|
|
99
|
+
Get the image URL that represent _this_ variant
|
|
100
|
+
|
|
101
|
+
#### Returns
|
|
102
|
+
|
|
103
|
+
`string`
|
|
104
|
+
|
|
105
|
+
#### Defined in
|
|
106
|
+
|
|
107
|
+
[mapstyle.ts:128](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L128)
|
|
108
|
+
|
|
109
|
+
___
|
|
110
|
+
|
|
111
|
+
### getName
|
|
112
|
+
|
|
113
|
+
▸ **getName**(): `string`
|
|
114
|
+
|
|
115
|
+
Get the human-friendly name
|
|
116
|
+
|
|
117
|
+
#### Returns
|
|
118
|
+
|
|
119
|
+
`string`
|
|
120
|
+
|
|
121
|
+
#### Defined in
|
|
122
|
+
|
|
123
|
+
[mapstyle.ts:57](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L57)
|
|
124
|
+
|
|
125
|
+
___
|
|
126
|
+
|
|
127
|
+
### getReferenceStyle
|
|
128
|
+
|
|
129
|
+
▸ **getReferenceStyle**(): [`ReferenceMapStyle`](ReferenceMapStyle.md)
|
|
130
|
+
|
|
131
|
+
Get the reference style this variant belongs to
|
|
132
|
+
|
|
133
|
+
#### Returns
|
|
134
|
+
|
|
135
|
+
[`ReferenceMapStyle`](ReferenceMapStyle.md)
|
|
136
|
+
|
|
137
|
+
#### Defined in
|
|
138
|
+
|
|
139
|
+
[mapstyle.ts:92](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L92)
|
|
140
|
+
|
|
141
|
+
___
|
|
142
|
+
|
|
143
|
+
### getType
|
|
144
|
+
|
|
145
|
+
▸ **getType**(): `string`
|
|
146
|
+
|
|
147
|
+
Get the variant type (eg. "DEFAULT", "DARK", "PASTEL", etc.)
|
|
148
|
+
|
|
149
|
+
#### Returns
|
|
150
|
+
|
|
151
|
+
`string`
|
|
152
|
+
|
|
153
|
+
#### Defined in
|
|
154
|
+
|
|
155
|
+
[mapstyle.ts:69](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L69)
|
|
156
|
+
|
|
157
|
+
___
|
|
158
|
+
|
|
159
|
+
### getVariant
|
|
160
|
+
|
|
161
|
+
▸ **getVariant**(`variantType`): [`MapStyleVariant`](MapStyleVariant.md)
|
|
162
|
+
|
|
163
|
+
Retrieve the variant of a given type. If not found, will return the "DEFAULT" variant.
|
|
164
|
+
(eg. _this_ "DARK" variant does not have any "PASTEL" variant, then the "DEFAULT" is returned)
|
|
165
|
+
|
|
166
|
+
#### Parameters
|
|
167
|
+
|
|
168
|
+
| Name | Type |
|
|
169
|
+
| :------ | :------ |
|
|
170
|
+
| `variantType` | `string` |
|
|
171
|
+
|
|
172
|
+
#### Returns
|
|
173
|
+
|
|
174
|
+
[`MapStyleVariant`](MapStyleVariant.md)
|
|
175
|
+
|
|
176
|
+
#### Defined in
|
|
177
|
+
|
|
178
|
+
[mapstyle.ts:112](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L112)
|
|
179
|
+
|
|
180
|
+
___
|
|
181
|
+
|
|
182
|
+
### getVariants
|
|
183
|
+
|
|
184
|
+
▸ **getVariants**(): [`MapStyleVariant`](MapStyleVariant.md)[]
|
|
185
|
+
|
|
186
|
+
Get all the variants for _this_ variants, except _this_ current one
|
|
187
|
+
|
|
188
|
+
#### Returns
|
|
189
|
+
|
|
190
|
+
[`MapStyleVariant`](MapStyleVariant.md)[]
|
|
191
|
+
|
|
192
|
+
#### Defined in
|
|
193
|
+
|
|
194
|
+
[mapstyle.ts:120](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L120)
|
|
195
|
+
|
|
196
|
+
___
|
|
197
|
+
|
|
198
|
+
### hasVariant
|
|
199
|
+
|
|
200
|
+
▸ **hasVariant**(`variantType`): `boolean`
|
|
201
|
+
|
|
202
|
+
Check if a variant of a given type exists for _this_ variants
|
|
203
|
+
(eg. if this is a "DARK", then we can check if there is a "LIGHT" variant of it)
|
|
204
|
+
|
|
205
|
+
#### Parameters
|
|
206
|
+
|
|
207
|
+
| Name | Type |
|
|
208
|
+
| :------ | :------ |
|
|
209
|
+
| `variantType` | `string` |
|
|
210
|
+
|
|
211
|
+
#### Returns
|
|
212
|
+
|
|
213
|
+
`boolean`
|
|
214
|
+
|
|
215
|
+
#### Defined in
|
|
216
|
+
|
|
217
|
+
[mapstyle.ts:102](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L102)
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
[MapTiler Client - v1.1.0](../README.md) / ReferenceMapStyle
|
|
2
|
+
|
|
3
|
+
# Class: ReferenceMapStyle
|
|
4
|
+
|
|
5
|
+
An instance of reference style contains a list of StyleVariants ordered by relevance
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Constructors
|
|
10
|
+
|
|
11
|
+
- [constructor](ReferenceMapStyle.md#constructor)
|
|
12
|
+
|
|
13
|
+
### Methods
|
|
14
|
+
|
|
15
|
+
- [addVariant](ReferenceMapStyle.md#addvariant)
|
|
16
|
+
- [getDefaultVariant](ReferenceMapStyle.md#getdefaultvariant)
|
|
17
|
+
- [getId](ReferenceMapStyle.md#getid)
|
|
18
|
+
- [getName](ReferenceMapStyle.md#getname)
|
|
19
|
+
- [getVariant](ReferenceMapStyle.md#getvariant)
|
|
20
|
+
- [getVariants](ReferenceMapStyle.md#getvariants)
|
|
21
|
+
- [hasVariant](ReferenceMapStyle.md#hasvariant)
|
|
22
|
+
|
|
23
|
+
## Constructors
|
|
24
|
+
|
|
25
|
+
### constructor
|
|
26
|
+
|
|
27
|
+
• **new ReferenceMapStyle**(`name`, `id`)
|
|
28
|
+
|
|
29
|
+
#### Parameters
|
|
30
|
+
|
|
31
|
+
| Name | Type | Description |
|
|
32
|
+
| :------ | :------ | :------ |
|
|
33
|
+
| `name` | `string` | Human-friendly name of this reference style |
|
|
34
|
+
| `id` | `string` | ID of this reference style |
|
|
35
|
+
|
|
36
|
+
#### Defined in
|
|
37
|
+
|
|
38
|
+
[mapstyle.ts:147](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L147)
|
|
39
|
+
|
|
40
|
+
## Methods
|
|
41
|
+
|
|
42
|
+
### addVariant
|
|
43
|
+
|
|
44
|
+
▸ **addVariant**(`v`): `void`
|
|
45
|
+
|
|
46
|
+
Add a variant to _this_ reference style
|
|
47
|
+
|
|
48
|
+
#### Parameters
|
|
49
|
+
|
|
50
|
+
| Name | Type |
|
|
51
|
+
| :------ | :------ |
|
|
52
|
+
| `v` | [`MapStyleVariant`](MapStyleVariant.md) |
|
|
53
|
+
|
|
54
|
+
#### Returns
|
|
55
|
+
|
|
56
|
+
`void`
|
|
57
|
+
|
|
58
|
+
#### Defined in
|
|
59
|
+
|
|
60
|
+
[mapstyle.ts:179](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L179)
|
|
61
|
+
|
|
62
|
+
___
|
|
63
|
+
|
|
64
|
+
### getDefaultVariant
|
|
65
|
+
|
|
66
|
+
▸ **getDefaultVariant**(): [`MapStyleVariant`](MapStyleVariant.md)
|
|
67
|
+
|
|
68
|
+
Get the defualt variant for this reference style
|
|
69
|
+
|
|
70
|
+
#### Returns
|
|
71
|
+
|
|
72
|
+
[`MapStyleVariant`](MapStyleVariant.md)
|
|
73
|
+
|
|
74
|
+
#### Defined in
|
|
75
|
+
|
|
76
|
+
[mapstyle.ts:217](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L217)
|
|
77
|
+
|
|
78
|
+
___
|
|
79
|
+
|
|
80
|
+
### getId
|
|
81
|
+
|
|
82
|
+
▸ **getId**(): `string`
|
|
83
|
+
|
|
84
|
+
Get the id of _this_ reference style
|
|
85
|
+
|
|
86
|
+
#### Returns
|
|
87
|
+
|
|
88
|
+
`string`
|
|
89
|
+
|
|
90
|
+
#### Defined in
|
|
91
|
+
|
|
92
|
+
[mapstyle.ts:171](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L171)
|
|
93
|
+
|
|
94
|
+
___
|
|
95
|
+
|
|
96
|
+
### getName
|
|
97
|
+
|
|
98
|
+
▸ **getName**(): `string`
|
|
99
|
+
|
|
100
|
+
Get the human-friendly name of this reference style
|
|
101
|
+
|
|
102
|
+
#### Returns
|
|
103
|
+
|
|
104
|
+
`string`
|
|
105
|
+
|
|
106
|
+
#### Defined in
|
|
107
|
+
|
|
108
|
+
[mapstyle.ts:163](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L163)
|
|
109
|
+
|
|
110
|
+
___
|
|
111
|
+
|
|
112
|
+
### getVariant
|
|
113
|
+
|
|
114
|
+
▸ **getVariant**(`variantType`): [`MapStyleVariant`](MapStyleVariant.md)
|
|
115
|
+
|
|
116
|
+
Get a given variant. If the given type of variant does not exist for this reference style,
|
|
117
|
+
then the most relevant default variant is returned instead
|
|
118
|
+
|
|
119
|
+
#### Parameters
|
|
120
|
+
|
|
121
|
+
| Name | Type |
|
|
122
|
+
| :------ | :------ |
|
|
123
|
+
| `variantType` | `string` |
|
|
124
|
+
|
|
125
|
+
#### Returns
|
|
126
|
+
|
|
127
|
+
[`MapStyleVariant`](MapStyleVariant.md)
|
|
128
|
+
|
|
129
|
+
#### Defined in
|
|
130
|
+
|
|
131
|
+
[mapstyle.ts:199](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L199)
|
|
132
|
+
|
|
133
|
+
___
|
|
134
|
+
|
|
135
|
+
### getVariants
|
|
136
|
+
|
|
137
|
+
▸ **getVariants**(): [`MapStyleVariant`](MapStyleVariant.md)[]
|
|
138
|
+
|
|
139
|
+
Get the list of variants for this reference style
|
|
140
|
+
|
|
141
|
+
#### Returns
|
|
142
|
+
|
|
143
|
+
[`MapStyleVariant`](MapStyleVariant.md)[]
|
|
144
|
+
|
|
145
|
+
#### Defined in
|
|
146
|
+
|
|
147
|
+
[mapstyle.ts:209](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L209)
|
|
148
|
+
|
|
149
|
+
___
|
|
150
|
+
|
|
151
|
+
### hasVariant
|
|
152
|
+
|
|
153
|
+
▸ **hasVariant**(`variantType`): `boolean`
|
|
154
|
+
|
|
155
|
+
Check if a given variant type exists for this reference style
|
|
156
|
+
|
|
157
|
+
#### Parameters
|
|
158
|
+
|
|
159
|
+
| Name | Type |
|
|
160
|
+
| :------ | :------ |
|
|
161
|
+
| `variantType` | `string` |
|
|
162
|
+
|
|
163
|
+
#### Returns
|
|
164
|
+
|
|
165
|
+
`boolean`
|
|
166
|
+
|
|
167
|
+
#### Defined in
|
|
168
|
+
|
|
169
|
+
[mapstyle.ts:189](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/mapstyle.ts#L189)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[MapTiler Client
|
|
1
|
+
[MapTiler Client - v1.1.0](../README.md) / ServiceError
|
|
2
2
|
|
|
3
3
|
# Class: ServiceError
|
|
4
4
|
|
|
@@ -39,7 +39,7 @@ Error.constructor
|
|
|
39
39
|
|
|
40
40
|
#### Defined in
|
|
41
41
|
|
|
42
|
-
[services/ServiceError.ts:5](https://github.com/maptiler/maptiler-client-js/blob/
|
|
42
|
+
[services/ServiceError.ts:5](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/ServiceError.ts#L5)
|
|
43
43
|
|
|
44
44
|
## Properties
|
|
45
45
|
|
|
@@ -49,4 +49,4 @@ Error.constructor
|
|
|
49
49
|
|
|
50
50
|
#### Defined in
|
|
51
51
|
|
|
52
|
-
[services/ServiceError.ts:5](https://github.com/maptiler/maptiler-client-js/blob/
|
|
52
|
+
[services/ServiceError.ts:5](https://github.com/maptiler/maptiler-client-js/blob/64f9493/src/services/ServiceError.ts#L5)
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
hiDPI: true,
|
|
67
67
|
width: 1024,
|
|
68
68
|
height: 2048,
|
|
69
|
-
style:
|
|
69
|
+
style: maptilerclient.MapStyle.STAGE.DARK,
|
|
70
70
|
path: [[-9.8905, 36.6274], [-9.8905, 42.3208], [-6.0453, 42.3208], [-6.0453, 36.6274], [-9.8905, 36.6274]],
|
|
71
71
|
pathStrokeColor: 'red',
|
|
72
72
|
pathWidth: 4,
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maptiler/client",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Javascript & Typescript wrapper to MapTiler Cloud API",
|
|
5
5
|
"module": "dist/maptiler-client.mjs",
|
|
6
6
|
"types": "dist/maptiler-client.d.ts",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"devserve": "rm -rf dist/*; NODE_ENV=development rollup -c -w & serve && fg",
|
|
35
35
|
"format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
|
|
36
36
|
"lint": "eslint --fix \"src/**/*.{js,ts}\"",
|
|
37
|
-
"docmd": "rm -rf docsmd/*; typedoc --readme none --plugin typedoc-plugin-markdown --out docsmd src/index.ts
|
|
38
|
-
"dochtml": "rm -rf docs/*; typedoc
|
|
37
|
+
"docmd": "rm -rf docsmd/*; typedoc --readme none --plugin typedoc-plugin-markdown --out docsmd src/index.ts",
|
|
38
|
+
"dochtml": "rm -rf docs/*; typedoc; cp -r images docs/",
|
|
39
39
|
"doc": "npm run docmd; npm run dochtml",
|
|
40
40
|
"prepare": "npm run format; npm run lint; npm run build; npm run doc",
|
|
41
41
|
"test": "echo 'tests'"
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"rollup-plugin-string": "^3.0.0",
|
|
61
61
|
"rollup-plugin-swc": "^0.2.1",
|
|
62
62
|
"serve": "^14.1.1",
|
|
63
|
-
"typedoc": "^0.23.
|
|
64
|
-
"typedoc-plugin-markdown": "^3.
|
|
63
|
+
"typedoc": "^0.23.24",
|
|
64
|
+
"typedoc-plugin-markdown": "^3.14.0",
|
|
65
65
|
"typescript": "^4.8.3"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|