@maptiler/client 1.6.0 → 1.8.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/pull_request_template.md +11 -0
- package/.github/workflows/format-lint.yml +24 -0
- package/CHANGELOG.md +25 -0
- package/dist/maptiler-client.cjs +587 -332
- package/dist/maptiler-client.cjs.map +1 -1
- package/dist/maptiler-client.d.ts +291 -12
- package/dist/maptiler-client.min.mjs +1 -1
- package/dist/maptiler-client.mjs +580 -332
- package/dist/maptiler-client.mjs.map +1 -1
- package/package.json +29 -20
- package/readme.md +134 -2
- package/rollup.config.js +3 -3
- package/tsconfig.json +1 -1
- package/dist/maptiler-client.umd.js +0 -1368
- package/dist/maptiler-client.umd.js.map +0 -1
- package/dist/maptiler-client.umd.min.js +0 -1
- package/docs/.nojekyll +0 -1
- package/docs/assets/custom.css +0 -118
- package/docs/assets/highlight.css +0 -85
- package/docs/assets/main.js +0 -58
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1280
- package/docs/classes/config.ClientConfig.html +0 -132
- package/docs/classes/services_ServiceError.ServiceError.html +0 -103
- package/docs/functions/language.getAutoLanguageGeocoding.html +0 -60
- package/docs/functions/services_simplify.default.html +0 -65
- package/docs/images/JS-logo.svg +0 -4
- package/docs/images/TS-logo.svg +0 -6
- package/docs/images/maptiler-client-logo.afdesign +0 -0
- package/docs/images/maptiler-client-logo.svg +0 -75
- package/docs/images/maptiler-logo-256.png +0 -0
- package/docs/images/maptiler-logo.svg +0 -23
- package/docs/images/screenshots/static-bounded-europe-1024.png +0 -0
- package/docs/images/screenshots/static-bounded-europe-2048.png +0 -0
- package/docs/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
- package/docs/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
- package/docs/images/screenshots/static-with-path.png +0 -0
- package/docs/index.html +0 -340
- package/docs/modules/config.html +0 -71
- package/docs/modules/language.html +0 -71
- package/docs/modules/services_ServiceError.html +0 -61
- package/docs/modules/services_coordinates.html +0 -84
- package/docs/modules/services_data.html +0 -66
- package/docs/modules/services_geocoding.html +0 -82
- package/docs/modules/services_geolocation.html +0 -68
- package/docs/modules/services_simplify.html +0 -61
- package/docs/modules/services_staticMaps.html +0 -74
- package/docs/modules.html +0 -59
- package/docs/types/config.FetchFunction.html +0 -71
- package/docs/types/language.LanguageGeocodingString.html +0 -58
- package/docs/types/services_coordinates.CoordinateExport.html +0 -71
- package/docs/types/services_coordinates.CoordinateGrid.html +0 -69
- package/docs/types/services_coordinates.CoordinateId.html +0 -71
- package/docs/types/services_coordinates.CoordinateSearch.html +0 -93
- package/docs/types/services_coordinates.CoordinateSearchResult.html +0 -75
- package/docs/types/services_coordinates.CoordinateTransformResult.html +0 -76
- package/docs/types/services_coordinates.CoordinateTransformation.html +0 -89
- package/docs/types/services_coordinates.CoordinatesSearchOptions.html +0 -83
- package/docs/types/services_coordinates.CoordinatesTransformOptions.html +0 -85
- package/docs/types/services_coordinates.XYZ.html +0 -73
- package/docs/types/services_data.GetDataOptions.html +0 -64
- package/docs/types/services_geocoding.ByIdGeocodingOptions.html +0 -63
- package/docs/types/services_geocoding.CommonForwardAndReverseGeocodingOptions.html +0 -63
- package/docs/types/services_geocoding.Coordinates.html +0 -63
- package/docs/types/services_geocoding.FeatureHierarchy.html +0 -63
- package/docs/types/services_geocoding.GeocodingFeature.html +0 -63
- package/docs/types/services_geocoding.GeocodingOptions.html +0 -63
- package/docs/types/services_geocoding.GeocodingSearchResult.html +0 -80
- package/docs/types/services_geocoding.LanguageGeocodingOptions.html +0 -70
- package/docs/types/services_geocoding.ReverseGeocodingOptions.html +0 -63
- package/docs/types/services_geolocation.GeolocationInfoOptions.html +0 -65
- package/docs/types/services_geolocation.GeolocationResult.html +0 -128
- package/docs/types/services_staticMaps.AutomaticStaticMapOptions.html +0 -61
- package/docs/types/services_staticMaps.BoundedStaticMapOptions.html +0 -61
- package/docs/types/services_staticMaps.CenteredStaticMapOptions.html +0 -61
- package/docs/types/services_staticMaps.StaticMapBaseOptions.html +0 -157
- package/docs/types/services_staticMaps.StaticMapMarker.html +0 -61
- package/docs/variables/config.config.html +0 -58
- package/docs/variables/language.LanguageGeocoding.html +0 -171
- package/docs/variables/services_coordinates.coordinates.html +0 -110
- package/docs/variables/services_data.data.html +0 -80
- package/docs/variables/services_geocoding.geocoding.html +0 -265
- package/docs/variables/services_geolocation.geolocation.html +0 -79
- package/docs/variables/services_staticMaps.staticMaps.html +0 -128
- package/docsmd/.nojekyll +0 -1
- package/docsmd/README.md +0 -873
- package/docsmd/assets/custom.css +0 -118
- package/docsmd/classes/ClientConfig.md +0 -90
- package/docsmd/classes/MapStyleVariant.md +0 -234
- package/docsmd/classes/ReferenceMapStyle.md +0 -169
- package/docsmd/classes/ServiceError.md +0 -52
- package/examples/test-browser-es.html +0 -103
- package/examples/test-browser-umd.html +0 -90
- package/examples/test-node.js +0 -52
- package/images/JS-logo.svg +0 -4
- package/images/TS-logo.svg +0 -6
- package/images/maptiler-client-logo.afdesign +0 -0
- package/images/maptiler-client-logo.svg +0 -75
- package/images/maptiler-logo-256.png +0 -0
- package/images/maptiler-logo.svg +0 -23
- package/images/screenshots/static-bounded-europe-1024.png +0 -0
- package/images/screenshots/static-bounded-europe-2048.png +0 -0
- package/images/screenshots/static-bounded-portugal-1024x2048.png +0 -0
- package/images/screenshots/static-bounded-portugal-2048x2048.png +0 -0
- package/images/screenshots/static-with-path.png +0 -0
- package/src/callFetch.ts +0 -18
- package/src/config.ts +0 -65
- package/src/defaults.ts +0 -11
- package/src/index.ts +0 -111
- package/src/language.ts +0 -87
- package/src/mapstyle.ts +0 -968
- package/src/services/ServiceError.ts +0 -10
- package/src/services/coordinates.ts +0 -258
- package/src/services/data.ts +0 -63
- package/src/services/geocoding.ts +0 -458
- package/src/services/geolocation.ts +0 -139
- package/src/services/simplify.ts +0 -87
- package/src/services/staticMaps.ts +0 -463
package/src/language.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Languages. Note that not all the languages of this list are available but the compatibility list may be expanded in the future.
|
|
3
|
-
*/
|
|
4
|
-
const LanguageGeocoding = {
|
|
5
|
-
AUTO: "auto",
|
|
6
|
-
ALBANIAN: "sq",
|
|
7
|
-
ARABIC: "ar",
|
|
8
|
-
ARMENIAN: "hy",
|
|
9
|
-
AZERBAIJANI: "az",
|
|
10
|
-
BELORUSSIAN: "be",
|
|
11
|
-
BOSNIAN: "bs",
|
|
12
|
-
BRETON: "br",
|
|
13
|
-
BULGARIAN: "bg",
|
|
14
|
-
CATALAN: "ca",
|
|
15
|
-
CHINESE: "zh",
|
|
16
|
-
CROATIAN: "hr",
|
|
17
|
-
CZECH: "cs",
|
|
18
|
-
DANISH: "da",
|
|
19
|
-
DUTCH: "nl",
|
|
20
|
-
ENGLISH: "en",
|
|
21
|
-
ESPERANTO: "eo",
|
|
22
|
-
ESTONIAN: "et",
|
|
23
|
-
FINNISH: "fi",
|
|
24
|
-
FRENCH: "fr",
|
|
25
|
-
FRISIAN: "fy",
|
|
26
|
-
GEORGIAN: "ka",
|
|
27
|
-
GERMAN: "de",
|
|
28
|
-
GREEK: "el",
|
|
29
|
-
HEBREW: "he",
|
|
30
|
-
HUNGARIAN: "hu",
|
|
31
|
-
ICELANDIC: "is",
|
|
32
|
-
IRISH: "ga",
|
|
33
|
-
ITALIAN: "it",
|
|
34
|
-
JAPANESE: "ja",
|
|
35
|
-
KANNADA: "kn",
|
|
36
|
-
KAZAKH: "kk",
|
|
37
|
-
KOREAN: "ko",
|
|
38
|
-
ROMAN_LATIN: "la",
|
|
39
|
-
LATVIAN: "lv",
|
|
40
|
-
LITHUANIAN: "lt",
|
|
41
|
-
LUXEMBOURGISH: "lb",
|
|
42
|
-
MACEDONIAN: "mk",
|
|
43
|
-
MALTESE: "mt",
|
|
44
|
-
NORWEGIAN: "no",
|
|
45
|
-
POLISH: "pl",
|
|
46
|
-
PORTUGUESE: "pt",
|
|
47
|
-
ROMANIAN: "ro",
|
|
48
|
-
ROMANSH: "rm",
|
|
49
|
-
RUSSIAN: "ru",
|
|
50
|
-
SCOTTISH_GAELIC: "gd",
|
|
51
|
-
SERBIAN_CYRILLIC: "sr",
|
|
52
|
-
SLOVAK: "sk",
|
|
53
|
-
SLOVENE: "sl",
|
|
54
|
-
SPANISH: "es",
|
|
55
|
-
SWEDISH: "sv",
|
|
56
|
-
THAI: "th",
|
|
57
|
-
TURKISH: "tr",
|
|
58
|
-
UKRAINIAN: "uk",
|
|
59
|
-
WELSH: "cy",
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
const languageCodeSet = new Set(Object.values(LanguageGeocoding));
|
|
63
|
-
|
|
64
|
-
type Values<T> = T[keyof T];
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Built-in languages values as strings
|
|
68
|
-
*/
|
|
69
|
-
type LanguageGeocodingString = Values<typeof LanguageGeocoding>;
|
|
70
|
-
|
|
71
|
-
function getAutoLanguageGeocoding(): LanguageGeocodingString {
|
|
72
|
-
if (typeof navigator === "undefined") {
|
|
73
|
-
return Intl.DateTimeFormat()
|
|
74
|
-
.resolvedOptions()
|
|
75
|
-
.locale.split("-")[0] as LanguageGeocodingString;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const canditatelangs = Array.from(
|
|
79
|
-
new Set(navigator.languages.map((l) => l.split("-")[0]))
|
|
80
|
-
).filter((l) => languageCodeSet.has(l as LanguageGeocodingString));
|
|
81
|
-
|
|
82
|
-
return canditatelangs.length
|
|
83
|
-
? (canditatelangs[0] as LanguageGeocodingString)
|
|
84
|
-
: LanguageGeocoding.ENGLISH;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export { LanguageGeocoding, LanguageGeocodingString, getAutoLanguageGeocoding };
|