Skip to content

Commit

Permalink
Fix maplibre controls display
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedHamouGisaia committed Jan 23, 2025
1 parent 916f278 commit c52f0a2
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 21 deletions.
3 changes: 1 addition & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { GetCollectionDisplayModule } from 'arlas-web-components';
import enComponents from 'arlas-web-components/assets/i18n/en.json';
import frComponents from 'arlas-web-components/assets/i18n/fr.json';
import {
ArlasCollaborativesearchService, ArlasConfigurationDescriptor, ArlasConfigurationUpdaterService,
ArlasConfigurationDescriptor, ArlasConfigurationUpdaterService,
ArlasIamService,
ArlasSettingsService,
ArlasStartupService,
Expand Down Expand Up @@ -147,7 +147,6 @@ export class CustomTranslateLoader implements TranslateLoader {
],
providers: [
forwardRef(() => ArlasConfigurationDescriptor),
forwardRef(() => ArlasCollaborativesearchService),
forwardRef(() => ArlasStartupService),
{
provide: APP_INITIALIZER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
arlas-mapgl {
arlas-map {
::ng-deep div.map__visu-list {
top: 10px;
right: 10px;
Expand All @@ -35,7 +35,7 @@ arlas-mapgl {
}
}

::ng-deep .mapboxgl-ctrl-top-right {
::ng-deep .maplibregl-ctrl-top-right {
top: 45px;
}

Expand All @@ -44,12 +44,12 @@ arlas-mapgl {
z-index: 1;
}

::ng-deep.mapboxgl-ctrl-group {
::ng-deep.maplibregl-ctrl-group {
box-shadow: none;
}

::ng-deep.mapboxgl-ctrl-group-addgeobox,
::ng-deep.mapboxgl-ctrl-group-removeaois {
::ng-deep.maplibregl-ctrl-group-addgeobox,
::ng-deep.maplibregl-ctrl-group-removeaois {
display: none;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,17 +110,12 @@ export class PreviewComponent implements AfterViewInit, OnDestroy {
const contributors: MapContributor[] = [];

mapContribConfigs.forEach(mapConfig => {
console.log(mapConfig);
this.collaborativeService.describe('courses').subscribe();
console.log(this.collaborativeService)

const mapContributor = ContributorBuilder.buildContributor('map',
mapConfig.identifier,
this.configService,
this.collaborativeService,
this.settingsService,
this.colorService);
console.log(mapContributor);
contributors.push(mapContributor);
});
const mapComponentConfig = ConfigExportHelper.getMapComponent(
Expand Down
1 change: 0 additions & 1 deletion src/app/modules/map-config/map-config.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ import { ArlasCollaborativesearchService } from 'arlas-wui-toolkit';
useClass: ArlasMaplibreService
},
ArlasMapService,
ArlasCollaborativesearchService
]
})
export class MapConfigModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { Injectable } from '@angular/core';
import { AbstractControl, FormArray, FormControl, FormGroup, ValidatorFn } from '@angular/forms';
import { marker } from '@colsen1991/ngx-translate-extract-marker';
import { LAYER_MODE } from '@map-config/components/edit-layer/models';
// The licence of this library is MIT.
import tilebelt from '@mapbox/tilebelt';
import { CollectionService, METRIC_TYPES } from '@services/collection-service/collection.service';
import { CollectionField } from '@services/collection-service/models';
Expand Down
11 changes: 5 additions & 6 deletions src/app/services/main-form-manager/config-map-export-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export class ConfigMapExportHelper {
metadata: this.getLayerMetadata(layerFg.customControls.collection.value, layerFg.customControls.collectionDisplayName.value,
mode, modeValues, colorService, taggableFields)
};
/** 'all' is the operator that allows to apply an "AND" operator in mapbox */
/** 'all' is the operator that allows to apply an "AND" operator */
layer.filter = ['all'];
const filters = !!modeValues.visibilityStep.filters ? modeValues.visibilityStep.filters.value : undefined;
if (!!filters) {
Expand All @@ -231,7 +231,7 @@ export class ConfigMapExportHelper {
layer.filter.push(['>=', fieldPath, +f.filterMinRangeValues]);
layer.filter.push(['<=', fieldPath, +f.filterMaxRangeValues]);
} else if (f.filterOperation === FILTER_OPERATION.OUT_RANGE) {
/** 'any' is the operator that allows to apply a "OR" filter in mapbox */
/** 'any' is the operator that allows to apply a "OR" filter */
const outRangeExpression: Array<any> = ['any'];
outRangeExpression.push(['<', fieldPath, +f.filterMinRangeValues]);
outRangeExpression.push(['>', fieldPath, +f.filterMaxRangeValues]);
Expand All @@ -251,11 +251,10 @@ export class ConfigMapExportHelper {
* @param geometryType
*/
public static getLayerType(geometryType: GEOMETRY_TYPE): GEOMETRY_TYPE | string {
/** we change the type of circle heat map to keep the compatibility with mapbox **/
/** we change the type of circle heat map to keep the compatibility with mapbox and maplibre **/
if (geometryType === GEOMETRY_TYPE.circleHeat) {
return GEOMETRY_TYPE.circle;
}

return geometryType;
}

Expand Down Expand Up @@ -494,8 +493,8 @@ export class ConfigMapExportHelper {
}

/**
* Build the correct array from interpolated values to obtain an array that respects the MapBox expression format
* https://docs.mapbox.com/style-spec/reference/expressions/
* Build the correct array from interpolated values to obtain an array that respects the maplibre expression format
* https://maplibre.org/maplibre-style-spec/expressions/
* @param interpolatedValues interpolated properties that determine the type of array we build ( count, normalize )
* @param mode
* @param valuesToInsert the value to insert at the end of the array
Expand Down
2 changes: 1 addition & 1 deletion src/assets/about/about_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ The ARLAS solution relies on:
- D3js
- Node
- NPM
- mapbox
- Maplibre

Powered by __Gisaïa__
2 changes: 1 addition & 1 deletion src/assets/about/about_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ La solution ARLAS est basée sur:
- D3js
- Node
- NPM
- mapbox
- maplibre

Powered by __Gisaïa__

0 comments on commit c52f0a2

Please sign in to comment.