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

Feature/add bbox url precision #2243

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

ketourneau
Copy link
Contributor

Description

When we try to use a custom WMS source (omniscale provider) we got some mistake if the coordinate in BBOX url is rounded.

Motivation and Context

We would like to set custom precision of BBOX passed in url to solve our problem.
In our case if bbox precision is 9 it's work.

sourceMap = new itowns.WMSSource({
    url: `https://maps.omniscale.net/v2/${omniscaleKey}/style.default/map`,
    name: "osm",
    format: "image/png",
    crs: "EPSG:2154",
    extent: extent,
    version: '1.1.0',
    bboxUrlPrecision: 9
});

Screenshots

bboxUrlPrecision: 2
Capture d’écran 2023-12-19 à 16 34 09

bboxUrlPrecision: 9
Capture d’écran 2023-12-19 à 16 33 44

@ketourneau ketourneau force-pushed the feature/add-bboxUrlPrecision branch from 9f5c654 to aa91f0f Compare December 19, 2023 15:44
@Desplandis Desplandis self-requested a review December 20, 2023 11:05
@Desplandis Desplandis self-assigned this Dec 20, 2023
Copy link
Contributor

@Desplandis Desplandis left a comment

Choose a reason for hiding this comment

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

Hi and thanks for your PR! =)
It seems that our defaults are overfitting on IGN datasets, we may have to change them later (don't hesitate to open an issue if the defaults are causing issues with other datasets).

@ketourneau
Copy link
Contributor Author

ketourneau commented Dec 22, 2023

For the time we don't have any overfitting with IGN ortho data, only with omniscale Open Street Map.
I applied your code review, thanks for the review.

@ketourneau ketourneau force-pushed the feature/add-bboxUrlPrecision branch from 532985b to e2cf4ab Compare December 22, 2023 14:06
ketourneau

This comment was marked as duplicate.

@Desplandis
Copy link
Contributor

Sounds good to me!
I saw the implementation of both mapbox and openlayers and they use numbers directly without truncating them, it may have been a fix for some IGN datasets, I will look into it!

@Desplandis Desplandis merged commit b118942 into iTowns:master Jan 10, 2024
7 checks passed
@ketourneau ketourneau deleted the feature/add-bboxUrlPrecision branch February 23, 2024 16:27
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