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

feat(cli): Update a preview url for zoom level changes. #2699

Merged
merged 5 commits into from
Feb 21, 2023

Conversation

Wentao-Kuang
Copy link
Contributor

No description provided.

@Wentao-Kuang Wentao-Kuang requested a review from a team as a code owner February 20, 2023 20:09
@@ -176,7 +176,7 @@ export class CommandImport extends CommandLineAction {
let msg = ' - Zoom level updated.';
if (layer.minZoom !== existing.minZoom) msg += ` min zoom ${existing.minZoom} -> ${layer.minZoom}`;
if (layer.maxZoom !== existing.maxZoom) msg += ` max zoom ${existing.maxZoom} -> ${layer.maxZoom}`;
change.push(`${msg}\n`);
change.push(`${msg} -- [Aerial]((${PublicUrlBase}?config=${this.config.value}&debug))\n`);
Copy link
Member

Choose a reason for hiding this comment

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

I think this url should be added to the next if statements? we are going to need both NZTM and Webmercator links?

What happens if the zoom changes and the layer id changes? going to get a bunch of links?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, we shouldn't end up with too many links. I have update this only have a default aerial preview link if only zoom level change and layer id not change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I add the links for both available projections now.

image

}
if (layer[3857] && layer[3857] !== existing[3857]) {
if (layer[3857]) {
const urls = await this.prepareUrl(layer[3857], mem, GoogleTms);
Copy link
Member

Choose a reason for hiding this comment

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

need brackets here.

@Wentao-Kuang Wentao-Kuang added this pull request to the merge queue Feb 21, 2023
Merged via the queue into master with commit 74ce320 Feb 21, 2023
@Wentao-Kuang Wentao-Kuang deleted the feat/zoom-level-url branch February 21, 2023 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants