Skip to content
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

fix layer id from active layer #331

Closed
wants to merge 1 commit into from

Conversation

Gaetanbrl
Copy link
Member

Correctif suite à la #324

  • Récupération des ID de layer à partir de la méthode mv.getCurrentLayerId (le mode actif des layers n'étant plus utilisé comme précédemment)

@Gaetanbrl Gaetanbrl requested a review from lecault November 26, 2024 14:43
@lecault
Copy link
Collaborator

lecault commented Nov 27, 2024

J'ai testé sur un cas simple : title sur champ nom couche écluse.

Et ça ne fonctionne pas.

Voici l'erreur de console :

Uncaught (in promise) TypeError: Invalid template! Template should be a "string" but "object" was given as the first argument for mustache#render(template, view, partials)
at Object.render (mustache.min.js:1:9011)
at applyTemplate (info.js:1043:29)
at Object. (info.js:526:36)
at Function.each (jquery-1.10.2.min.js:4:5347)
at callback (info.js:433:9)
at info.js:727:7

https://kartenn.region-bretagne.fr/kartoviz-dev/#store/public/7e99a35cee0f/preview/2d945322-ac9e-11ef-8d7c-00505698359e

@Gaetanbrl
Copy link
Member Author

Le XML Semble en effet mal formé :

image

@Gaetanbrl
Copy link
Member Author

J'investigue et je reviens avec un fix.

@Gaetanbrl Gaetanbrl self-assigned this Nov 27, 2024
@Gaetanbrl
Copy link
Member Author

Après investigation, j'observe que le template est écrit en dur (CDATA - en string) dans le XML alors que dans la dernière release, le MST est stocké dans un fichier et le XML contient pour chaque couche le lien vers le MST associé.

C'est comme si le code de base n'était pas le bon...

@Gaetanbrl
Copy link
Member Author

Le problème n'est pas présent sur cette PR en date du 15/11/2024.
31bba26

@Gaetanbrl
Copy link
Member Author

Gaetanbrl commented Nov 27, 2024

Le template fonctionne dans après merge de cette PR (+ correction du nom de lib dans index.html):

083c396

@Gaetanbrl Gaetanbrl force-pushed the template-gen-fix branch 2 times, most recently from b2e8428 to e72d05b Compare November 27, 2024 15:54
roll back id retrieve method

pretty code
@Gaetanbrl
Copy link
Member Author

Le dernier commit permet de remettre le statut "activate" sur les layers.
Ce statut (classe CSS) étant utilisé dans plusieurs endroits, des régressions ont été constatées.

@Gaetanbrl
Copy link
Member Author

Le correctif sera appliqué dans la PR #333 de l'issue #218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants