-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geostyler style handler #1487
Geostyler style handler #1487
Conversation
This reverts commit b55613f.
for (var index in stylesCopy) { | ||
var DescriptorLayerRulesAdapted = []; | ||
let descriptorLayerName = stylesCopy[index].name; | ||
stylesCopy[index].rules.forEach(function (styleRule) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p-etre mettre des arrow function plutot que des function (...) {
styleRule.symbolizers.forEach(function (styleRuleSymbolizer) { | ||
switch (styleRuleSymbolizer.kind) { | ||
case 'Mark': | ||
(styleRuleSymbolizer as MarkSymbolizer).radius = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
crée une doc dans l'entete de la méthode de la raison d'imposer des tailles maximale au radius, width et size
/*
- ce genre de commentaire. regarde dans le code des examples
*/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
faire pour chaque méthode svp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vérifie avec la version 16.x si les dépendances sont encore nécessaire (sauf geostyler-legend et geostyler-openlayers-parser)
stylableLayerOptions.igoStyle?.geoStylerStyle?.global; | ||
const geostylerStyleHover = | ||
stylableLayerOptions.igoStyle?.geoStylerStyle?.hover; | ||
//const globalWriteStyleResult$ = geostylerStyleGlobal ? this.geostylerService.geostylerToOl(geostylerStyleGlobal) : of(undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ca ne va pas plutot dans l'autre pr cette section?
@@ -79,6 +79,14 @@ export class VectorLayer extends Layer { | |||
get exportable(): boolean { | |||
return this.options.exportable !== false; | |||
} | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean up
@@ -100,6 +108,8 @@ export class VectorLayer extends Layer { | |||
} | |||
|
|||
protected createOlLayer(): olLayerVector<olSourceVector<OlGeometry>> { | |||
// convertir cet objet this.options.igoStyle.geoStylerStyle en objet ol qui sera appliqué |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ca ne va pas plutot dans l'autre pr cette section?
@@ -148,6 +148,7 @@ export class HoverFeatureDirective implements OnInit, OnDestroy { | |||
zIndex: 901, | |||
renderMode: 'vector', | |||
declutter: true, | |||
// style = geostylerstyle.hover converti en ol.... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ca ne va pas plutot dans l'autre pr cette section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ca ne va pas plutot dans l'autre pr cette section?
catchError, | ||
concatMap, | ||
map | ||
/*, mergeMap*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cleanup
private transferLayersToLegend(styles: GeoStylerStyle[]) { | ||
var stylesCopy = [...styles]; | ||
const layerDescriptorsList: GeoStylerStyle[] = []; | ||
for (var index in stylesCopy) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changer vers un foreach si applicable?
styleRule.symbolizers.forEach(function (styleRuleSymbolizer) { | ||
switch (styleRuleSymbolizer.kind) { | ||
case 'Mark': | ||
(styleRuleSymbolizer as MarkSymbolizer).radius = 10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
faire pour chaque méthode svp
Les changements demandés ci-haut ont été faits |
superseeded by #1678 |
Added management of a Geostyler layer. It is able to load throught a context, .json file, layers with a geostyler style.
It reuse already developed method createAsyncLayer. Added part that call geostylerService which use a parser to transform the Geostyle to an OpenLayer style.
Up to date with Angular 16