You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-17 03:47:45 +02:00
feat: Maplibre (#4294)
* maplibre on web, custom styles from server Actually use new vector tile server, custom style.json support multiple style files, light/dark mode cleanup, use new map everywhere send file directly instead of loading first better light/dark mode switching remove leaflet fix mapstyles dto, first draft of map settings delete and add styles fix delete default styles fix tests only allow one light and one dark style url revert config core changes fix server config store fix tests move axios fetches to repo fix package-lock fix tests * open api * add assets to docker container * web: use mapSettings color for style * style: add unique ids to map styles * mobile: use style json for vector / raster * do not use svelte-material-icons * add click events to markers, simplify asset detail map * improve map performance by using asset thumbnails for markers instead of original file * Remove custom attribution (by request) * mobile: update map attribution * style: map dark mode * style: map light mode * zoom level for state * styling * overflow gradient * Limit maxZoom to 14 * mobile: listen for mapStyle changes in MapThumbnail * mobile: update concurrency --------- Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: bo0tzz <git@bo0tzz.me> Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
117
cli/src/api/open-api/api.ts
generated
117
cli/src/api/open-api/api.ts
generated
@ -2224,6 +2224,20 @@ export interface MapMarkerResponseDto {
|
||||
*/
|
||||
'lon': number;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
|
||||
export const MapTheme = {
|
||||
Light: 'light',
|
||||
Dark: 'dark'
|
||||
} as const;
|
||||
|
||||
export type MapTheme = typeof MapTheme[keyof typeof MapTheme];
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
@ -2822,12 +2836,6 @@ export interface ServerConfigDto {
|
||||
* @memberof ServerConfigDto
|
||||
*/
|
||||
'loginPageMessage': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ServerConfigDto
|
||||
*/
|
||||
'mapTileUrl': string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
@ -3695,6 +3703,12 @@ export interface SystemConfigMachineLearningDto {
|
||||
* @interface SystemConfigMapDto
|
||||
*/
|
||||
export interface SystemConfigMapDto {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof SystemConfigMapDto
|
||||
*/
|
||||
'darkStyle': string;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
@ -3706,7 +3720,7 @@ export interface SystemConfigMapDto {
|
||||
* @type {string}
|
||||
* @memberof SystemConfigMapDto
|
||||
*/
|
||||
'tileUrl': string;
|
||||
'lightStyle': string;
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -15063,6 +15077,51 @@ export const SystemConfigApiAxiosParamCreator = function (configuration?: Config
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
|
||||
return {
|
||||
url: toPathString(localVarUrlObj),
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {MapTheme} theme
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getMapStyle: async (theme: MapTheme, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'theme' is not null or undefined
|
||||
assertParamExists('getMapStyle', 'theme', theme)
|
||||
const localVarPath = `/system-config/map/style.json`;
|
||||
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
||||
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
||||
let baseOptions;
|
||||
if (configuration) {
|
||||
baseOptions = configuration.baseOptions;
|
||||
}
|
||||
|
||||
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
// authentication cookie required
|
||||
|
||||
// authentication api_key required
|
||||
await setApiKeyToObject(localVarHeaderParameter, "x-api-key", configuration)
|
||||
|
||||
// authentication bearer required
|
||||
// http bearer authentication required
|
||||
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
||||
|
||||
if (theme !== undefined) {
|
||||
localVarQueryParameter['theme'] = theme;
|
||||
}
|
||||
|
||||
|
||||
|
||||
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
||||
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
||||
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
||||
@ -15182,6 +15241,16 @@ export const SystemConfigApiFp = function(configuration?: Configuration) {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getConfigDefaults(options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {MapTheme} theme
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async getMapStyle(theme: MapTheme, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
|
||||
const localVarAxiosArgs = await localVarAxiosParamCreator.getMapStyle(theme, options);
|
||||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {*} [options] Override http request option.
|
||||
@ -15227,6 +15296,15 @@ export const SystemConfigApiFactory = function (configuration?: Configuration, b
|
||||
getConfigDefaults(options?: AxiosRequestConfig): AxiosPromise<SystemConfigDto> {
|
||||
return localVarFp.getConfigDefaults(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {SystemConfigApiGetMapStyleRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
getMapStyle(requestParameters: SystemConfigApiGetMapStyleRequest, options?: AxiosRequestConfig): AxiosPromise<object> {
|
||||
return localVarFp.getMapStyle(requestParameters.theme, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @param {*} [options] Override http request option.
|
||||
@ -15247,6 +15325,20 @@ export const SystemConfigApiFactory = function (configuration?: Configuration, b
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* Request parameters for getMapStyle operation in SystemConfigApi.
|
||||
* @export
|
||||
* @interface SystemConfigApiGetMapStyleRequest
|
||||
*/
|
||||
export interface SystemConfigApiGetMapStyleRequest {
|
||||
/**
|
||||
*
|
||||
* @type {MapTheme}
|
||||
* @memberof SystemConfigApiGetMapStyle
|
||||
*/
|
||||
readonly theme: MapTheme
|
||||
}
|
||||
|
||||
/**
|
||||
* Request parameters for updateConfig operation in SystemConfigApi.
|
||||
* @export
|
||||
@ -15288,6 +15380,17 @@ export class SystemConfigApi extends BaseAPI {
|
||||
return SystemConfigApiFp(this.configuration).getConfigDefaults(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {SystemConfigApiGetMapStyleRequest} requestParameters Request parameters.
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SystemConfigApi
|
||||
*/
|
||||
public getMapStyle(requestParameters: SystemConfigApiGetMapStyleRequest, options?: AxiosRequestConfig) {
|
||||
return SystemConfigApiFp(this.configuration).getMapStyle(requestParameters.theme, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} [options] Override http request option.
|
||||
|
Reference in New Issue
Block a user