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

Update default CS and Projection for layer #854

Merged
merged 18 commits into from
Jul 20, 2023

Conversation

AliyanH
Copy link
Member

@AliyanH AliyanH commented May 18, 2023

@AliyanH AliyanH requested a review from prushforth June 2, 2023 20:04
@AliyanH AliyanH marked this pull request as ready for review June 2, 2023 20:04
@AliyanH AliyanH requested a review from prushforth June 19, 2023 14:06
Copy link
Member

@prushforth prushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, tested with geoserver too. I noticed that in mapml2geojson.html / test there are some comments like this:

<!-- Setting the geometry coordinates to gcrs, as the default is pcrs -->
            <map-geometry cs="gcrs">

so maybe we should amend that test / others that we may find that set the default CS and projection via map-meta or cs attribute to RELY on the new default values for these? At least we could remove the comment because it's no longer true that the default is PCRS.

prushfor and others added 3 commits June 19, 2023 16:11
navigate from focused on-screen element in shadow root to custom element
(_groupEl already allows code navigation to SD-rendered content)

Add test leveraging <g>._feature property to verify rendering of default
coordinate system geometries.
because they are the defaults / fallback values when not explicitly
marked up.
…eta name="cs" content="gcrs" and map-meta name="projection" content="OSMTILE"

Revert "Remove cs="gcrs" and <map-meta name="projection" content="OSMTILE"> "

This reverts commit 3be3684.

update test to use default projection and CS
src/map-feature.js Outdated Show resolved Hide resolved
@AliyanH
Copy link
Member Author

AliyanH commented Jun 23, 2023

Is this ready to merge?

I believe so, do you think the testing is sufficient or can you think of any other edge cases? I will give it a second look also.

@prushforth

This comment was marked as off-topic.

@prushforth

This comment was marked as outdated.

@AliyanH

This comment was marked as outdated.

@AliyanH
Copy link
Member Author

AliyanH commented Jul 7, 2023

@prushforth in ca9399d, default projection was added, and the use of 'createmap' events was removed.

Though there is still a bug with the _processInitialExtent/_initTemplateVars, this occurs when the map is initially loading and the custom projection is not available, so the layer's extent gets calculated (_processInitialExtent/_initTemplateVars) based on the map's current projection (OSMTILE) - which throws errors (can be seen in the BNG experiment).

I think the layer/extent needs to go disabled at that stage and not go through that code at that time, and the layer should only be loaded once the current projection is available with the use of 'projectionchange' events emitted by mapml-viewer, which the layer will be listening for.

This will be handled in #873.

@AliyanH AliyanH changed the title Update default CS and Projection Update default CS and Projection for layer Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants