Skip to content

Bugfix: Link for shared maps without context#10726

Closed
petra-schanz wants to merge 1 commit intogeosolutions-it:masterfrom
petra-schanz:master
Closed

Bugfix: Link for shared maps without context#10726
petra-schanz wants to merge 1 commit intogeosolutions-it:masterfrom
petra-schanz:master

Conversation

@petra-schanz
Copy link
Copy Markdown
Contributor

If you use the share functionality in a map, that is not created out of a context, the shared link will not show the correct center and zoom, as long as the /config part in the URL is missing.
As the documentations states in
https://docs.mapstore.geosolutionsgroup.com/en/latest/developer-guide/map-query-parameters/#center-zoom and in
https://docs.mapstore.geosolutionsgroup.com/en/latest/developer-guide/map-query-parameters/#marker-zoom that such a /config part should be part of configured URLs, this fix adds the /config part

Test is adapted to the new solution.

Bugfix on behalf of DB Systel GmbH

Description

Please check if the PR fulfills these requirements

What kind of change does this PR introduce? (check one with "x", remove the others)

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

Issue

What is the current behavior?
If you use the share functionality in a map, that is not created out of a context, the shared link will not show the correct center and zoom, as long as the /config part in the URL is missing.
The documentations states in
https://docs.mapstore.geosolutionsgroup.com/en/latest/developer-guide/map-query-parameters/#center-zoom and in
https://docs.mapstore.geosolutionsgroup.com/en/latest/developer-guide/map-query-parameters/#marker-zoom that such a /config part should be part of configured URLs.

What is the new behavior?
As the documentations states in
https://docs.mapstore.geosolutionsgroup.com/en/latest/developer-guide/map-query-parameters/#center-zoom and in
https://docs.mapstore.geosolutionsgroup.com/en/latest/developer-guide/map-query-parameters/#marker-zoom that such a /config part should be part of configured URLs, this fix adds the /config part.
So now if you use the share functionality in a map, even if it is not created out of a context, the shared link will show the correct center and zoom.

Breaking change

Does this PR introduce a breaking change? (check one with "x", remove the other)

  • Yes, and I documented them in migration notes
  • No

Other useful information

Bugfix on behalf of DB Systel GmbH

If you use the share functionality in a map, that is not created out of a context,
the shared link will not show the correct center and zoom, as long as the /config
part in the URL is missing.
As the documentations states in
https://docs.mapstore.geosolutionsgroup.com/en/latest/developer-guide/map-query-parameters/#center-zoom
and in
https://docs.mapstore.geosolutionsgroup.com/en/latest/developer-guide/map-query-parameters/#marker-zoom
that such a /config part should be part of configured URLs, this fix adds the /config part

Test is adapted to the new solution.

Bugfix on behalf of DB Systel GmbH
@MV88
Copy link
Copy Markdown
Contributor

MV88 commented Dec 20, 2024

when you the /config part is because you are accessing to the default config map, it could have been called
/new /anyJsonMap present for static maps https://github.com/geosolutions-it/MapStore2/blob/master/web/client/configs/config.json

image

If you use the share functionality in a map, that is not created out of a context, the shared link will not show the correct center and zoom, as long as the /config part in the URL is missing.

  • can you make an example?
  • is the wrong url coming from the share plugin?

@petra-schanz
Copy link
Copy Markdown
Contributor Author

Hello Matteo,

to reproduce the bug:

What I see then is a map with a correct marker but centered to a completely different place.

@MV88
Copy link
Copy Markdown
Contributor

MV88 commented Feb 28, 2025

@tdipisa i think that these steps are the same as #10807
so i would like to retest this after the PR 10847 gets merged

@tdipisa tdipisa modified the milestones: 2025.01.00, 2025.01.01 Jun 12, 2025
@MV88
Copy link
Copy Markdown
Contributor

MV88 commented Jun 17, 2025

is not created out of a context,

i tested this and i think it can be closed now.
@ElenaGallo please do another test as well

@tdipisa tdipisa modified the milestones: 2025.01.01, 2025.01.02 Jul 24, 2025
@tdipisa tdipisa assigned ElenaGallo and unassigned petra-schanz Sep 5, 2025
@tdipisa
Copy link
Copy Markdown
Member

tdipisa commented Sep 5, 2025

@ElenaGallo still waiting on your test.

@ElenaGallo
Copy link
Copy Markdown
Contributor

The feature works as it should. I'm closing this PR

@ElenaGallo ElenaGallo closed this Sep 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants