mirror of
https://github.com/maputnik/editor.git
synced 2026-11-30 13:54:20 +00:00
Compare commits
170
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d9c3127fb | ||
|
|
0cef6166d1 | ||
|
|
f209ae024c | ||
|
|
cb5ebfecb0 | ||
|
|
be57c5523c | ||
|
|
89edc996dc | ||
|
|
3a82417592 | ||
|
|
74897c18e4 | ||
|
|
ee7ab4a32d | ||
|
|
af1962d16b | ||
|
|
404faedd0d | ||
|
|
fc8854a50a | ||
|
|
26aabaee74 | ||
|
|
418c853615 | ||
|
|
439d8f62a3 | ||
|
|
32cae0f957 | ||
|
|
2061f9e4b1 | ||
|
|
e00ff18623 | ||
|
|
2aef030f21 | ||
|
|
ff50972c0d | ||
|
|
daa992f6f9 | ||
|
|
810a926916 | ||
|
|
8c87f027fb | ||
|
|
f8ee3d61a5 | ||
|
|
dd56da30c1 | ||
|
|
2d057544ba | ||
|
|
cd2497332d | ||
|
|
27dfe9026b | ||
|
|
087d35d0e0 | ||
|
|
4b705df0f0 | ||
|
|
f971a00d0b | ||
|
|
2b5f5da7be | ||
|
|
75a046e3d0 | ||
|
|
ac8a3ee050 | ||
|
|
8e1a419909 | ||
|
|
2c71412e49 | ||
|
|
bc7f27d15a | ||
|
|
b3812fa927 | ||
|
|
b6f569ad96 | ||
|
|
9ebd6d84d9 | ||
|
|
6010c6810a | ||
|
|
7943252400 | ||
|
|
72b9e624a7 | ||
|
|
4c847faaae | ||
|
|
7089ca1b5c | ||
|
|
2cd6019cb2 | ||
|
|
775b5f4a39 | ||
|
|
93baf3d5e2 | ||
|
|
74f44a49af | ||
|
|
6310d6f11e | ||
|
|
8153050d38 | ||
|
|
917da6bc7d | ||
|
|
5f0ea7be24 | ||
|
|
8db5842e85 | ||
|
|
5a8effb363 | ||
|
|
236058e95b | ||
|
|
2da67c7963 | ||
|
|
f67704c545 | ||
|
|
83b96e8f80 | ||
|
|
59cf0fc47c | ||
|
|
bc8f9fd685 | ||
|
|
542e7777d8 | ||
|
|
12c5dd912b | ||
|
|
95dbed3f69 | ||
|
|
3acf7ccf5b | ||
|
|
6c4758c89c | ||
|
|
9bfea8f868 | ||
|
|
2d2a4739f1 | ||
|
|
fd218db356 | ||
|
|
bc2b08ed92 | ||
|
|
9af15e5359 | ||
|
|
669781ccca | ||
|
|
18da95d2a6 | ||
|
|
b47d105e1f | ||
|
|
5f9c21cf2b | ||
|
|
956d24c524 | ||
|
|
4e02c6e12d | ||
|
|
e9966e5a20 | ||
|
|
3deb491306 | ||
|
|
34572dc3f0 | ||
|
|
6bf79c2121 | ||
|
|
a925995f89 | ||
|
|
c674575fbc | ||
|
|
b030a2a707 | ||
|
|
74aa3b48db | ||
|
|
a399df0adc | ||
|
|
1282062b32 | ||
|
|
bb243db63c | ||
|
|
45c1281490 | ||
|
|
40e452d547 | ||
|
|
2e62b1802a | ||
|
|
ea4c3f4e3e | ||
|
|
19c538a29e | ||
|
|
d379d462f2 | ||
|
|
8eb9fe062f | ||
|
|
9ca274805c | ||
|
|
fc507c7e79 | ||
|
|
66453a46ca | ||
|
|
96b0c53fd2 | ||
|
|
663034b749 | ||
|
|
c82696d268 | ||
|
|
7d987cf68b | ||
|
|
075437555a | ||
|
|
654dc9c31b | ||
|
|
2c8bc5aa04 | ||
|
|
07bee66764 | ||
|
|
f675c7ff7b | ||
|
|
ad85fd8f12 | ||
|
|
634d664e46 | ||
|
|
0046122c87 | ||
|
|
c0f798a6f6 | ||
|
|
47941e3738 | ||
|
|
237457a159 | ||
|
|
d9dad5614e | ||
|
|
f18a594131 | ||
|
|
fde3d8fc18 | ||
|
|
a493d6df52 | ||
|
|
7e8eca6f97 | ||
|
|
c3764b65d9 | ||
|
|
56e151329d | ||
|
|
28d6589928 | ||
|
|
7adf516383 | ||
|
|
9a1385823e | ||
|
|
2fc5ab4509 | ||
|
|
3108b88e59 | ||
|
|
b910e4fdb6 | ||
|
|
907c09a927 | ||
|
|
16fb99d9b1 | ||
|
|
a364176a3e | ||
|
|
48164f5a9d | ||
|
|
046b1b3bb2 | ||
|
|
f33e09df62 | ||
|
|
7333eb6378 | ||
|
|
ffdc04b3aa | ||
|
|
223809dda5 | ||
|
|
744ad0f917 | ||
|
|
2f324c695b | ||
|
|
dd4cbb1b3d | ||
|
|
e61aa393c6 | ||
|
|
e9c24d5ac9 | ||
|
|
a7ed7cdb45 | ||
|
|
dea98ad7b6 | ||
|
|
987c3cd31e | ||
|
|
6d970fe73f | ||
|
|
9cfd0ced73 | ||
|
|
1464a337e3 | ||
|
|
1eaba084ed | ||
|
|
37ba7457d5 | ||
|
|
43a7c058fd | ||
|
|
87c7c7ff93 | ||
|
|
8c8241b13b | ||
|
|
c187f02c27 | ||
|
|
617adcdc48 | ||
|
|
e71c49e38c | ||
|
|
9572eefd48 | ||
|
|
3303a25737 | ||
|
|
49f91a69f1 | ||
|
|
c853c754b1 | ||
|
|
1b5596052c | ||
|
|
1c1b5cd208 | ||
|
|
c948814efc | ||
|
|
7b9d3512c6 | ||
|
|
edf3a58ea6 | ||
|
|
5a4b5fb9e9 | ||
|
|
6f9f53add6 | ||
|
|
e0199c9ce7 | ||
|
|
e1ed42f16f | ||
|
|
104c3c0c10 | ||
|
|
f4a1aa4729 | ||
|
|
fda7fac260 |
No files matched your search
@@ -1,45 +0,0 @@
|
||||
.git
|
||||
.gitignore
|
||||
Dockerfile
|
||||
|
||||
#
|
||||
#
|
||||
# COPIED FROM .gitignore , please keep it in sync
|
||||
#
|
||||
#
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directory
|
||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
||||
node_modules
|
||||
|
||||
# Ignore build files
|
||||
public
|
||||
/errorShots
|
||||
/old
|
||||
/build
|
||||
@@ -1,14 +0,0 @@
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
# Matches multiple files with brace expansion notation
|
||||
# Set default charset
|
||||
[*.{js,jsx,html,sass}]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
trim_trailing_whitespace = true
|
||||
@@ -1,2 +0,0 @@
|
||||
github: [maplibre]
|
||||
open_collective: maplibre
|
||||
@@ -1,27 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve Maputnik
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Thanks for your feedback! Please complete the following information: -->
|
||||
|
||||
**Maputnik version**:<!-- e.g v1.7.0, main -->
|
||||
**Browser**:
|
||||
**OS**:<!-- (Windows, macOS, Linux) -->
|
||||
|
||||
**Description of the bug**:
|
||||
|
||||
**Steps to reproduce the behavior**:
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
**Style file or style URL**:
|
||||
<!-- If applicable, attach a style file (zip) or provide a style URL. -->
|
||||
|
||||
**Screenshots**:
|
||||
<!-- If applicable, add screenshots to help explain your problem. -->
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
name: Other issue
|
||||
about: Feature request or other issue which is no bug report
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!-- Thanks for reaching out! If you are having general Maputnik mapping questions, please asking them at https://gis.stackexchange.com/ using the 'maputnik' tag https://gis.stackexchange.com/questions/tagged/maputnik and read https://gis.stackexchange.com/help/how-to-ask before you do so (please keep in mind that you're asking there in a general GIS forum, not a dedicated support channel) -->
|
||||
@@ -1,10 +0,0 @@
|
||||
## Launch Checklist
|
||||
|
||||
<!-- Thanks for the PR! Feel free to add or remove items from the checklist. -->
|
||||
|
||||
|
||||
- [ ] Briefly describe the changes in this PR.
|
||||
- [ ] Link to related issues.
|
||||
- [ ] Include before/after visuals or gifs if this PR includes visual changes.
|
||||
- [ ] Write tests for all new functionality.
|
||||
- [ ] Add an entry to `CHANGELOG.md` under the `## main` section.
|
||||
@@ -1,43 +0,0 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "npm" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
open-pull-requests-limit: 20
|
||||
versioning-strategy: increase
|
||||
groups:
|
||||
vitest:
|
||||
patterns:
|
||||
- "*vitest*"
|
||||
react:
|
||||
patterns:
|
||||
- "*react*"
|
||||
cooldown:
|
||||
default-days: 5
|
||||
semver-major-days: 5
|
||||
semver-minor-days: 3
|
||||
semver-patch-days: 3
|
||||
include:
|
||||
- "*"
|
||||
exclude:
|
||||
- "@maplibre/*"
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
groups:
|
||||
codeql-action:
|
||||
patterns:
|
||||
- "github/codeql-action*"
|
||||
cooldown:
|
||||
default-days: 3
|
||||
# no semver support for github-actions
|
||||
# => no specific configuration for this
|
||||
include:
|
||||
- "*"
|
||||
@@ -1,26 +0,0 @@
|
||||
name: Automerge Dependabot
|
||||
|
||||
on: pull_request
|
||||
|
||||
permissions: write-all
|
||||
|
||||
jobs:
|
||||
dependabot:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
|
||||
steps:
|
||||
- name: Dependabot metadata
|
||||
id: metadata
|
||||
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
|
||||
with:
|
||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
- name: Approve Dependabot PRs
|
||||
run: gh pr review --approve "$PR_URL"
|
||||
env:
|
||||
PR_URL: ${{github.event.pull_request.html_url}}
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
- name: Enable auto-merge for Dependabot PRs
|
||||
run: gh pr merge --auto --squash "$PR_URL"
|
||||
env:
|
||||
PR_URL: ${{github.event.pull_request.html_url}}
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
@@ -1,169 +0,0 @@
|
||||
name: ci
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
|
||||
build-node:
|
||||
name: "build on ${{ matrix.os }}"
|
||||
runs-on: ${{ matrix.os }}
|
||||
permissions:
|
||||
contents: read
|
||||
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with: { persist-credentials: false }
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- run: npm run lint
|
||||
- run: npm run lint-css
|
||||
|
||||
|
||||
|
||||
build-artifacts:
|
||||
name: "build artifacts"
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with: { persist-credentials: false }
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- name: artifacts/maputnik
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: maputnik
|
||||
path: dist
|
||||
|
||||
# Build and upload desktop CLI artifacts
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
||||
with:
|
||||
go-version: ^1.23.x
|
||||
cache-dependency-path: desktop/go.sum
|
||||
id: go
|
||||
|
||||
- name: Build desktop artifacts
|
||||
run: npm run build-desktop
|
||||
|
||||
- name: Artifacts/linux
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: maputnik-linux
|
||||
path: ./desktop/bin/linux/
|
||||
|
||||
- name: Artifacts/darwin
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: maputnik-darwin
|
||||
path: ./desktop/bin/darwin/
|
||||
|
||||
- name: Artifacts/windows
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: maputnik-windows
|
||||
path: ./desktop/bin/windows/
|
||||
|
||||
unit-tests:
|
||||
name: "Unit tests"
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with: { persist-credentials: false }
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- run: npm ci
|
||||
- run: npm run test-unit-ci
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
|
||||
with:
|
||||
files: ${{ github.workspace }}/coverage/coverage-final.json
|
||||
verbose: true
|
||||
|
||||
e2e-tests:
|
||||
name: "E2E tests using chrome"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with: { persist-credentials: false }
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- run: npm ci
|
||||
- run: npx playwright install --with-deps chromium
|
||||
- name: Playwright run
|
||||
run: npm run test-e2e
|
||||
- name: Upload coverage reports to Codecov
|
||||
uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1
|
||||
with:
|
||||
files: ${{ github.workspace }}/coverage/coverage-final.json
|
||||
verbose: true
|
||||
- name: Upload Playwright report
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: playwright-report
|
||||
path: playwright-report/
|
||||
retention-days: 7
|
||||
|
||||
e2e-tests-docker:
|
||||
name: "E2E tests using chrome and docker"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with: { persist-credentials: false }
|
||||
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- run: npm ci
|
||||
- run: npx playwright install --with-deps chromium
|
||||
- name: Build docker image
|
||||
run: docker build -t maputnik .
|
||||
- name: Start maputnik container
|
||||
run: docker run -d --network host --name maputnik maputnik --port=8888
|
||||
- name: Wait for maputnik to be ready
|
||||
run: |
|
||||
for i in $(seq 1 60); do
|
||||
if curl -sSf http://localhost:8888/ > /dev/null; then
|
||||
echo "maputnik is up"; exit 0
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
echo "maputnik did not start in time"; docker logs maputnik; exit 1
|
||||
- name: Playwright run
|
||||
run: npm run test-e2e
|
||||
env:
|
||||
E2E_NO_WEBSERVER: "1"
|
||||
@@ -1,74 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
#
|
||||
# ******** NOTE ********
|
||||
# We have attempted to detect the languages in your repository. Please check
|
||||
# the `language` matrix defined below to confirm you have the correct set of
|
||||
# supported CodeQL languages.
|
||||
#
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [ main ]
|
||||
schedule:
|
||||
- cron: '17 0 * * 6'
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: [ 'javascript' ]
|
||||
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
|
||||
# Learn more about CodeQL language support at https://git.io/codeql-language-support
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@1bd86f2fdb4b86187fa4059f16f31a3202acc9ea # v4.39.4
|
||||
@@ -1,39 +0,0 @@
|
||||
name: Create bump version PR
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: Version to change to.
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
bump-version-pr:
|
||||
name: Bump version PR
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: main
|
||||
|
||||
- name: Use Node.js from nvmrc
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- name: Bump version
|
||||
run: |
|
||||
npm version --commit-hooks false --git-tag-version false ${{ inputs.version }}
|
||||
./build/bump-version-changelog.js ${{ inputs.version }}
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8.1.3
|
||||
with:
|
||||
commit-message: Bump version to ${{ inputs.version }}
|
||||
branch: bump-version-to-${{ inputs.version }}
|
||||
title: Bump version to ${{ inputs.version }}
|
||||
@@ -1,55 +0,0 @@
|
||||
name: deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
deploy-pages:
|
||||
name: deploy/pages
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with: { persist-credentials: false }
|
||||
|
||||
- name: Use Node.js from nvmrc
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Install
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Upload to GitHub Pages
|
||||
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: dist
|
||||
|
||||
# publish docker to GitHub registry
|
||||
deploy-docker:
|
||||
name: deploy/docker
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event_name == 'push' }}
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
||||
steps:
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@8aa5831fb8d48d8f76594c7ddde61ae58019f550 # v4.8.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- run: docker build -t ghcr.io/maplibre/maputnik:main .
|
||||
- run: docker push ghcr.io/maplibre/maputnik:main
|
||||
@@ -1,104 +0,0 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release-check:
|
||||
name: Check if version changed
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: main
|
||||
persist-credentials: false
|
||||
|
||||
- name: Use Node.js from nvmrc
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
|
||||
- name: Check if version has been updated
|
||||
id: check
|
||||
uses: EndBug/version-check@095362f3cd50f690c8fa0e6afeea81834bd8d320 # latest
|
||||
|
||||
outputs:
|
||||
publish: ${{ steps.check.outputs.changed }}
|
||||
|
||||
release:
|
||||
name: Release
|
||||
needs: release-check
|
||||
if: ${{ needs.release-check.outputs.publish == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 0
|
||||
ref: main
|
||||
|
||||
- name: Use Node.js from nvmrc
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
node-version-file: ".nvmrc"
|
||||
registry-url: "https://registry.npmjs.org"
|
||||
|
||||
- name: Set up Go for desktop build
|
||||
uses: actions/setup-go@d8cbb8045d7f43706b9177cceb36c1f91a6644d5 # v7.1.0
|
||||
with:
|
||||
go-version: ^1.23.x
|
||||
cache-dependency-path: desktop/go.sum
|
||||
id: go
|
||||
|
||||
- name: Get version
|
||||
id: package-version
|
||||
uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1
|
||||
|
||||
- name: Install
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
npm run build-desktop
|
||||
|
||||
- name: Tag commit and push
|
||||
id: tag_version
|
||||
uses: mathieudutour/github-tag-action@af99e60ce8132224b8e6ebab5023449fe256ed46 # v7.0.0
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
custom_tag: ${{ steps.package-version.outputs.current-version }}
|
||||
|
||||
- name: Create Archives
|
||||
run: |
|
||||
zip -r "desktop-${{ steps.package-version.outputs.current-version }}" desktop/bin/
|
||||
|
||||
- name: Build Release Notes
|
||||
id: release_notes
|
||||
run: |
|
||||
RELEASE_NOTES_PATH="${PWD}/release_notes.txt"
|
||||
./build/release-notes.js > ${RELEASE_NOTES_PATH}
|
||||
echo "release_notes=${RELEASE_NOTES_PATH}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create GitHub Release
|
||||
id: create_regular_release
|
||||
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag: ${{ steps.tag_version.outputs.new_tag }}
|
||||
name: ${{ steps.tag_version.outputs.new_tag }}
|
||||
bodyFile: ${{ steps.release_notes.outputs.release_notes }}
|
||||
artifacts: "desktop-${{ steps.package-version.outputs.current-version }}.zip"
|
||||
allowUpdates: true
|
||||
draft: false
|
||||
prerelease: false
|
||||
-50
@@ -1,50 +0,0 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directory
|
||||
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
|
||||
node_modules
|
||||
|
||||
# Ignore build files
|
||||
public
|
||||
/errorShots
|
||||
/old
|
||||
/dist/
|
||||
/desktop/version.go
|
||||
|
||||
# Playwright
|
||||
/test-results/
|
||||
/playwright-report/
|
||||
/playwright/.cache/
|
||||
|
||||
# IDE
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
# Window metadata files
|
||||
/desktop/winres/winres.json
|
||||
/desktop/*.syso
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"all": true,
|
||||
"extends": "@istanbuljs/nyc-config-typescript",
|
||||
"check-coverage": false,
|
||||
"include": ["src/**/*.ts", "src/**/*.tsx"],
|
||||
"exclude": [
|
||||
"e2e/**/*.*",
|
||||
"**/*.d.ts",
|
||||
"**/*.test.ts",
|
||||
"**/*.test.tsx",
|
||||
"**/*.browser.test.tsx",
|
||||
"./coverage/**",
|
||||
"./e2e/**",
|
||||
"./dist/**",
|
||||
"node_modules"
|
||||
],
|
||||
"report-dir": "coverage",
|
||||
"reporter": ["json", "lcov", "json-summary"]
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
|
||||
ci:
|
||||
autoupdate_schedule: monthly
|
||||
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v6.0.0
|
||||
hooks:
|
||||
- id: check-added-large-files
|
||||
- id: check-executables-have-shebangs
|
||||
- id: check-json
|
||||
exclude: 'tsconfig(\.node)?\.json'
|
||||
- id: check-shebang-scripts-are-executable
|
||||
- id: check-symlinks
|
||||
- id: check-toml
|
||||
- id: check-yaml
|
||||
args: [ --allow-multiple-documents ]
|
||||
- id: destroyed-symlinks
|
||||
- id: end-of-file-fixer
|
||||
- id: mixed-line-ending
|
||||
args: [ --fix=lf ]
|
||||
- id: trailing-whitespace
|
||||
@@ -1,15 +0,0 @@
|
||||
{
|
||||
"labels": {
|
||||
"bug": 5,
|
||||
"maintenance": 3,
|
||||
"mentioned in the 1st survey": 2
|
||||
},
|
||||
"reactions": {
|
||||
"+1": 2,
|
||||
"-1": -1,
|
||||
"laugh": 1,
|
||||
"hooray": 2,
|
||||
"confused": 1,
|
||||
"heart": 2
|
||||
}
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
Maputnik is a MapLibre style editor written using React and TypeScript.
|
||||
|
||||
To get started, install all npm packages:
|
||||
|
||||
```
|
||||
npm install
|
||||
```
|
||||
|
||||
Verify code correctness by running ESLint:
|
||||
|
||||
```
|
||||
npm run lint
|
||||
```
|
||||
|
||||
Or try fixing lint issues with:
|
||||
|
||||
```
|
||||
npm run lint -- --fix
|
||||
```
|
||||
|
||||
The project type checked and built with:
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
Install the Playwright browser (first time only):
|
||||
|
||||
```
|
||||
npx playwright install --with-deps chromium
|
||||
```
|
||||
|
||||
Then run the end-to-end tests (Playwright starts the dev server automatically):
|
||||
|
||||
```
|
||||
npm run test
|
||||
```
|
||||
|
||||
Run the unit tests with Vitest:
|
||||
|
||||
```
|
||||
npm run test-unit
|
||||
```
|
||||
|
||||
## Pull Requests
|
||||
|
||||
- Pull requests should update `CHANGELOG.md` with a short description of the change.
|
||||
|
||||
## Testing
|
||||
|
||||
### Prefer end-to-end tests
|
||||
|
||||
Most of this codebase is React components, and they are only reachable from an
|
||||
end-to-end test. E2E coverage is the primary signal.
|
||||
|
||||
Reach for a unit test only for pure logic that e2e cannot cheaply reach (parsers,
|
||||
sorting, watchers, stores). Before writing one, check whether e2e already covers
|
||||
the file — a unit test that duplicates existing e2e coverage adds test code and
|
||||
almost no coverage:
|
||||
|
||||
```
|
||||
npx nyc report --reporter=text --include="src/libs/style.ts"
|
||||
```
|
||||
|
||||
Do **not** merge the Vitest (v8) and e2e (istanbul) coverage reports locally. They
|
||||
produce conflicting statement maps for the same files and the combined percentage
|
||||
is meaningless. Codecov merges the two uploads server-side; that is the number to
|
||||
trust. Locally, read them separately:
|
||||
|
||||
- e2e: `npx playwright test` then `npx nyc report --reporter=text-summary` (reads `.nyc_output/`)
|
||||
- unit: `npx vitest run --coverage` (writes `coverage/`)
|
||||
|
||||
### E2E layering
|
||||
|
||||
Three layers, and the boundaries matter:
|
||||
|
||||
- `e2e/playwright-helper.ts` — generic, app-agnostic browser actions. **The only
|
||||
file allowed to import `@playwright/test`** (besides `e2e/utils/fixtures.ts`).
|
||||
- `e2e/maputnik-driver.ts` — domain actions (layers, filters, functions, the
|
||||
style). Knows nothing about `page` or Playwright.
|
||||
- `e2e/modal-driver.ts` — actions scoped to a modal, exposed as `when.modal.*`.
|
||||
|
||||
Specs get a driver at describe scope and assert fluently:
|
||||
|
||||
```ts
|
||||
describe("layer editor", () => {
|
||||
const { given, get, when, then } = new MaputnikDriver();
|
||||
...
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ layers: [{ id, type: "fill" }] });
|
||||
});
|
||||
```
|
||||
|
||||
New UI interactions belong in a driver, not inline in a spec.
|
||||
|
||||
### Writing assertions
|
||||
|
||||
- `shouldDeepNestedInclude` is a recursive partial match (`toMatchObject`): nested
|
||||
objects are matched as subsets, arrays and primitives must match exactly
|
||||
(including array length).
|
||||
- Assert against the whole style, not an extracted slice. Avoid
|
||||
`get.styleFromLocalStorage().then(style => style.layers.find(...))` — it moves
|
||||
test logic into the test. Compare the real object instead.
|
||||
- `Query.then()` is lazy and returns a new `Query`, **not** a Promise. `await
|
||||
get.styleFromLocalStorage()` hangs forever. Use `.get()` to await it directly,
|
||||
or pass the Query to `then(...)`.
|
||||
|
||||
### One behaviour per test
|
||||
|
||||
If a test needs comments narrating "and now this…", it is several tests. Split it,
|
||||
and hoist the shared setup into a nested `describe` + `beforeEach`.
|
||||
|
||||
### Test ids
|
||||
|
||||
Test ids use the `data-wd-key` attribute and are read via `get.elementByTestId`.
|
||||
|
||||
The `Input*` components already accept `data-wd-key` and render it on the real
|
||||
`<input>`; the `Field*` wrappers forward it through their `{...props}` spread. So
|
||||
passing `data-wd-key` to a `Field*` component is usually enough. Do **not** also
|
||||
add it to `Block`/`Fieldset` — the id then matches two elements and locators fail
|
||||
in strict mode.
|
||||
|
||||
Note `InputNumber` renders `<key>-text` and `<key>-range` when `allowRange` is set,
|
||||
and `<key>` otherwise.
|
||||
|
||||
### Input commit semantics (common source of "the value didn't save")
|
||||
|
||||
- `InputString` only fires its `onChange` on **blur** or **Enter**. Typing alone
|
||||
fires `onInput`. A driver that calls `fill()` must then call `blur()`, or the
|
||||
value never reaches the style.
|
||||
- `InputNumber` commits on every change; no blur needed.
|
||||
- The autocomplete inputs (layer source, add-layer source) are controlled
|
||||
downshift comboboxes. Keystroke typing is dropped/reordered — `{selectall}` then
|
||||
typing `raster` yields `"exampleaster"`. Use `fill()`, which dispatches a single
|
||||
input event, then pick from the filtered menu.
|
||||
- CodeMirror auto-closes brackets and quotes, and types over its own closers, so
|
||||
inserting a well-formed JSON fragment stays well-formed. To break JSON on
|
||||
purpose, insert a bare word.
|
||||
|
||||
### Fixtures
|
||||
|
||||
Style fixtures live in `e2e/fixtures/`. A new one must be registered in two places
|
||||
in `maputnik-driver.ts`: the list in `given.setupMockBackedResponses` and the
|
||||
`styleFileByKey` map in `when.setStyle`.
|
||||
|
||||
### Verify a new test can fail
|
||||
|
||||
A test that passes for the wrong reason is worse than no test. After writing one,
|
||||
mutate the expected value and confirm it fails. This has caught real mistakes
|
||||
(e.g. a driver that never committed its input, so the assertion was matching a
|
||||
value written by the *previous* step).
|
||||
-103
@@ -1,103 +0,0 @@
|
||||
## main
|
||||
|
||||
### ✨ Features and improvements
|
||||
- Preview sprites in all sprite-backed dropdowns, including icon-image and pattern properties, with searchable names and keyboard selection
|
||||
- Replace Cypress with Playwright for end-to-end tests and Vitest browser mode (Playwright provider) for component tests; drop the `@shellygo/cypress-test-utils` helper in favour of a `MaputnikDriver` page object
|
||||
- Upgrade to MapLibre GL JS 6 and Vite 8, and update the remaining dependencies
|
||||
- Remove the RTL text plugin, since MapLibre GL JS now renders right-to-left text natively
|
||||
- Exported HTML now loads MapLibre GL JS as an ES module, since v6 no longer ships a UMD bundle
|
||||
- Add `font-faces`, `sky`, `roll` and `centerAltitude` to the style settings modal
|
||||
- The sidebar can now be resized, both as a whole and in the split between the layer list and the layer editor
|
||||
- Allow viewing and changing the map's max zoom in the debug modal
|
||||
- _...Add new stuff here..._
|
||||
|
||||
### 🐞 Bug fixes
|
||||
- Make small sprites easier to recognize in the sprite picker with fixed-size previews and high-resolution sprite assets
|
||||
- Prevent a crash when converting a function to an expression
|
||||
- Prevent a crash when deleting either stop from a function with two stops
|
||||
- Preserve expanded layer groups when deleting layers, including the first layer of a group
|
||||
- The map's data listener now fires on tile loads again, so source and vector layer field autocompletion is populated
|
||||
- The `maputnik` desktop binary now opens the default browser automatically on startup (opt out with `--no-browser`)
|
||||
- Keyboard shortcuts now keep working while the map has focus, instead of going dead until the map is blurred
|
||||
- The map no longer stays blank on load until it is moved, when the style loads before the map is ready
|
||||
- The debug modal now shows the MapLibre options for any renderer other than OpenLayers (e.g. `mbgljs`)
|
||||
- Checkboxes for properties that default to `true` (e.g. `fill-antialias`, `text-keep-upright`) are now shown checked when the property is unset
|
||||
- Global state values are now saved as JSON (numbers, booleans, arrays, objects) instead of always as strings
|
||||
- _...Add new stuff here..._
|
||||
|
||||
## 3.1.0
|
||||
|
||||
### ✨ Features and improvements
|
||||
- Added translation to "Links" in debug modal
|
||||
- Add support for hillshade's color arrays and relief-color elevation expression
|
||||
- Change layers icons to make them a bit more distinct
|
||||
- Remove `@mdi` packages in favor of `react-icons`
|
||||
- Add ability to control the projection of the map - either globe or mercator
|
||||
- Add markdown support for doc related to the style-spec fields
|
||||
- Added global state modal to allow editing the global state
|
||||
- Added color highlight for problematic properties
|
||||
- Upgraded codemirror from version 5 to version 6
|
||||
- Add code editor to allow editing the entire style
|
||||
- Add support for sprite object in setting modal
|
||||
- Set the correct map view when opening a new style on an empty map
|
||||
- Allow root-relative urls in the stylefile
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Improved the local style open modal and local file upload.
|
||||
- Fixed the Expression editor (for long expressions) being able to be float under other components further down
|
||||
- Fixed an issue when clicking on a popup and then clicking on the map again
|
||||
- Fix modal close button position
|
||||
- Fixed an issue with the generation of translations
|
||||
- Fix missing spec info when clicking next to a property
|
||||
- Fix Firefox open file that stopped working due to react upgrade
|
||||
- Fix issue with missing bottom error panel
|
||||
- Fixed headers in left panes (Layers list and Layer editor) to remain visible when scrolling
|
||||
- Fix error when using a source from localhost
|
||||
- Fix an issue with scrolling when using the code editor
|
||||
|
||||
## 3.0.0
|
||||
|
||||
### ✨ Features and improvements
|
||||
- Fix radio/delete filter buttons styling regression
|
||||
- Add german translation
|
||||
- Use same version number for web and desktop versions
|
||||
- Add scheme type options for vector/raster tile
|
||||
- Add `tileSize` field for raster and raster-dem tile sources
|
||||
- Update Protomaps Light gallery style to v4
|
||||
- Add support to edit local files on the file system if supported by the browser
|
||||
- Upgrade to MapLibre LG JS v5
|
||||
- Upgrade Vite 6 and Cypress 14 ([#970](https://github.com/maplibre/maputnik/pull/970))
|
||||
- Upgrade OpenLayers from v6 to v10
|
||||
- When loading a style into localStorage that causes a QuotaExceededError, purge localStorage and retry
|
||||
- Remove react-autobind dependency
|
||||
- Remove usage of legacy `childContextTypes` API
|
||||
- Refactor Field components to use arrow function syntax
|
||||
- Replace react-autocomplete with Downshift in the autocomplete component
|
||||
- Add LocationIQ as supported map provider with access token field and gallery style
|
||||
- Use maputnik go binary for the docker image to allow file watching
|
||||
- Revmove support for `debug` and `localport` url parameters
|
||||
- Replace react-sortable-hoc with dnd-kit to avoid react console warnings and also use a maintained library
|
||||
|
||||
### 🐞 Bug fixes
|
||||
|
||||
- Fix incorrect handing of network error response (#944)
|
||||
- Show an error when adding a layer with a duplicate ID
|
||||
- Replace deprecated `ReactDOM.render` usage with `createRoot` and drop the
|
||||
`DOMNodeRemoved` cleanup hack
|
||||
|
||||
## 2.1.1
|
||||
|
||||
### ✨ Features and improvements
|
||||
|
||||
- Add GitHub workflows for releasing new versions
|
||||
- Update desktop build to pull from this repo (#922)
|
||||
|
||||
## 2.0.0
|
||||
|
||||
- Update MapLibre to version 4 (#872)
|
||||
- Start continuous deployment of maputnik website
|
||||
|
||||
## 1.7.0
|
||||
|
||||
- See release notes at https://maputnik.github.io/blog/2020/04/23/release-v1.7.0
|
||||
@@ -1,2 +0,0 @@
|
||||
# Contributor Covenant
|
||||
[](https://github.com/maplibre/maplibre/blob/main/CODE_OF_CONDUCT.md)
|
||||
-14
@@ -1,14 +0,0 @@
|
||||
FROM golang:1.23-alpine AS builder
|
||||
WORKDIR /maputnik
|
||||
|
||||
RUN apk add --no-cache nodejs npm make git gcc g++ libc-dev
|
||||
|
||||
# Build maputnik
|
||||
COPY . .
|
||||
RUN npm ci
|
||||
RUN CGO_ENABLED=1 GOOS=linux npm run build-linux
|
||||
|
||||
FROM alpine:latest
|
||||
WORKDIR /app
|
||||
COPY --from=builder /maputnik/desktop/bin/linux ./
|
||||
ENTRYPOINT ["/app/maputnik"]
|
||||
@@ -1,22 +0,0 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Lukas Martinelli
|
||||
Copyright (c) 2024 MapLibre contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,142 +0,0 @@
|
||||
<img width="200" alt="Maputnik logo" src="https://cdn.jsdelivr.net/gh/maputnik/design/logos/logo-color.png" />
|
||||
|
||||
# Maputnik
|
||||
[][github-action-ci]
|
||||
[][license]
|
||||
|
||||
[github-action-ci]: https://github.com/maplibre/maputnik/actions?query=workflow%3Aci
|
||||
[license]: https://tldrlegal.com/license/mit-license
|
||||
|
||||
A free and open visual editor for the [MapLibre GL styles](https://maplibre.org/maplibre-style-spec/)
|
||||
targeted at developers and map designers.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
- :link: Design your maps online at **<https://www.maplibre.org/maputnik/>** (all in local storage)
|
||||
- :link: Use the [Maputnik CLI](https://github.com/maplibre/maputnik/wiki/Maputnik-CLI) for local style development
|
||||
- In a Docker, run this command and browse to http://localhost:8888, Ctrl+C to stop the server.
|
||||
|
||||
```bash
|
||||
docker run -it --rm -p 8888:8000 ghcr.io/maplibre/maputnik:main
|
||||
```
|
||||
|
||||
To see the CLI options (for example file watching or style serving) run:
|
||||
```bash
|
||||
docker run -it --rm -p 8888:8000 ghcr.io/maplibre/maputnik:main --help
|
||||
```
|
||||
You might need to mount a volume (`-v`) to be able to use these options.
|
||||
|
||||
## Documentation
|
||||
|
||||
The documentation can be found in the [Wiki](https://github.com/maplibre/maputnik/wiki). You are welcome to collaborate!
|
||||
|
||||
- :link: **Study the [Maputnik Wiki](https://github.com/maplibre/maputnik/wiki)**
|
||||
- :video_camera: Design a map from Scratch https://youtu.be/XoDh0gEnBQo
|
||||
|
||||
[](https://youtu.be/XoDh0gEnBQo)
|
||||
|
||||
## Develop
|
||||
|
||||
Maputnik is written in typescript and is using [React](https://github.com/facebook/react) and [MapLibre GL JS](https://maplibre.org/projects/maplibre-gl-js/).
|
||||
|
||||
We ensure building and developing Maputnik works with the [current active LTS Node.js version and above](https://github.com/nodejs/Release#release-schedule).
|
||||
|
||||
Check out our [Internationalization guide](./src/locales/README.md) for UI text related changes.
|
||||
|
||||
### Getting Involved
|
||||
Join the #maplibre or #maputnik slack channel at OSMUS: get an invite at https://slack.openstreetmap.us/ Read the the below guide in order to get familiar with how we do things around here.
|
||||
|
||||
Install the deps, start the dev server and open the web browser on `http://localhost:8888/`.
|
||||
|
||||
```bash
|
||||
# install dependencies
|
||||
npm install
|
||||
# start dev server
|
||||
npm run start
|
||||
```
|
||||
|
||||
If you want Maputnik to be accessible externally use the [`--host` option](https://vitejs.dev/config/server-options.html#server-host):
|
||||
|
||||
```bash
|
||||
# start externally accessible dev server
|
||||
npm run start -- --host 0.0.0.0
|
||||
```
|
||||
|
||||
The build process will watch for changes to the filesystem, rebuild and autoreload the editor.
|
||||
|
||||
```
|
||||
npm run build
|
||||
```
|
||||
|
||||
Lint the JavaScript code.
|
||||
|
||||
```
|
||||
# run linter
|
||||
npm run lint
|
||||
npm run lint-css
|
||||
npm run sort-styles
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
### End-to-end tests
|
||||
|
||||
For E2E testing we use [Playwright](https://playwright.dev/). The tests live in the [`e2e`](/e2e) directory and drive the app through the `MaputnikDriver` page object.
|
||||
|
||||
The first time you run the tests, install the browser:
|
||||
|
||||
```
|
||||
npx playwright install chromium
|
||||
```
|
||||
|
||||
Playwright automatically starts the dev server (`npm run start`) for you, so you can just run:
|
||||
|
||||
```
|
||||
npm run test
|
||||
```
|
||||
|
||||
Some useful options:
|
||||
|
||||
```
|
||||
# see the tests run in a headed browser
|
||||
npm run test -- --headed
|
||||
|
||||
# run a single spec / filter by title
|
||||
npm run test -- e2e/map.spec.ts
|
||||
npm run test -- -g "zoom level"
|
||||
|
||||
# open the interactive UI mode
|
||||
npx playwright test --ui
|
||||
```
|
||||
|
||||
Running the E2E tests also produces a code-coverage report in `coverage/` (collected via istanbul instrumentation of the dev server).
|
||||
|
||||
### Unit & component tests
|
||||
|
||||
Unit tests and component tests run with [Vitest](https://vitest.dev/); component tests (`*.browser.test.tsx`) use Vitest's browser mode with the Playwright provider.
|
||||
|
||||
```
|
||||
npm run test-unit
|
||||
```
|
||||
|
||||
## Release process
|
||||
|
||||
1. Review [`CHANGELOG.md`](/CHANGELOG.md)
|
||||
- Double-check that all changes included in the release are appropriately documented.
|
||||
- To-be-released changes should be under the "main" header.
|
||||
- Commit any final changes to the changelog.
|
||||
2. Run [Create bump version PR](https://github.com/maplibre/maputnik/actions/workflows/create-bump-version-pr.yml) by manual workflow dispatch and set the version number in the input. This will create a PR that changes the changelog and `package.json` file to review and merge.
|
||||
3. Once merged, an automatic process will kick in and creates a GitHub release and uploads release assets.
|
||||
|
||||
|
||||
## Sponsors
|
||||
|
||||
Thanks to the supporters of the **[Kickstarter campaign](https://www.kickstarter.com/projects/174808720/maputnik-visual-map-editor-for-mapbox-gl)**. This project would not be possible without these commercial and individual sponsors.
|
||||
You can see this file's history for previous sponsors of the original Maputnik repo.
|
||||
Read more about the MapLibre Sponsorship Program at https://maplibre.org/sponsors/.
|
||||
|
||||
## License
|
||||
|
||||
Maputnik is [licensed under MIT](LICENSE) and is Copyright (c) Lukas Martinelli and Maplibre contributors.
|
||||
As contributor please take extra care of not violating any Mapbox trademarks. Do not get inspired by other map studios and make your own decisions for a good style editor.
|
||||
@@ -1,2 +0,0 @@
|
||||
For an up-to-date policy refer to
|
||||
https://github.com/maplibre/maplibre/blob/main/SECURITY_POLICY.txt
|
||||
File renamed without changes.
Executable → Regular
File renamed without changes.
File renamed without changes.
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1 @@
|
||||
html{background-color:#1c1f24}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{font-size:100%;font:inherit;vertical-align:baseline;border:0;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:"";content:none}table{border-collapse:collapse;border-spacing:0}@font-face{font-family:Roboto;src:url(/maputnik/assets/Roboto-Regular-B-HLW1rL.ttf)format("truetype");font-weight:400;font-style:normal;font-display:swap}@font-face{font-family:Roboto;src:url(/maputnik/assets/Roboto-Medium-C0z2xw0d.ttf)format("truetype");font-weight:700;font-style:normal;font-display:swap}html{color:#f0f0f0;box-sizing:border-box;font-size:14px}body{overflow:hidden}*,:before,:after{box-sizing:inherit}p{color:#a4a4a4;margin-top:5px;margin-bottom:5px;font-size:12px;line-height:1.3}h1{margin-bottom:10px;font-size:20px;font-weight:700}h2{margin-bottom:10px;font-size:18px;font-weight:700}h3{margin-bottom:10px;font-size:16px;font-weight:700}h4{margin-bottom:10px;font-size:14px}input:focus,textarea:focus,[role=button]:focus,button:focus,.maputnik-toolbar-link:focus,select:focus{color:#f0f0f0;outline:1px auto #8e8e8e}label:hover{color:#f0f0f0}.clearfix:after{content:"";clear:both;display:table}a{color:#fff}.hide{display:none!important}.maputnik-map__container{background:#fff;width:100%;height:100%;display:flex}.maputnik-map__container--error{justify-content:center;align-items:center}.maputnik-map__container__error-message{text-align:center;margin:16px}.maputnik-map__map{width:100%;height:100%}.maputnik-input-block:hover .maputnik-doc-button,.maputnik-filter-editor-compound-select:hover .maputnik-doc-button{opacity:1;pointer-events:all;cursor:pointer}.maputnik-doc-wrapper{box-sizing:border-box;-webkit-user-select:none;user-select:none;vertical-align:top;font-size:12px;line-height:2;display:inline-block;position:relative}.maputnik-doc-popup{color:#a4a4a4;z-index:10;pointer-events:none;background-color:#222429;width:120px;padding:5px;font-size:10px;display:none;position:absolute;top:20px;left:0}.maputnik-doc-button{opacity:0;pointer-events:none;color:#fff;background:#191b20;border:none;padding:4px}.maputnik-doc-button svg{pointer-events:none}.maputnik-doc-button--open{opacity:1;pointer-events:all}.maputnik-doc-inline{color:#a4a4a4;background-color:#222429;flex:1 0;margin-top:10px;padding:5px;font-size:12px;line-height:1.5}.maputnik-doc-target:hover .maputnik-doc-popup{text-align:left;display:block}.maputnik-button{cursor:pointer;color:#a4a4a4;-webkit-user-select:none;user-select:none;box-sizing:border-box;background-color:#303237;border-width:0;border-radius:2px;padding:5px;font-size:12px;text-decoration:none;display:inline-block}.maputnik-button:hover{color:#f0f0f0;background-color:#4d5058}.maputnik-button:disabled{color:#303237;cursor:not-allowed;background-color:#242629}.maputnik-big-button{margin-top:10px;padding:10px;font-size:14px;display:inline-block}.maputnik-wide-button{padding:5px 10px}.maputnik-green-button{color:#191b20;background-color:#53b972}.maputnik-white-button{color:#191b20;background-color:#f0f0f0}.maputnik-icon-button,.maputnik-icon-button:hover:not(:disabled){background-color:#0000}.maputnik-icon-button:hover:not(:disabled) label,.maputnik-icon-button:hover:not(:disabled) svg{cursor:pointer}.maputnik-icon-button:hover:not(:disabled) svg{fill:#f0f0f0}.maputnik-input-block{flex-wrap:wrap;margin:10px;display:flex}.maputnik-input-block-label{color:#a4a4a4;-webkit-user-select:none;user-select:none;vertical-align:top;width:32%;font-size:12px}.maputnik-input-block-action{color:#a4a4a4;-webkit-user-select:none;user-select:none;vertical-align:top;text-align:right;width:18%;font-size:12px}.maputnik-input-block-content{width:50%}.maputnik-action-block .maputnik-input-block-label{width:32%;margin-bottom:10px;display:inline-block}.maputnik-action-block .maputnik-input-block-action{vertical-align:top;width:18%;display:inline-block}.maputnik-action-block .maputnik-input-block-action>div{text-align:right}.maputnik-data-spec-block .maputnik-inline-error,.maputnik-zoom-spec-property .maputnik-inline-error{margin-left:32%}.maputnik-space{flex-grow:1}.maputnik-message-panel{padding:5px}.maputnik-message-panel-error{color:#cf4a4a}.maputnik-message-panel__switch-button{all:unset;cursor:pointer;text-decoration:underline}.maputnik-dialog__buttons{text-align:right}.map-state-menu{display:inline-block}.map-state-menu__menu{z-index:999999;background:#191b20;flex-direction:column;align-content:stretch;display:flex;positLine truncated
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
{"version":3,"mappings":"+gDAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAoB,OAAO,IAAI,cAAc,EAC7CC,EAAsB,OAAO,IAAI,gBAAgB,EACjDC,EAAyB,OAAO,IAAI,mBAAmB,EACvDC,EAAsB,OAAO,IAAI,gBAAgB,EACjDC,EAAsB,OAAO,IAAI,gBAAgB,EACjDC,EAAqB,OAAO,IAAI,eAAe,EAC/CC,EAAyB,OAAO,IAAI,mBAAmB,EACvDC,EAAsB,OAAO,IAAI,gBAAgB,EACjDC,EAAkB,OAAO,IAAI,YAAY,EACzCC,EAAkB,OAAO,IAAI,YAAY,EACzCC,EAAsB,OAAO,IAAI,gBAAgB,EACjDC,EAA6B,OAAO,IAAI,uBAAuB,EAC/DC,EAAwB,OAAO,SACjC,SAASC,EAAc,EAAe,CAKpC,OAJ2C,OAAOC,GAApB,WAAjBA,EAA2D,MACxE,EACGF,GAAyBE,EAAcF,IACxCE,EAAc,cACM,OAAOA,GAAtB,WAAsCA,EAAgB,KAC/D,CACA,IAAIC,EAAuB,CACvB,UAAW,UAAY,CACrB,MAAO,CAAC,CACV,EACA,mBAAoB,UAAY,CAAC,EACjC,oBAAqB,UAAY,CAAC,EAClC,gBAAiB,UAAY,CAAC,CAChC,EACAC,EAAS,OAAO,OAChBC,EAAc,CAAC,EACjB,SAASC,EAAU,EAAO,EAAS,EAAS,CAC1C,KAAK,MAAQC,EACb,KAAK,QAAUC,EACf,KAAK,KAAOH,EACZ,KAAK,QAAUI,GAAWN,CAC5B,CACA,EAAU,UAAU,iBAAmB,CAAC,EACxC,EAAU,UAAU,SAAW,SAAU,EAAc,EAAU,CAC/D,GACe,OAAOO,GAApB,UACe,OAAOA,GAAtB,YACQA,GAAR,KAEA,MAAM,MACJ,wGACF,EACF,KAAK,QAAQ,gBAAgB,KAAMA,EAAcC,EAAU,UAAU,CACvE,EACA,EAAU,UAAU,YAAc,SAAU,EAAU,CACpD,KAAK,QAAQ,mBAAmB,KAAMA,EAAU,aAAa,CAC/D,EACA,SAASC,GAAiB,CAAC,CAC3B,EAAe,UAAYN,EAAU,UACrC,SAASO,EAAc,EAAO,EAAS,EAAS,CAC9C,KAAK,MAAQN,EACb,KAAK,QAAUC,EACf,KAAK,KAAOH,EACZ,KAAK,QAAUI,GAAWN,CAC5B,CACA,IAAIW,EAA0B,EAAc,UAAY,IAAIF,EAC5D,EAAuB,YAAcC,EACrCT,EAAOU,EAAwBR,EAAU,SAAS,EAClD,EAAuB,qBAAuB,CAAC,EAC/C,IAAIS,EAAc,MAAM,QACxB,SAASC,GAAO,CAAC,CACjB,IAAIC,EAAuB,CAAE,EAAG,KAAM,EAAG,KAAM,EAAG,KAAM,EAAG,IAAK,EAC9DC,EAAiB,OAAO,UAAU,eACpC,SAASC,EAAa,EAAM,EAAK,EAAO,CACtC,IAAIC,EAAUb,EAAM,IACpB,MAAO,CACL,SAAUpB,EACJ,OACD,MACL,IAAgBiC,IAAX,IAAK,GAA0B,KAAVA,EACnB,OACT,CACF,CACA,SAASC,EAAmB,EAAY,EAAQ,CAC9C,OAAOF,EAAaG,EAAW,KAAMC,EAAQD,EAAW,KAAK,CAC/D,CACA,SAASE,EAAe,EAAQ,CAC9B,OACe,OAAOC,GAApB,YACSA,GACTA,EAAO,WAAatC,CAExB,CACA,SAASuC,EAAO,EAAK,CACnB,IAAIC,EAAgB,CAAE,IAAK,KAAM,IAAK,IAAK,EAC3C,MACE,IACAC,EAAI,QAAQ,QAAS,SAAU,EAAO,CACpC,OAAOD,EAAcE,EACvB,CAAC,CAEL,CACA,IAAIC,GAA6B,OACjC,SAASC,EAAc,EAAS,EAAO,CACrC,OAAoB,OAAOC,GAApB,UAAwCA,GAAmBA,EAAQ,KAAhB,KACtDN,EAAO,GAAKM,EAAQ,GAAG,EACvBC,EAAM,SAAS,EAAE,CACvB,CACA,SAASC,GAAgB,EAAU,CACjC,OAAQC,EAAS,OAAjB,CACE,IAAK,YACH,OAAOA,EAAS,MAClB,IAAK,WACH,MAAMA,EAAS,OACjB,QACE,OACgB,OAAOA,EAAS,QAA7B,SACGA,EAAS,KAAKnB,EAAMA,CAAI,GACtB,EAAS,OAAS,UACpBmB,EAAS,KACP,SAAU,EAAgB,CACVA,EAAS,SAAvB,YACI,EAAS,OAAS,YACnB,EAAS,MAAQC,EACtB,EACA,SAAU,EAAO,CACDD,EAAS,SAAvB,YACI,EAAS,OAAS,WAAc,EAAS,OAASE,EACxD,CACF,GACJF,EAAS,OAfX,CAiBE,IAAK,YACH,OAAOA,EAAS,MAClB,IAAK,WACH,MAAMA,EAAS,MACnB,CACJ,CACA,MAAMA,CACR,CACA,SAASG,GAAa,EAAU,EAAO,EAAe,EAAW,EAAU,CACzE,IAAIC,EAAO,OAAOC,GACED,IAAhB,aAAsCA,IAAd,aAAoB,EAAW,MAC3D,IAAIE,EAAiB,CAAC,EACtB,GAAaD,IAAT,KAAmB,EAAiB,CAAC,OAEvC,OAAQD,EAAR,CACE,IAAK,SACL,IAAK,SACL,IAAK,SACH,EAAiB,CAAC,EAClB,MACF,IAAK,SACH,OAAQC,EAAS,SAAjB,CACE,KAAKrD,EACL,KAAKC,EACH,EAAiB,CAAC,EAClB,MACF,KAAKS,EACH,MACG,GAAiB2C,EAAS,MAC3BF,GACEG,EAAeD,EAAS,QAAQ,EAChCE,EACAC,EACAC,EACAjC,CACF,CAEN,CACJ,CACF,GAAI8B,EACF,MACG,GAAW9B,EAAS6B,CAAQ,EAC5B,EACQI,IAAP,GAAmB,IAAMb,EAAcS,EAAU,CAAC,EAAII,EACxD7B,EAAYJ,CAAQ,GACd,EAAgB,GACV8B,GAAR,OACG,EACCA,EAAe,QAAQX,GAA4B,KAAK,EAAI,KAChEQ,GAAa3B,EAAU+B,EAAOC,EAAe,GAAI,SAAU,EAAG,CAC5D,OAAOE,CACT,CAAC,GACOlC,GAAR,OACCa,EAAeb,CAAQ,IACrB,EAAWU,EACVV,EACAgC,GACWhC,EAAS,KAAjB,MACA6B,GAAYA,EAAS,MAAQ7B,EAAS,IACnC,IACC,GAAKA,EAAS,KAAK,QAClBmB,GACA,KACF,EAAI,KACRW,CACJ,GACFC,EAAM,KAAK/B,CAAQ,GACvB,EAEJ,EAAiB,EACjB,IAAImC,EAAwBF,IAAP,GAAmB,IAAMA,EAAY,IAC1D,GAAI7B,EAAYyB,CAAQ,EACtB,IAAK,IAAIO,EAAI,EAAGA,EAAIP,EAAS,OAAQ,IACnC,EAAaA,EAASO,GACnB,EAAOD,EAAiBf,EAAca,EAAWG,CAAC,EAClD,GAAkBT,GACjBM,EACAF,EACAC,EACAJ,EACA5B,CACF,OACD,GAAM,EAAIV,EAAcuC,CAAQ,EAAmB,OAAOO,GAAtB,WACvC,IACE,EAAWA,EAAE,KAAKP,CAAQ,EAAG,EAAI,EACjC,EAAE,EAAYA,EAAS,KAAK,GAAG,MAG/B,EAAaI,EAAU,MACpB,EAAOE,EAAiBf,EAAca,EAAW,GAAG,EACpD,GAAkBN,GACjBM,EACAF,EACAC,EACAJ,EACA5B,CACF,OACD,GAAiB4B,IAAb,SAAmB,CAC1B,GAAmB,OAAOC,EAAS,MAA/B,WACF,OAAOF,GACLJ,GAAgBM,CAAQ,EACxBE,EACAC,EACAC,EACAjC,CACF,EAEF,KADA,GAAQ,OAAO6B,CAAQ,EACjB,MACJ,mDACyBE,IAAtB,kBACG,qBAAuB,OAAO,KAAKF,CAAQ,CAAC,CAAC,KAAK,IAAI,EAAI,IAC1DE,GACJ,2EACJ,CACF,CACA,OAAOD,CACT,CACA,SAASO,EAAY,EAAU,EAAM,EAAS,CAC5C,GAAYR,GAAR,KAAkB,OAAOA,EAC7B,IAAIS,EAAS,CAAC,EACZC,EAAQ,EAIV,OAHAZ,GAAaE,EAAUS,EAAQ,GAAI,GAAI,SAAU,EAAO,CACtD,OAAOE,EAAK,KAAK3C,EAAS4C,EAAO,GAAO,CAC1C,CAAC,EACMH,CACT,CACA,SAASI,EAAgB,EAAS,CAChC,GAAWC,EAAQ,UAAf,GAAwB,CAC1B,IAAIC,EAAOD,EAAQ,QACjBnB,EAAWoB,EAAK,EAClBpB,EAAS,KACP,SAAU,EAAc,EACZmB,EAAQ,UAAd,GAAgCA,EAAQ,UAAf,MAC3B,EAAS,QAAU,EAChB,EAAQ,QAAUE,EACRrB,EAAS,SAApB,IAAK,KACD,EAAS,OAAS,YACnB,EAAS,MAAQqB,GAC1B,EACA,SAAU,EAAO,EACLF,EAAQ,UAAd,GAAgCA,EAAQ,UAAf,MAC3B,EAAS,QAAU,EAChB,EAAQ,QAAUjB,EACRF,EAAS,SAApB,IAAK,KACD,EAAS,OAAS,WAAc,EAAS,OAASE,GAC5D,CACF,EACOiB,EAAQ,UAAf,KACI,EAAQ,QAAU,EAAK,EAAQ,QAAUnB,EAC/C,CACA,GAAUmB,EAAQ,UAAd,EAAuB,OAAOA,EAAQ,QAAQ,QAClD,MAAMA,EAAQ,OAChB,CACA,IAAIG,GACa,OAAO,aAAtB,WACI,YACA,SAAU,EAAO,CACf,GACe,OAAO,QAApB,UACe,OAAO,OAAO,YAA7B,WACA,CACA,IAAIC,EAAQ,IAAI,OAAO,WAAW,QAAS,CACzC,QAAS,CAAC,EACV,WAAY,CAAC,EACb,QACe,OAAOrB,GAApB,UACSA,GACI,OAAOA,EAAM,SAA1B,SACI,OAAOA,EAAM,OAAO,EACpLine truncated
|
||||
File renamed without changes.
@@ -0,0 +1,11 @@
|
||||
(function(){
|
||||
/**
|
||||
* MapLibre GL JS
|
||||
* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.19.0/LICENSE.txt
|
||||
*/
|
||||
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));function l(e,t){this.x=e,this.y=t}l.prototype={clone(){return new l(this.x,this.y)},add(e){return this.clone()._add(e)},sub(e){return this.clone()._sub(e)},multByPoint(e){return this.clone()._multByPoint(e)},divByPoint(e){return this.clone()._divByPoint(e)},mult(e){return this.clone()._mult(e)},div(e){return this.clone()._div(e)},rotate(e){return this.clone()._rotate(e)},rotateAround(e,t){return this.clone()._rotateAround(e,t)},matMult(e){return this.clone()._matMult(e)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(e){return this.x===e.x&&this.y===e.y},dist(e){return Math.sqrt(this.distSqr(e))},distSqr(e){let t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle(){return Math.atan2(this.y,this.x)},angleTo(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith(e){return this.angleWithSep(e.x,e.y)},angleWithSep(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult(e){let t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add(e){return this.x+=e.x,this.y+=e.y,this},_sub(e){return this.x-=e.x,this.y-=e.y,this},_mult(e){return this.x*=e,this.y*=e,this},_div(e){return this.x/=e,this.y/=e,this},_multByPoint(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint(e){return this.x/=e.x,this.y/=e.y,this},_unit(){return this._div(this.mag()),this},_perp(){let e=this.y;return this.y=this.x,this.x=-e,this},_rotate(e){let t=Math.cos(e),n=Math.sin(e),r=t*this.x-n*this.y,i=n*this.x+t*this.y;return this.x=r,this.y=i,this},_rotateAround(e,t){let n=Math.cos(e),r=Math.sin(e),i=t.x+n*(this.x-t.x)-r*(this.y-t.y),a=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=i,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:l},l.convert=function(e){if(e instanceof l)return e;if(Array.isArray(e))return new l(+e[0],+e[1]);if(e.x!==void 0&&e.y!==void 0)return new l(+e.x,+e.y);throw Error(`Expected [x, y] or {x, y} point format`)};function u(e,t,n,r){let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c;return function(e,t=1e-6){if(e<=0)return 0;if(e>=1)return 1;let n=e;for(let r=0;r<8;r++){let r=((o*n+a)*n+i)*n-e;if(Math.abs(r)<t)return((l*n+c)*n+s)*n;let u=(3*o*n+2*a)*n+i;if(Math.abs(u)<1e-6)break;n-=r/u}let r=0,u=1;n=e;for(let s=0;s<20;s++){let s=((o*n+a)*n+i)*n;if(Math.abs(s-e)<t)break;e>s?r=n:u=n,n=(r+u)*.5}return((l*n+c)*n+s)*n}}let d;function f(){return d??=typeof OffscreenCanvas<`u`&&!!new OffscreenCanvas(1,1).getContext(`2d`)&&typeof createImageBitmap==`function`,d}let p;function m(){if(p==null&&(p=!1,f())){let e=new OffscreenCanvas(5,5).getContext(`2d`,{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let n=t*4;e.fillStyle=`rgb(${n},${n+1},${n+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){p=!0;break}}}return p||!1}var h=typeof Float32Array<`u`?Float32Array:Array;function g(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12],g=t[13],_=t[14],v=t[15],y=n[0],b=n[1],x=n[2],S=n[3];return e[0]=y*r+b*s+x*d+S*h,e[1]=y*i+b*c+x*f+S*g,e[2]=y*a+b*l+x*p+S*_,e[3]=y*o+b*u+x*m+S*v,y=n[4],b=n[5],x=n[6],S=n[7],e[4]=y*r+b*s+x*d+S*h,e[5]=y*i+b*c+x*f+S*g,e[6]=y*a+b*l+x*p+S*_,e[7]=y*o+b*u+x*m+S*v,y=n[8],b=n[9],x=n[10],S=n[11],e[8]=y*r+b*s+x*d+S*h,e[9]=y*i+b*c+x*f+S*g,e[10]=y*a+b*l+x*p+S*_,e[11]=y*o+b*u+x*m+S*v,y=n[12],b=n[13],x=n[14],S=n[15],e[12]=y*r+b*s+x*d+S*h,e[13]=y*i+b*c+x*f+S*g,e[14]=y*a+b*l+x*p+S*_,e[15]=y*o+b*u+x*m+S*v,e}function v(e,t,n){var r=n[0],i=n[1],a=n[2],o,s,c,l,u,d,f,p,m,h,g,_;return t===e?(e[12]=t[0]*r+t[4]*i+t[8]*a+t[12],e[13]=t[1]*r+t[5]*i+t[9]*a+t[13],e[14]=t[2]*r+t[6]*i+t[10]*a+t[14],e[15]=t[3]*r+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],c=t[2],l=t[3],u=t[4],d=t[5],f=t[6],p=t[7],m=t[8],h=t[9],g=t[10],_=t[11],e[0]=o,e[1]=s,e[2]=c,e[3]=l,e[4]=u,e[5]=d,e[6]=f,e[7]=p,e[8]=m,e[9]=h,e[10]=g,e[11]=_,e[12]=o*r+u*i+m*a+t[12],e[13]=s*r+d*i+h*a+t[13],e[14]=c*r+f*i+g*a+t[14],e[15]=l*r+p*i+_*a+t[15]),e}function y(e,t,n){var r=n[0],i=n[1],a=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12Line truncated
|
||||
/* @vite-ignore */
|
||||
e);return}let t=await fetch(e,{credentials:`same-origin`});if(!t.ok)throw Error(`Failed to load ${e}: ${t.status}`);let n=await t.text();if(/^[ \t]*(import|export)\s/m.test(n)){let e=URL.createObjectURL(new Blob([n],{type:`text/javascript`}));try{await import(
|
||||
/* @vite-ignore */
|
||||
e)}finally{URL.revokeObjectURL(e)}}else globalThis.eval(n)}var yT=class{constructor(e){this.self=e,this.actor=new vs(e),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=/* @__PURE__ */ new Map,this.importedScripts=/* @__PURE__ */ new Map,this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t},this.self.addProtocol=Qo,this.self.removeProtocol=$o,this.self.registerRTLTextPlugin=e=>{dg.setMethods(e)},this.self.makeRequest=os,this.self.setProjectionHandler=lT,this.actor.registerMessageHandler(`LDT`,(e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t)),this.actor.registerMessageHandler(`RDT`,async(e,t)=>{this._getDEMWorkerSource(e,t.source).removeTile(t)}),this.actor.registerMessageHandler(`GCEZ`,async(e,t)=>this._getWorkerSource(e,t.type,t.source).getClusterExpansionZoom(t)),this.actor.registerMessageHandler(`GCC`,async(e,t)=>this._getWorkerSource(e,t.type,t.source).getClusterChildren(t)),this.actor.registerMessageHandler(`GCL`,async(e,t)=>this._getWorkerSource(e,t.type,t.source).getClusterLeaves(t)),this.actor.registerMessageHandler(`LD`,(e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t)),this.actor.registerMessageHandler(`LT`,(e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t)),this.actor.registerMessageHandler(`RT`,(e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t)),this.actor.registerMessageHandler(`AT`,(e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t)),this.actor.registerMessageHandler(`RMT`,(e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t)),this.actor.registerMessageHandler(`RS`,async(e,t)=>{if(!this.workerSources[e]?.[t.type]?.[t.source])return;let n=this.workerSources[e][t.type][t.source];delete this.workerSources[e][t.type][t.source],n.removeSource!==void 0&&n.removeSource(t)}),this.actor.registerMessageHandler(`RM`,async e=>{delete this.layerIndexes[e],delete this.availableImages[e],delete this.workerSources[e],delete this.demWorkerSources[e],this.globalStates.delete(e)}),this.actor.registerMessageHandler(`SR`,async(e,t)=>{this.referrer=t}),this.actor.registerMessageHandler(`PI`,async()=>{}),this.actor.registerMessageHandler(`SRPS`,(e,t)=>this._syncRTLPluginState(e,t)),this.actor.registerMessageHandler(`IS`,(e,t)=>this._importScript(t)),this.actor.registerMessageHandler(`SI`,(e,t)=>this._setImages(e,t)),this.actor.registerMessageHandler(`UL`,async(e,t)=>{this._getLayerIndex(e).update(t.layers,t.removedIds,this._getGlobalState(e))}),this.actor.registerMessageHandler(`UGS`,async(e,t)=>{let n=this._getGlobalState(e);for(let e in t)n[e]=t[e]}),this.actor.registerMessageHandler(`SL`,async(e,t)=>{this._getLayerIndex(e).replace(t,this._getGlobalState(e))})}async _importScript(e){let t=this.importedScripts.get(e);if(t)return t;let n=vT(e);this.importedScripts.set(e,n);try{await n}catch(t){throw this.importedScripts.delete(e),t}}_getGlobalState(e){let t=this.globalStates.get(e);return t||(t={},this.globalStates.set(e,t)),t}async _setImages(e,t){this.availableImages[e]=t;for(let n in this.workerSources[e]){let r=this.workerSources[e][n];for(let e in r)r[e].availableImages=t}}async _syncRTLPluginState(e,t){return await dg.syncState(t,e=>this._importScript(e))}_getAvailableImages(e){let t=this.availableImages[e];return t||=[],t}_getLayerIndex(e){let t=this.layerIndexes[e];return t||=this.layerIndexes[e]=new Gw,t}_getWorkerSource(e,t,n){if(this.workerSources[e]||={},this.workerSources[e][t]||={},!this.workerSources[e][t][n]){let r={sendAsync:(t,n)=>(t.targetMapId=e,this.actor.sendAsync(t,n))};switch(t){case`vector`:this.workerSources[e][t][n]=new nT(r,this._getLayerIndex(e),this._getAvailableImages(e));break;case`geojson`:this.workerSources[e][t][n]=new hT(r,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][n]=new this.externalWorkerSourceTypes[t](r,this._getLayerIndex(e),this._getAvailableImages(e))}}return this.workerSources[e][t][n]}_getDEMWorkerSource(e,t){return this.demWorkerSources[e]||={},this.demWorkerSources[e][t]||=new rT,this.demWorkerSources[e][t]}};Oe(self)&&(self.worker=new yT(self))})();
|
||||
//# sourceMappingURL=maplibre-gl-worker-DddZ4Wha.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"maplibre-gl-worker-DddZ4Wha.js","names":[],"sources":["../../node_modules/maplibre-gl/dist/maplibre-gl-worker.mjs"],"sourcesContent":["/**\n* MapLibre GL JS\n* @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v6.19.0/LICENSE.txt\n*/\nvar e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));function l(e,t){this.x=e,this.y=t}l.prototype={clone(){return new l(this.x,this.y)},add(e){return this.clone()._add(e)},sub(e){return this.clone()._sub(e)},multByPoint(e){return this.clone()._multByPoint(e)},divByPoint(e){return this.clone()._divByPoint(e)},mult(e){return this.clone()._mult(e)},div(e){return this.clone()._div(e)},rotate(e){return this.clone()._rotate(e)},rotateAround(e,t){return this.clone()._rotateAround(e,t)},matMult(e){return this.clone()._matMult(e)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(e){return this.x===e.x&&this.y===e.y},dist(e){return Math.sqrt(this.distSqr(e))},distSqr(e){let t=e.x-this.x,n=e.y-this.y;return t*t+n*n},angle(){return Math.atan2(this.y,this.x)},angleTo(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith(e){return this.angleWithSep(e.x,e.y)},angleWithSep(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult(e){let t=e[0]*this.x+e[1]*this.y,n=e[2]*this.x+e[3]*this.y;return this.x=t,this.y=n,this},_add(e){return this.x+=e.x,this.y+=e.y,this},_sub(e){return this.x-=e.x,this.y-=e.y,this},_mult(e){return this.x*=e,this.y*=e,this},_div(e){return this.x/=e,this.y/=e,this},_multByPoint(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint(e){return this.x/=e.x,this.y/=e.y,this},_unit(){return this._div(this.mag()),this},_perp(){let e=this.y;return this.y=this.x,this.x=-e,this},_rotate(e){let t=Math.cos(e),n=Math.sin(e),r=t*this.x-n*this.y,i=n*this.x+t*this.y;return this.x=r,this.y=i,this},_rotateAround(e,t){let n=Math.cos(e),r=Math.sin(e),i=t.x+n*(this.x-t.x)-r*(this.y-t.y),a=t.y+r*(this.x-t.x)+n*(this.y-t.y);return this.x=i,this.y=a,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:l},l.convert=function(e){if(e instanceof l)return e;if(Array.isArray(e))return new l(+e[0],+e[1]);if(e.x!==void 0&&e.y!==void 0)return new l(+e.x,+e.y);throw Error(`Expected [x, y] or {x, y} point format`)};function u(e,t,n,r){let i=3*e,a=3*(n-e)-i,o=1-i-a,s=3*t,c=3*(r-t)-s,l=1-s-c;return function(e,t=1e-6){if(e<=0)return 0;if(e>=1)return 1;let n=e;for(let r=0;r<8;r++){let r=((o*n+a)*n+i)*n-e;if(Math.abs(r)<t)return((l*n+c)*n+s)*n;let u=(3*o*n+2*a)*n+i;if(Math.abs(u)<1e-6)break;n-=r/u}let r=0,u=1;n=e;for(let s=0;s<20;s++){let s=((o*n+a)*n+i)*n;if(Math.abs(s-e)<t)break;e>s?r=n:u=n,n=(r+u)*.5}return((l*n+c)*n+s)*n}}let d;function f(){return d??=typeof OffscreenCanvas<`u`&&!!new OffscreenCanvas(1,1).getContext(`2d`)&&typeof createImageBitmap==`function`,d}let p;function m(){if(p==null&&(p=!1,f())){let e=new OffscreenCanvas(5,5).getContext(`2d`,{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let n=t*4;e.fillStyle=`rgb(${n},${n+1},${n+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){p=!0;break}}}return p||!1}var h=typeof Float32Array<`u`?Float32Array:Array;function g(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function _(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],c=t[5],l=t[6],u=t[7],d=t[8],f=t[9],p=t[10],m=t[11],h=t[12],g=t[13],_=t[14],v=t[15],y=n[0],b=n[1],x=n[2],S=n[3];return e[0]=y*r+b*s+x*d+S*h,e[1]=y*i+b*c+x*f+S*g,e[2]=y*a+b*l+x*p+S*_,e[3]=y*o+b*u+x*m+S*v,y=n[4],b=n[5],x=n[6],S=n[7],e[4]=y*r+b*s+x*d+S*h,e[5]=y*i+b*c+x*f+S*g,e[6]=y*a+b*l+x*p+S*_,e[7]=y*o+b*u+x*m+S*v,y=n[8],b=n[9],x=n[10],S=n[11],e[8]=y*r+b*s+x*d+S*h,e[9]=y*i+b*c+x*f+S*g,e[10]=y*a+b*l+x*p+S*_,e[11]=y*o+b*u+x*m+S*v,y=n[12],b=n[13],x=n[14],S=n[15],e[12]=y*r+b*s+x*d+S*h,e[13]=y*i+b*c+x*f+S*g,e[14]=y*a+b*l+x*p+S*_,e[15]=y*o+b*u+x*m+S*v,e}function v(e,t,n){var r=n[0],i=n[1],a=n[2],o,s,c,l,u,d,f,p,m,h,g,_;return t===e?(e[12]=t[0]*r+t[4]*i+t[8]*a+t[12],e[13]=t[1]*r+t[5]*i+t[9]*a+t[13],e[14]=t[2]*r+t[6]*i+t[10]*a+t[14],e[15]=t[3]*r+t[7]*i+t[11]*a+t[15]):(o=t[0],s=t[1],c=t[2],l=t[3],u=t[4],d=t[5],f=t[6],p=t[7],m=t[8],h=t[9],g=t[10],_=t[11],e[0]=o,e[1]=s,e[2]=c,e[3]=l,e[4]=u,e[5]=d,e[6]=f,e[7]=p,e[8]=m,e[9]=h,e[10]=g,e[11]=_,e[12]=o*Line truncated
|
||||
@@ -0,0 +1,2 @@
|
||||
var e=`基础`,t=`方位`,n=`取消`,r=`中心`,i=`关闭`,a=`聚合`,o=`折叠`,s=`注释`,c=`调试`,l=`默认`,u=`删除`,d=`复制`,f=`编码`,p=`展开`,m=`过滤器`,h=`函数`,g=`GeoJSON`,_=`帮助`,v=`隐藏`,y=`图像`,b=`检查`,x=`键`,S=`图层`,C=`图层`,w=`链接`,T=`正在加载`,E=`地图`,D=`名称`,O=`打开`,k=`选项`,A=`所有者`,j=`俯仰角`,M=`投影`,N=`翻滚角`,P=`保存`,F=`搜索`,I=`快捷键`,L=`显示`,R=`源`,z=`源列表`,B=`停靠点`,V=`类型`,H=`值`,U=`视频`,W=`视图`,G=`缩放`,K={"<0>Open in OSM</0>. Opens the current view on openstreetmap.org":`在 openstreetmap.org 打开当前视图`,"Achromatopsia filter":`全色盲滤镜`,"Active Sources":`激活的源`,"Add a new source to your style. You can only choose the source type and id at creation time!":`向您的样式添加新源。在创建时,您只能选择源类型和ID!`,"Add filter":`添加过滤器`,"Add Layer":`添加图层`,"Add New Source":`添加新源`,"Add one of the publicly available sources to your style.":`将公开可用的源之一添加到您的样式中。`,"Add Source":`添加源`,"Add stop":`添加停靠点`,"Add value":`添加值`,"Add Variable":`添加变量`,"any filter matches":`任何过滤器匹配`,"API key for Stadia Maps.":`Stadia Maps 的 API 密钥`,"Atmosphere blend":`大气混合`,Base:e,Bearing:t,Cancel:n,Center:r,"Center altitude":`中心海拔`,"Choose Public Source":`选择公共源`,"Choose the default Maputnik renderer for this style.":`为这种样式选择默认的Maputnik渲染器。`,"Click to close the editor":`点击关闭编辑器`,Close:i,"Close modal":`关闭模态框`,"Close popup":`关闭弹出窗口`,Cluster:a,"Code Editor":`代码编辑器`,Collapse:o,"Color accessibility":`颜色可访问性`,"Comment...":`写注释...`,Comments:s,"Comments for the current layer. This is non-standard and not in the spec.":`当前图层的注释。注意:这不是标准功能,可能与其他库不兼容。`,"Convert property into a elevation function":`将属性转换为高程函数`,"Convert property into a zoom function":`将属性转换为缩放函数`,"Convert property to data function":`将属性转换为数据函数`,"Convert to expression":`转换为表达式`,"Coord bottom left":`左下角坐标`,"Coord bottom right":`右下角坐标`,"Coord top left":`左上角坐标`,"Coord top right":`右上角坐标`,"CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain":`CORS 策略不允许从 https 访问通过 http 提供的资源,请使用 <1>https://</1> 域名。`,"Create HTML":`创建HTML`,"Data Sources":`数据源`,"Data Sources modal":`数据源模态框`,"Data value":`数据值`,Debug:c,"Debug modal":`调试模态框`,"Decrease the pitch by 10 degrees.":`将俯仰角减少10度。`,"Decrease the rotation by 15 degrees.":`将旋转角度减少15度。`,"Decrease the zoom level by 1.":`将缩放级别减少1。`,"Decrease the zoom level by 2.":`将缩放级别减少2。`,Default:l,Delete:u,"Delete expression":`删除表达式`,"Delete filter block":`删除过滤器块`,"Deuteranopia filter":`绿色盲滤镜`,"Drag and drop a style JSON file here or click to browse":`将样式 JSON 文件拖放到此处或点击以浏览`,"Drag to resize the layer list":`拖动以调整图层列表大小`,"Drag to resize the sidebar":`拖动以调整侧边栏大小`,Duplicate:d,Encoding:f,"Enter URL...":`输入URL...`,"every filter matches":`每个过滤器都匹配`,Expand:p,"Export modal":`导出模态框`,Filter:m,"Focus map":`聚焦地图`,"Fog color":`雾颜色`,"Fog ground blend":`雾与地面混合`,"Font faces":`字体文件`,Function:h,"Gallery Styles":`画廊样式`,"General layout properties":`常规布局属性`,GeoJSON:g,"GeoJSON (JSON)":`GeoJSON (JSON格式)`,"GeoJSON (URL)":`GeoJSON (URL格式)`,"GeoJSON URL":`GeoJSON URL`,"Global State":`全局状态`,"Global State Variables":`全局状态变量`,"Glyphs URL":`字形URL`,Help:_,Hide:v,"Horizon color":`地平线颜色`,"Horizon fog blend":`地平线与雾混合`,"Icon layout properties":`图标布局属性`,"Icon paint properties":`图标绘制属性`,"If the Map is in focused you can use the following shortcuts":`如果地图处于焦点状态,您可以使用以下快捷键`,Image:y,"Image URL":`图像URL`,"Increase the pitch by 10 degrees.":`将俯仰角增加10度。`,"Increase the rotation by 15 degrees.":`将旋转角度增加15度。`,"Increase the zoom level by 1.":`将缩放级别增加1。`,"Increase the zoom level by 2.":`将缩放级别增加2。`,"Input a data property to base styles off of.":`输入一个数据属性作为样式的基础。`,"Input value":`输入值`,Inspect:b,"JSON Editor":`JSON编辑器`,Key:`键`,Layer:S,"Layer editor":`图层编辑器`,"Layer ID already exists":`图层ID已存在`,Layers:C,"Layers list":`图层列表`,"Layout properties":`布局属性`,"Learn More":`了解更多`,"Light anchor":`光源锚点`,"Light color":`光
Line truncated
|
||||
//# sourceMappingURL=translation-BAlB8LVo.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"translation-BAlB8LVo.js","names":["Base","Bearing","Cancel","Center","Close","Cluster","Collapse","Comments","Debug","Default","Delete","Duplicate","Encoding","Expand","Filter","Function","GeoJSON","Help","Hide","Image","Inspect","Key","Layer","Layers","Links","Loading","Map","Name","Open","Options","Owner","Pitch","Projection","Roll","Save","Search","Shortcuts","Show","Source","Sources","Stops","Type","Value","Video","View","Zoom","translation_default"],"sources":[],"mappings":""}
|
||||
@@ -0,0 +1,2 @@
|
||||
var e=`Basis`,t=`Ausrichtung`,n=`Abbrechen`,r=`Mittelpunkt`,i=`Schließen`,a=`Cluster`,o=`Einklappen`,s=`Kommentare`,c=`Debug`,l=`Standard`,u=`Löschen`,d=`Duplizieren`,f=`Kodierung`,p=`Ausklappen`,m=`Filter`,h=`Funktion`,g=`GeoJSON`,_=`Hilfe`,v=`Verstecken`,y=`Bild`,b=`Untersuchen`,x=`Schlüssel`,S=`Ebene`,C=`Ebenen`,w=`Links`,T=`Lädt`,E=`Karte`,D=`Name`,O=`Öffnen`,k=`Optionen`,A=`Besitzer`,j=`Neigung`,M=`Projektion`,N=`Rollwinkel`,P=`Speichern`,F=`Suche`,I=`Shortcuts`,L=`Anzeigen`,R=`Quelle`,z=`Quellen`,B=`Stopps`,V=`Typ`,H=`Wert`,U=`Video`,W=`Ansicht`,G=`Zoom`,K={"<0>Open in OSM</0>. Opens the current view on openstreetmap.org":`<0>In OSM öffnen</0>. Öffnet die aktuelle Ansicht auf openstreetmap.org`,"Achromatopsia filter":`Achromatopsie-Filter`,"Active Sources":`Aktive Quellen`,"Add a new source to your style. You can only choose the source type and id at creation time!":`Füge eine neue Quelle zu deinem Stil hinzu. Du kannst den Quellentyp und die ID nur bei der Erstellung auswählen!`,"Add filter":`Filter hinzufügen`,"Add Layer":`Ebene hinzufügen`,"Add New Source":`Neue Quelle hinzufügen`,"Add one of the publicly available sources to your style.":`Füge eine der öffentlich verfügbaren Quellen zu deinem Stil hinzu.`,"Add Source":`Quelle hinzufügen`,"Add stop":`Stopp hinzufügen`,"Add value":`Wert hinzufügen`,"Add Variable":`Variable hinzufügen`,"any filter matches":`irgendein Filter passt`,"API key for Stadia Maps.":`API-Schlüssel für Stadia Maps.`,"Atmosphere blend":`Atmosphärenüberblendung`,Base:e,Bearing:t,Cancel:n,Center:r,"Center altitude":`Höhe des Mittelpunkts`,"Choose Public Source":`Öffentliche Quelle auswählen`,"Choose the default Maputnik renderer for this style.":`Wähle den Standard-Renderer für diesen Stil aus.`,"Click to close the editor":`Klicken Sie hier, um den Editor zu schließen`,Close:i,"Close modal":`Modale Fenster schließen`,"Close popup":`Popup schließen`,Cluster:a,"Code Editor":`Code-Editor`,Collapse:o,"Color accessibility":`Farbzugänglichkeit`,"Comment...":`Dein Kommentar...`,Comments:s,"Comments for the current layer. This is non-standard and not in the spec.":`Kommentare zur aktuellen Ebene. Das ist nicht standardmäßig und nicht in der Spezifikation.`,"Convert property into a elevation function":`Eigenschaft in eine Höhenfunktion umwandeln`,"Convert property into a zoom function":`Eigenschaft in eine Zoom-Funktion umwandeln`,"Convert property to data function":`Eigenschaft in eine Datenfunktion umwandeln`,"Convert to expression":`In Ausdruck umwandeln`,"Coord bottom left":`Koordinate unten links`,"Coord bottom right":`Koordinate unten rechts`,"Coord top left":`Koordinate oben links`,"Coord top right":`Koordinate oben rechts`,"CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain":`Die CORS-Politik erlaubt es nicht, Ressourcen über http von https zu laden, benutze eine <1>https://</1>-Domain`,"Create HTML":`HTML erstellen`,"Data Sources":`Datenquellen`,"Data Sources modal":`Modale Datenquellen`,"Data value":`Datenwert`,Debug:c,"Debug modal":`Debug (modale Fenster)`,"Decrease the pitch by 10 degrees.":`Neigung um 10 Grad verringern.`,"Decrease the rotation by 15 degrees.":`Rotation um 15 Grad verringern.`,"Decrease the zoom level by 1.":`Zoom-Stufe um 1 verringern.`,"Decrease the zoom level by 2.":`Zoom-Stufe um 2 verringern.`,Default:l,Delete:u,"Delete expression":`Ausdruck löschen`,"Delete filter block":`Filterblock löschen`,"Deuteranopia filter":`Deuteranopie-Filter`,"Drag and drop a style JSON file here or click to browse":`Ziehen Sie eine Style-JSON-Datei hierher oder klicken Sie, um zu durchsuchen`,"Drag to resize the layer list":`Ziehen, um die Ebenenliste zu skalieren`,"Drag to resize the sidebar":`Ziehen, um die Seitenleiste zu skalieren`,Duplicate:d,Encoding:f,"Enter URL...":`URL eingeben...`,"every filter matches":`alle Filter passen`,Expand:p,"Export modal":`Modale Fenster exportieren`,Filter:m,"Focus map":`Karte fokussieren`,"Fog color":`Nebelfarbe`,"Fog ground blend":`Nebel-Boden-Überblendung`,"Font faces":`Schriftdateien`,Function:h,"Gallery Styles":`Galerie-Stile`,"General layout properties":`Allgemeine Layouteigenschaften`,GeoJSON:g,"GeoJSON (JSON)":`GeoJSON (JSON)`,"GeoJSON (URL)":`GeoJSON (URL)`,"GeoJSON URL":`GeoJSON URL`,"Global State":`Globaler Zustand`,"Global State Variables":`Globale Zustandsvariablen`,"Glyphs URL":`Glyphen-URL`,Help:_,Hide:v,"Horizon color":`Horizontfarbe`,"Horizon fog blend":`Horizont-Nebel-Überblendung`,"Icon layout properties":`Icon-Layouteigenschaften`,"Icon paint properties":`Icon-Darstellungseigenschaften`,"If the Map is in focused you can use the following shortcuts":`Wenn die Karte fokussiert ist, kannst du die folgenden Shortcuts benutzen`,Image:y,"Image URL":`Bild-URL`,"Increase the pitch by 10 degrees.":`Neigung um 10 Grad erhöhen.`,"Increase the rotation by 15 degrees.":`Rotation um 15 Grad erhöhen.`,"Increase the zoom level by 1.":`Zoom-Stuf
Line truncated
|
||||
//# sourceMappingURL=translation-BFsW6ApC.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"translation-BFsW6ApC.js","names":["Base","Bearing","Cancel","Center","Close","Cluster","Collapse","Comments","Debug","Default","Delete","Duplicate","Encoding","Expand","Filter","Function","GeoJSON","Help","Hide","Image","Inspect","Key","Layer","Layers","Links","Loading","Map","Name","Open","Options","Owner","Pitch","Projection","Roll","Save","Search","Shortcuts","Show","Source","Sources","Stops","Type","Value","Video","View","Zoom","translation_default"],"sources":[],"mappings":""}
|
||||
@@ -0,0 +1,2 @@
|
||||
var e=`בסיס`,t=`כיוון`,n=`ביטול`,r=`מרכז`,i=`סגירה`,a=`קיבוץ`,o=`הקטנה`,s=`הערות`,c=`דיבאג`,l=`ברירת המחדל`,u=`מחיקה`,d=`שכפול`,f=`קידוד`,p=`הגדלה`,m=`סינון`,h=`פונקציה`,g=`GeoJSON`,_=`עזרה`,v=`הסתרה`,y=`תמונה`,b=`בדיקה`,x=`מפתח`,S=`שכבה`,C=`שכבות`,w=`קישורים`,T=`טוען`,E=`מפה`,D=`שם`,O=`פתיחה`,k=`אפשרויות`,A=`שייך ל`,j=`זווית`,M=`הטלה`,N=`גלגול`,P=`שמור`,F=`חיפוש`,I=`קיצורי דרך`,L=`הצגה`,R=`מקור`,z=`מקורות`,B=`עצירות`,V=`סוג`,H=`ערך`,U=`וידאו`,W=`תצוגה`,G=`זום`,K={"<0>Open in OSM</0>. Opens the current view on openstreetmap.org":`<0>פתיחה ב-OSM</0>. פתיחה של התצוגה הנוכחית ב- openstreetmap.org`,"Achromatopsia filter":`Achromatopsia filter`,"Active Sources":`מקורות פעילים`,"Add a new source to your style. You can only choose the source type and id at creation time!":`הוספת מקור לסטייל, ביכולתכם לעשות זאת רק בזמן מסויים`,"Add filter":`הוספת סינון`,"Add Layer":`הוספת שכבה`,"Add New Source":`הוספת מקור חדש`,"Add one of the publicly available sources to your style.":`הוספת אחד המקורות הציבוריים הזמינים לסטייל שלך.`,"Add Source":`הוספת מקור`,"Add stop":`הוספת עצירה`,"Add value":`הוספת ערך`,"Add Variable":`הוסף משתנה`,"any filter matches":`אחד הסינוים מתאימים`,"API key for Stadia Maps.":`API key for Stadia Maps`,"Atmosphere blend":`מיזוג אטמוספרה`,Base:e,Bearing:t,Cancel:n,Center:r,"Center altitude":`גובה המרכז`,"Choose Public Source":`בחירת מקור ציבורי`,"Choose the default Maputnik renderer for this style.":`בחירת צייר ברירת המחדל של מפוטניק עבור הסטייל הזה`,"Click to close the editor":`לחץ לסגירת העורך`,Close:i,"Close modal":`סגירת חלונית`,"Close popup":`סגירת החלון`,Cluster:a,"Code Editor":`עורך קוד`,Collapse:o,"Color accessibility":`נגישות צבעים`,"Comment...":`הערה...`,Comments:s,"Comments for the current layer. This is non-standard and not in the spec.":`הערות על השכבה הנוכחית. זה לא חלק מהספסיפיקציות`,"Convert property into a elevation function":`המרה לפונקציית גובה`,"Convert property into a zoom function":`המרה לפונקציית זום`,"Convert property to data function":`המרה לפונקציית מידע`,"Convert to expression":`המחרה לביטוי`,"Coord bottom left":`מיקום שמאלי תחתון`,"Coord bottom right":`מיקום ימני תחתון`,"Coord top left":`מיקום שמאלי עליון`,"Coord top right":`מיקום ימני עליון`,"CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain":`CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain`,"Create HTML":`צור HTML`,"Data Sources":`מקורות מידע`,"Data Sources modal":`חלונית מקורות`,"Data value":`ערך מידע`,Debug:c,"Debug modal":`חלונית דיבאג`,"Decrease the pitch by 10 degrees.":`הורדה של 10 מעלות מהזווית`,"Decrease the rotation by 15 degrees.":`הורדת 15 מעלות לסיבוב`,"Decrease the zoom level by 1.":`הורדה של הזום ב-1`,"Decrease the zoom level by 2.":`הורדה של הזום ב-2`,Default:l,Delete:u,"Delete expression":`מחיקת ביטוי`,"Delete filter block":`מחיקת גוש מסנן`,"Deuteranopia filter":`Deuteranopia filter`,"Drag and drop a style JSON file here or click to browse":`גרור ושחרר כאן קובץ JSON של סגנון או לחץ כדי לעיין`,"Drag to resize the layer list":`יש לגרור כדי לשנות את גודל רשימת השכבות`,"Drag to resize the sidebar":`יש לגרור כדי לשנות את גודל סרגל הצד`,Duplicate:d,Encoding:f,"Enter URL...":`הכנסו כתובת`,"every filter matches":`כל הסינונים מתאימים`,Expand:p,"Export modal":`חלונית ייצוא`,Filter:m,"Focus map":`פיקוס המפה`,"Fog color":`צבע ערפל`,"Fog ground blend":`מיזוג ערפל עם הקרקע`,"Font faces":`קבצי גופנים`,Function:h,"Gallery Styles":`גלריית סטיילים`,"General layout properties":`תכונות פריסה כלליות`,GeoJSON:g,"GeoJSON (JSON)":`GeoJSON (JSON)`,"GeoJSON (URL)":`GeoJSON (URL)`,"GeoJSON URL":`כתובת GeoJSON`,"Global State":`מצב גלובלי`,"Global State Variables":`משתני מצב גלובלי`,"Glyphs URL":`כתובת סמלילים`,Help:_,Hide:v,"Horizon color":`צבע האופק`,"Horizon fog blend":`מיזוג ערפל באופק`,"Icon layout properties":`תכונות פריסה של
Line truncated
|
||||
//# sourceMappingURL=translation-ByOUQOby.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"translation-ByOUQOby.js","names":["Base","Bearing","Cancel","Center","Close","Cluster","Collapse","Comments","Debug","Default","Delete","Duplicate","Encoding","Expand","Filter","Function","GeoJSON","Help","Hide","Image","Inspect","Key","Layer","Layers","Links","Loading","Map","Name","Open","Options","Owner","Pitch","Projection","Roll","Save","Search","Shortcuts","Show","Source","Sources","Stops","Type","Value","Video","View","Zoom","translation_default"],"sources":[],"mappings":""}
|
||||
@@ -0,0 +1,2 @@
|
||||
var e=`Base`,t=`Orientation`,n=`Annuler`,r=`Centre`,i=`Fermer`,a=`Cluster`,o=`Réduire`,s=`Commentaires`,c=`Déboguer`,l=`Par défaut`,u=`Supprimer`,d=`Dupliquer`,f=`Encodage`,p=`Développer`,m=`Filtre`,h=`Fonction`,g=`GeoJSON`,_=`Aide`,v=`Cacher`,y=`Image`,b=`Inspecter`,x=`Clé`,S=`Calque`,C=`Calques`,w=`Liens`,T=`Chargement`,E=`Carte`,D=`Nom`,O=`Ouvrir`,k=`Options`,A=`Propriétaire`,j=`Inclinaison`,M=`Projection`,N=`Roulis`,P=`Enregistrer`,F=`Recherche`,I=`Raccourcis`,L=`Afficher`,R=`Source`,z=`Sources`,B=`Arrêts`,V=`Type`,H=`Valeur`,U=`Vidéo`,W=`Vue`,G=`Zoom`,K={"<0>Open in OSM</0>. Opens the current view on openstreetmap.org":`<0>Ouvrir dans OSM</0>. Ouvre la vue actuelle sur openstreetmap.org`,"Achromatopsia filter":`Filtre Achromatopsie`,"Active Sources":`Sources actives`,"Add a new source to your style. You can only choose the source type and id at creation time!":`Ajoutez une nouvelle source à votre style. Vous ne pouvez choisir le type et l'ID de la source qu'au moment de la création !`,"Add filter":`Ajouter un filtre`,"Add Layer":`Ajouter un calque`,"Add New Source":`Ajouter une nouvelle source`,"Add one of the publicly available sources to your style.":`Ajoutez l'une des sources publiques disponibles à votre style.`,"Add Source":`Ajouter une source`,"Add stop":`Ajouter un arrêt`,"Add value":`Ajouter une valeur`,"Add Variable":`Ajouter une variable`,"any filter matches":`l'un des filtres correspond`,"API key for Stadia Maps.":`Clé d'API pour Stadia Maps.`,"Atmosphere blend":`Fondu de l'atmosphère`,Base:e,Bearing:t,Cancel:n,Center:r,"Center altitude":`Altitude du centre`,"Choose Public Source":`Choisir une source publique`,"Choose the default Maputnik renderer for this style.":`Choisissez le moteur de rendu Maputnik par défaut pour ce style.`,"Click to close the editor":`Cliquez pour fermer l'éditeur`,Close:i,"Close modal":`Fermer la fenêtre modale`,"Close popup":`Fermer la fenêtre`,Cluster:a,"Code Editor":`Éditeur de code`,Collapse:o,"Color accessibility":`Accessibilité des couleurs`,"Comment...":`Votre commentaire...`,Comments:s,"Comments for the current layer. This is non-standard and not in the spec.":`Commentaires pour le calque actuel. Ceci n'est pas standard et n'est pas dans la spécification.`,"Convert property into a elevation function":`Convertir la propriété en fonction d'élévation`,"Convert property into a zoom function":`Convertir la propriété en fonction de zoom`,"Convert property to data function":`Convertir la propriété en fonction de données`,"Convert to expression":`Convertir en expression`,"Coord bottom left":`Coordonnée en bas à gauche`,"Coord bottom right":`Coordonnée en bas à droite`,"Coord top left":`Coordonnée en haut à gauche`,"Coord top right":`Coordonnée en haut à droite`,"CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain":`La politique CORS ne permet pas de récupérer des ressources servies sur http depuis https, utilisez un protocole <1>https://</1>`,"Create HTML":`Créer le HTML`,"Data Sources":`Sources de données`,"Data Sources modal":`Sources de données (modale)`,"Data value":`Valeur des données`,Debug:c,"Debug modal":`Déboguer (modale)`,"Decrease the pitch by 10 degrees.":`Diminuer l'inclinaison de 10 degrés.`,"Decrease the rotation by 15 degrees.":`Diminuer l'angle de rotation de 15 degrés.`,"Decrease the zoom level by 1.":`Diminuer le niveau de zoom de 1.`,"Decrease the zoom level by 2.":`Diminuer le niveau de zoom de 2.`,Default:l,Delete:u,"Delete expression":`Supprimer l'expression`,"Delete filter block":`Supprimer le bloc de filtre`,"Deuteranopia filter":`Filtre Deutéranopie`,"Drag and drop a style JSON file here or click to browse":`Faites glisser un fichier JSON de style ici ou cliquez pour parcourir`,"Drag to resize the layer list":`Glisser pour redimensionner la liste des calques`,"Drag to resize the sidebar":`Glisser pour redimensionner la barre latérale`,Duplicate:d,Encoding:f,"Enter URL...":`Entrez l'URL...`,"every filter matches":`tous les filtres correspondent`,Expand:p,"Export modal":`Exporter (modale)`,Filter:m,"Focus map":`Focus sur la carte`,"Fog color":`Couleur du brouillard`,"Fog ground blend":`Fondu brouillard-sol`,"Font faces":`Fichiers de police`,Function:h,"Gallery Styles":`Styles de la galerie`,"General layout properties":`Propriétés générales de mise en page`,GeoJSON:g,"GeoJSON (JSON)":`GeoJSON (JSON)`,"GeoJSON (URL)":`GeoJSON (URL)`,"GeoJSON URL":`URL GeoJSON`,"Global State":`État global`,"Global State Variables":`Variables d'état global`,"Glyphs URL":`URL des glyphes`,Help:_,Hide:v,"Horizon color":`Couleur de l'horizon`,"Horizon fog blend":`Fondu horizon-brouillard`,"Icon layout properties":`Propriétés de mise en page de l'icône`,"Icon paint properties":`Propriétés de peinture de l'icône`,"If the Map is in focused you can use the following shortcuts":`Si la carte a le focus, vous pouvez utiliser les raccourcis suivants`,Image:y,"Image
Line truncated
|
||||
//# sourceMappingURL=translation-C1kHjWZr.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"translation-C1kHjWZr.js","names":["Base","Bearing","Cancel","Center","Close","Cluster","Collapse","Comments","Debug","Default","Delete","Duplicate","Encoding","Expand","Filter","Function","GeoJSON","Help","Hide","Image","Inspect","Key","Layer","Layers","Links","Loading","Map","Name","Open","Options","Owner","Pitch","Projection","Roll","Save","Search","Shortcuts","Show","Source","Sources","Stops","Type","Value","Video","View","Zoom","translation_default"],"sources":[],"mappings":""}
|
||||
@@ -0,0 +1,2 @@
|
||||
var e=`Base`,t=`Direzione`,n=`Annulla`,r=`Centro`,i=`Chiudi`,a=`Cluster`,o=`Coprimi`,s=`Commenti`,c=`Debug`,l=`Predefinito`,u=`Elimina`,d=`Duplica`,f=`Codifica`,p=`Espandi`,m=`Filtro`,h=`Funzione`,g=`GeoJSON`,_=`Aiuto`,v=`Nascondi`,y=`Immagine`,b=`Esamina`,x=`Chiave`,S=`Livello`,C=`Livelli`,w=`Collegamenti`,T=`Caricamento`,E=`Mappa`,D=`Nome`,O=`Apri`,k=`Opzioni`,A=`Proprietario`,j=`Inclinazione`,M=`Proiezione`,N=`Rollio`,P=`Salva`,F=`Cerca`,I=`Scorciatoie`,L=`Mostra`,R=`Sorgente`,z=`Sorgenti`,B=`Fermate`,V=`Tipo`,H=`Valore`,U=`Video`,W=`Vista`,G=`Zoom`,K={"<0>Open in OSM</0>. Opens the current view on openstreetmap.org":`<0>Apri in OSM</0>. Apre la vista corrente su openstreetmap.org`,"Achromatopsia filter":`Filtro acromatopsia`,"Active Sources":`Sorgenti attive`,"Add a new source to your style. You can only choose the source type and id at creation time!":`Aggiungi una nuova sorgente al tuo stile. Puoi scegliere il tipo di sorgente e l'ID solo al momento della creazione!`,"Add filter":`Aggiungi filtro`,"Add Layer":`Aggiungi Livello`,"Add New Source":`Aggiungi nuova sorgente`,"Add one of the publicly available sources to your style.":`Aggiungi una delle sorgente pubbliche disponibili al tuo stile.`,"Add Source":`Aggiungi sorgente`,"Add stop":`Aggiungi fermata`,"Add value":`Aggiungi valore`,"Add Variable":`Aggiungi variabile`,"any filter matches":`qualsiasi filtro corrisponde`,"API key for Stadia Maps.":`Chiave API per Stadia Maps.`,"Atmosphere blend":`Sfumatura dell'atmosfera`,Base:e,Bearing:t,Cancel:n,Center:r,"Center altitude":`Altitudine del centro`,"Choose Public Source":`Scegli una sorgente pubblica`,"Choose the default Maputnik renderer for this style.":`Scegli il renderer predefinito di Maputnik per questo stile.`,"Click to close the editor":`Clicca per chiudere l'editor`,Close:i,"Close modal":`Chiudi finestra modale`,"Close popup":`Chiudi popup`,Cluster:a,"Code Editor":`Editor codice`,Collapse:o,"Color accessibility":`Accessibilità colori`,"Comment...":`Il tuo commento...`,Comments:s,"Comments for the current layer. This is non-standard and not in the spec.":`Commenti per il livello attuale. Questo non è standard e non è nella specifica.`,"Convert property into a elevation function":`Converti proprietà in una funzione di elevazione`,"Convert property into a zoom function":`Converti proprietà in una funzione di zoom`,"Convert property to data function":`Converti proprietà in una funzione dati`,"Convert to expression":`Converti in espressione`,"Coord bottom left":`Coordinate in basso a sinistra`,"Coord bottom right":`Coordinate in basso a destra`,"Coord top left":`Coordinate in alto a sinistra`,"Coord top right":`Coordinate in alto a destra`,"CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain":`La politica CORS non permette di caricare risorse tramite http da https, utilizza un dominio <1>https://</1>.`,"Create HTML":`Crea HTML`,"Data Sources":`Fonti dati`,"Data Sources modal":`Finestra modale sorgente dati`,"Data value":`Valore dei dati`,Debug:c,"Debug modal":`Finestra modale di debug`,"Decrease the pitch by 10 degrees.":`Aumenta la rotazione di 10 gradi.`,"Decrease the rotation by 15 degrees.":`Aumenta la rotazione di 15 gradi.`,"Decrease the zoom level by 1.":`Riduci il livello di zoom di 1.`,"Decrease the zoom level by 2.":`Riduci il livello di zoom di 1..`,Default:l,Delete:u,"Delete expression":`Elimina espressione`,"Delete filter block":`Elimina blocco filtro`,"Deuteranopia filter":`Filtro deuteranopia`,"Drag and drop a style JSON file here or click to browse":`Trascina e rilascia qui un file JSON dello stile o fai clic per sfogliare`,"Drag to resize the layer list":`Trascina per ridimensionare l'elenco dei livelli`,"Drag to resize the sidebar":`Trascina per ridimensionare la barra laterale`,Duplicate:d,Encoding:f,"Enter URL...":`Inserisci URL...`,"every filter matches":`tutti i filtri corrispondono`,Expand:p,"Export modal":`Esporta finestra modale`,Filter:m,"Focus map":`Metti a fuoco la mappa`,"Fog color":`Colore della nebbia`,"Fog ground blend":`Sfumatura nebbia-suolo`,"Font faces":`File dei font`,Function:h,"Gallery Styles":`Galleria degli stili`,"General layout properties":`Proprietà generali del layout`,GeoJSON:g,"GeoJSON (JSON)":`GeoJSON (JSON)`,"GeoJSON (URL)":`GeoJSON (URL)`,"GeoJSON URL":`GeoJSON URL`,"Global State":`Stato globale`,"Global State Variables":`Variabili di stato globale`,"Glyphs URL":`URL Glyphs`,Help:_,Hide:v,"Horizon color":`Colore dell'orizzonte`,"Horizon fog blend":`Sfumatura orizzonte-nebbia`,"Icon layout properties":`Proprietà di layout dell'icona`,"Icon paint properties":`Proprietà di pittura dell'icona`,"If the Map is in focused you can use the following shortcuts":`Se la mappa è attiva, puoi utilizzare le seguenti scorciatoie:`,Image:y,"Image URL":`Indirizzo immagine`,"Increase the pitch by 10 degrees.":`Incrementa la rotazione di 10 gradi`,"Increase the rotation by 15 degrees.":`Incrementa la rotazione
Line truncated
|
||||
//# sourceMappingURL=translation-C6Qy_Ule.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"translation-C6Qy_Ule.js","names":["Base","Bearing","Cancel","Center","Close","Cluster","Collapse","Comments","Debug","Default","Delete","Duplicate","Encoding","Expand","Filter","Function","GeoJSON","Help","Hide","Image","Inspect","Key","Layer","Layers","Links","Loading","Map","Name","Open","Options","Owner","Pitch","Projection","Roll","Save","Search","Shortcuts","Show","Source","Sources","Stops","Type","Value","Video","View","Zoom","translation_default"],"sources":[],"mappings":""}
|
||||
@@ -0,0 +1,2 @@
|
||||
var e=`Temel`,t=`Yön`,n=`İptal`,r=`Merkez`,i=`Kapat`,a=`Küme`,o=`Daralt`,s=`Yorumlar`,c=`Hata Ayıklama`,l=`Varsayılan`,u=`Sil`,d=`Kopyala`,f=`Kodlama`,p=`Genişlet`,m=`Filtre`,h=`Fonksiyon`,g=`GeoJSON`,_=`Yardım`,v=`Gizle`,y=`Görsel`,b=`İncele`,x=`Anahtar`,S=`Katman`,C=`Katmanlar`,w=`Bağlantılar`,T=`Yükleniyor`,E=`Harita`,D=`Ad`,O=`Aç`,k=`Seçenekler`,A=`Sahip`,j=`Eğim`,M=`Projeksiyon`,N=`Yuvarlanma`,P=`Kaydet`,F=`Ara`,I=`Kısayollar`,L=`Göster`,R=`Kaynak`,z=`Kaynaklar`,B=`Duraklar`,V=`Tür`,H=`Değer`,U=`Video`,W=`Görünüm`,G=`Yakınlaştırma`,K={"<0>Open in OSM</0>. Opens the current view on openstreetmap.org":`<0>OSM'de aç</0>. Mevcut görünümü openstreetmap.org üzerinde açar`,"Achromatopsia filter":`Akromatopsi filtresi`,"Active Sources":`Aktif Kaynaklar`,"Add a new source to your style. You can only choose the source type and id at creation time!":`Stilinize yeni bir kaynak ekleyin. Kaynak türünü ve kimliğini yalnızca oluşturma sırasında seçebilirsiniz!`,"Add filter":`Filtre ekle`,"Add Layer":`Katman Ekle`,"Add New Source":`Yeni Kaynak Ekle`,"Add one of the publicly available sources to your style.":`Stilinize herkese açık kaynaklardan birini ekleyin.`,"Add Source":`Kaynak Ekle`,"Add stop":`Durak ekle`,"Add value":`Değer ekle`,"Add Variable":`Değişken Ekle`,"any filter matches":`herhangi bir filtre eşleşirse`,"API key for Stadia Maps.":`Stadia Maps için API anahtarı.`,"Atmosphere blend":`Atmosfer karışımı`,Base:e,Bearing:t,Cancel:n,Center:r,"Center altitude":`Merkez yüksekliği`,"Choose Public Source":`Herkese Açık Kaynak Seç`,"Choose the default Maputnik renderer for this style.":`Bu stil için varsayılan Maputnik işleyicisini seçin.`,"Click to close the editor":`Düzenleyiciyi kapatmak için tıklayın`,Close:i,"Close modal":`Modalı kapat`,"Close popup":`Açılır pencereyi kapat`,Cluster:a,"Code Editor":`Kod Düzenleyici`,Collapse:o,"Color accessibility":`Renk erişilebilirliği`,"Comment...":`Yorum...`,Comments:s,"Comments for the current layer. This is non-standard and not in the spec.":`Mevcut katman için yorumlar. Bu standart dışıdır ve spesifikasyonda yoktur.`,"Convert property into a elevation function":`Özelliği bir yükseklik fonksiyonuna dönüştür`,"Convert property into a zoom function":`Özelliği bir yakınlaştırma fonksiyonuna dönüştür`,"Convert property to data function":`Özelliği veri fonksiyonuna dönüştür`,"Convert to expression":`İfadeye dönüştür`,"Coord bottom left":`Koordinat sol alt`,"Coord bottom right":`Koordinat sağ alt`,"Coord top left":`Koordinat sol üst`,"Coord top right":`Koordinat sağ üst`,"CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain":`CORS politikası, https üzerinden http ile sunulan kaynakların alınmasına izin vermez; <1>https://</1> alan adı kullanın`,"Create HTML":`HTML Oluştur`,"Data Sources":`Veri Kaynakları`,"Data Sources modal":`Veri Kaynakları modalı`,"Data value":`Veri değeri`,Debug:c,"Debug modal":`Hata ayıklama modalı`,"Decrease the pitch by 10 degrees.":`Eğimi 10 derece azalt.`,"Decrease the rotation by 15 degrees.":`Dönüşü 15 derece azalt.`,"Decrease the zoom level by 1.":`Yakınlaştırma seviyesini 1 azalt.`,"Decrease the zoom level by 2.":`Yakınlaştırma seviyesini 2 azalt.`,Default:l,Delete:`Sil`,"Delete expression":`İfadeyi sil`,"Delete filter block":`Filtre bloğunu sil`,"Deuteranopia filter":`Döteranopi filtresi`,"Drag and drop a style JSON file here or click to browse":`Bir stil JSON dosyasını buraya sürükleyip bırakın veya göz atmak için tıklayın`,"Drag to resize the layer list":`Katman listesini yeniden boyutlandırmak için sürükleyin`,"Drag to resize the sidebar":`Kenar çubuğunu yeniden boyutlandırmak için sürükleyin`,Duplicate:d,Encoding:f,"Enter URL...":`URL girin...`,"every filter matches":`tüm filtreler eşleşirse`,Expand:p,"Export modal":`Dışa aktarma modalı`,Filter:m,"Focus map":`Haritaya odaklan`,"Fog color":`Sis rengi`,"Fog ground blend":`Sis-zemin karışımı`,"Font faces":`Yazı tipi dosyaları`,Function:h,"Gallery Styles":`Galeri Stilleri`,"General layout properties":`Genel yerleşim özellikleri`,GeoJSON:g,"GeoJSON (JSON)":`GeoJSON (JSON)`,"GeoJSON (URL)":`GeoJSON (URL)`,"GeoJSON URL":`GeoJSON URL`,"Global State":`Genel Durum`,"Global State Variables":`Genel Durum Değişkenleri`,"Glyphs URL":`Glif URL'si`,Help:_,Hide:v,"Horizon color":`Ufuk rengi`,"Horizon fog blend":`Ufuk-sis karışımı`,"Icon layout properties":`Simge yerleşim özellikleri`,"Icon paint properties":`Simge boyama özellikleri`,"If the Map is in focused you can use the following shortcuts":`Harita odaktaysa aşağıdaki kısayolları kullanabilirsiniz`,Image:y,"Image URL":`Görsel URL'si`,"Increase the pitch by 10 degrees.":`Eğimi 10 derece artır.`,"Increase the rotation by 15 degrees.":`Dönüşü 15 derece artır.`,"Increase the zoom level by 1.":`Yakınlaştırma seviyesini
Line truncated
|
||||
//# sourceMappingURL=translation-DWbdltxS.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"translation-DWbdltxS.js","names":["Base","Bearing","Cancel","Center","Close","Cluster","Collapse","Comments","Debug","Default","Delete","Duplicate","Encoding","Expand","Filter","Function","GeoJSON","Help","Hide","Image","Inspect","Key","Layer","Layers","Links","Loading","Map","Name","Open","Options","Owner","Pitch","Projection","Roll","Save","Search","Shortcuts","Show","Source","Sources","Stops","Type","Value","Video","View","Zoom","translation_default"],"sources":[],"mappings":""}
|
||||
@@ -0,0 +1,2 @@
|
||||
var e=`ベース`,t=`方位`,n=`キャンセル`,r=`中央`,i=`閉じる`,a=`クラスタ`,o=`畳む`,s=`コメント`,c=`デバッグ`,l=`デフォルト`,u=`削除`,d=`複製`,f=`エンコーディング`,p=`展開`,m=`フィルタ`,h=`関数`,g=`GeoJSON`,_=`ヘルプ`,v=`非表示`,y=`画像`,b=`検査`,x=`キー`,S=`レイヤー`,C=`レイヤー`,w=`リンク`,T=`を読み込み中`,E=`地図`,D=`名前`,O=`開く`,k=`設定`,A=`所有者`,j=`ピッチ`,M=`投影`,N=`ロール`,P=`保存`,F=`検索`,I=`ショートカット`,L=`表示`,R=`ソース`,z=`ソース一覧`,B=`ストップ`,V=`タイプ`,H=`値`,U=`動画`,W=`表示`,G=`ズーム`,K={"<0>Open in OSM</0>. Opens the current view on openstreetmap.org":`現在のビューを <0>openstreetmap.org で開く</0>`,"Achromatopsia filter":`全色盲フィルタ`,"Active Sources":`使用中ソース`,"Add a new source to your style. You can only choose the source type and id at creation time!":`スタイルに新規ソースを追加します。注意: 作成時にソースタイプとIDのみを選択できます。`,"Add filter":`フィルタを追加`,"Add Layer":`レイヤー追加`,"Add New Source":`新規ソースを追加`,"Add one of the publicly available sources to your style.":`公開ソースをスタイルに追加しましょう`,"Add Source":`ソースを追加`,"Add stop":`ストップを追加`,"Add value":`値を追加する`,"Add Variable":`変数を追加`,"any filter matches":`いずれかのフィルタが一致`,"API key for Stadia Maps.":`Stadia Maps の API キー`,"Atmosphere blend":`大気のブレンド`,Base:e,Bearing:t,Cancel:n,Center:r,"Center altitude":`中央の高度`,"Choose Public Source":`公開ソースから選択`,"Choose the default Maputnik renderer for this style.":`このスタイルのデフォルトの Maputnik レンダラを選択してください`,"Click to close the editor":`エディタを閉じるにはクリックしてください`,Close:i,"Close modal":`モーダルを閉じる`,"Close popup":`ポップアップを閉じる`,Cluster:a,"Code Editor":`コードエディタ`,Collapse:o,"Color accessibility":`色のアクセシビリティ`,"Comment...":`コメントを書く`,Comments:s,"Comments for the current layer. This is non-standard and not in the spec.":`現在のレイヤーのコメント。注意:この機能は標準ではないため、他のライブラリとの互換性状況はわかりません。`,"Convert property into a elevation function":`プロパティを標高関数に変換する`,"Convert property into a zoom function":`プロパティをズーム関数に変換する`,"Convert property to data function":`プロパティをデータ関数に変換する`,"Convert to expression":`フィルタ式に変換`,"Coord bottom left":`左下座標`,"Coord bottom right":`右下座標`,"Coord top left":`左上座標`,"Coord top right":`右上座標`,"CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain":`CORS使用時は、http経由で提供されるリソースをhttpsから取得することはできません。<1>https://</1> ドメインを使用してください。`,"Create HTML":`HTMLを作成`,"Data Sources":`データソース`,"Data Sources modal":`データソースのモーダル`,"Data value":`データ値`,Debug:c,"Debug modal":`デバッグモーダル`,"Decrease the pitch by 10 degrees.":`ピッチを10度減らす`,"Decrease the rotation by 15 degrees.":`回転角度を15度減らす`,"Decrease the zoom level by 1.":`ズームレベルを1減らす`,"Decrease the zoom level by 2.":`ズームレベルを2減らす`,Default:l,Delete:u,"Delete expression":`式を削除`,"Delete filter block":`フィルタブロックを削除`,"Deuteranopia filter":`緑色盲フィルタ`,"Drag and drop a style JSON file here or click to browse":`ここにスタイルのJSONファイルをドラッグ&ドロップするか、クリックして参照してください`,"Drag to resize the layer list":`ドラッグしてレイヤーリストのサイズを変更`,"Drag to resize the sidebar":`ドラッグしてサイドバーのサイズを変更`,Duplicate:d,Encoding:f,"Enter URL...":`URLを入力`,"every filter matches":`全てのフィルタが一致`,Expand:p,"Export modal":`書き出しのモーダル`,Filter:m,"Focus map":`地図にフォーカス`,"Fog color":`霧の色`,"Fog ground blend":`霧と地面のブレンド`,"Font faces":`フォントファイル`,Function:h,"Gallery Styles":`ギャラリースタイル`,"General layout properties":`一般レイアウトプロパティ`,GeoJSON:g,"GeoJSON (JSON)":`GeoJSON (JSON)`,"GeoJSON (URL)":`GeoJSON (URL)`,"GeoJSON URL":`GeoJSON URL`,"Global State":`グローバルステート`,"Global State Variables":`グローバルステート変数`,"Glyphs URL":`フォントグリフURL`,Help:_,Hide:v,"Horizon color":`地平線の色`,"Horizon fog blend":`地平線と霧のブレンド`,"IconLine truncated
|
||||
//# sourceMappingURL=translation-DkRJB3n5.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"translation-DkRJB3n5.js","names":["Base","Bearing","Cancel","Center","Close","Cluster","Collapse","Comments","Debug","Default","Delete","Duplicate","Encoding","Expand","Filter","Function","GeoJSON","Help","Hide","Image","Inspect","Key","Layer","Layers","Links","Loading","Map","Name","Open","Options","Owner","Pitch","Projection","Roll","Save","Search","Shortcuts","Show","Source","Sources","Stops","Type","Value","Video","View","Zoom","translation_default"],"sources":[],"mappings":""}
|
||||
@@ -0,0 +1,2 @@
|
||||
var e=`베이스`,t=`방위각`,n=`취소`,r=`중심 좌표`,i=`닫기`,a=`클러스터`,o=`접기`,s=`주석`,c=`디버그`,l=`기본값`,u=`삭제`,d=`복제`,f=`인코딩`,p=`펼치기`,m=`필터`,h=`함수`,g=`GeoJSON`,_=`도움말`,v=`숨기기`,y=`이미지`,b=`검사`,x=`키`,S=`레이어`,C=`레이어`,w=`링크`,T=`로딩`,E=`맵`,D=`이름`,O=`열기`,k=`옵션`,A=`소유자`,j=`경사각`,M=`투영법`,N=`롤 각도`,P=`저장`,F=`검색`,I=`단축키`,L=`표시`,R=`소스`,z=`소스`,B=`기준점`,V=`유형`,H=`값`,U=`비디오`,W=`보기`,G=`줌`,K={"<0>Open in OSM</0>. Opens the current view on openstreetmap.org":`<0>OSM에서 열기</0>. 현재 뷰를 openstreetmap.org에서 엽니다`,"Achromatopsia filter":`전색맹 필터`,"Active Sources":`활성 소스`,"Add a new source to your style. You can only choose the source type and id at creation time!":`스타일에 새 소스를 추가합니다. 소스 유형과 ID는 생성 시에만 선택할 수 있습니다!`,"Add filter":`필터 추가`,"Add Layer":`레이어 추가`,"Add New Source":`새 소스 추가`,"Add one of the publicly available sources to your style.":`공개적으로 사용 가능한 소스 중 하나를 스타일에 추가하세요.`,"Add Source":`소스 추가`,"Add stop":`기준점 추가`,"Add value":`값 추가`,"Add Variable":`변수 추가`,"any filter matches":`일부 필터 일치`,"API key for Stadia Maps.":`Stadia Maps용 API 키 입니다.`,"Atmosphere blend":`대기 블렌드`,Base:e,Bearing:t,Cancel:n,Center:r,"Center altitude":`중심 고도`,"Choose Public Source":`공개 소스 선택`,"Choose the default Maputnik renderer for this style.":`이 스타일의 기본 Maputnik 렌더러를 선택하세요.`,"Click to close the editor":`편집기를 닫으려면 클릭하세요`,Close:i,"Close modal":`모달 닫기`,"Close popup":`팝업 닫기`,Cluster:a,"Code Editor":`코드 편집기`,Collapse:o,"Color accessibility":`색상 접근성`,"Comment...":`주석 입력...`,Comments:s,"Comments for the current layer. This is non-standard and not in the spec.":`현재 레이어에 대한 설명입니다. 이것은 비표준이며 사양에 포함되지 않습니다.`,"Convert property into a elevation function":`속성을 고도 함수로 변환`,"Convert property into a zoom function":`속성을 줌 함수로 변환`,"Convert property to data function":`속성을 데이터 함수로 변환`,"Convert to expression":`표현식으로 변환`,"Coord bottom left":`좌하단 좌표`,"Coord bottom right":`우하단 좌표`,"Coord top left":`좌상단 좌표`,"Coord top right":`우상단 좌표`,"CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain":`CORS 정책으로 인해 https에서 http 리소스를 가져올 수 없습니다. <1>https://</1> 도메인을 사용하세요`,"Create HTML":`HTML 생성`,"Data Sources":`데이터 소스`,"Data Sources modal":`데이터 소스 모달`,"Data value":`데이터 값`,Debug:c,"Debug modal":`디버그 모달`,"Decrease the pitch by 10 degrees.":`경사각을 10도 감소시킵니다.`,"Decrease the rotation by 15 degrees.":`회전을 15도 감소시킵니다.`,"Decrease the zoom level by 1.":`줌 레벨을 1 감소시킵니다.`,"Decrease the zoom level by 2.":`줌 레벨을 2 감소시킵니다.`,Default:l,Delete:u,"Delete expression":`표현식 삭제`,"Delete filter block":`필터 블록 삭제`,"Deuteranopia filter":`녹색맹 필터`,"Drag and drop a style JSON file here or click to browse":`여기에 스타일 JSON 파일을 끌어다 놓거나 클릭하여 찾아보세요`,"Drag to resize the layer list":`드래그하여 레이어 목록 크기 조정`,"Drag to resize the sidebar":`드래그하여 사이드바 크기 조정`,Duplicate:d,Encoding:f,"Enter URL...":`URL 입력...`,"every filter matches":`모든 필터 일치`,Expand:p,"Export modal":`모달 내보내기`,Filter:m,"Focus map":`포커스 맵`,"Fog color":`안개 색상`,"Fog ground blend":`안개-지면 블렌드`,"Font faces":`폰트 파일`,Function:h,"Gallery Styles":`갤러리 스타일`,"General layout properties":`일반 레이아웃 속성`,GeoJSON:g,"GeoJSON (JSON)":`GeoJSON (JSON)`,"GeoJSON (URL)":`GeoJSON (URL)`,"GeoJSON URL":`GeoJSON URL`,"Global State":`전역 상태`,"Global State Variables":`전역 상태 변수`,"Glyphs URL":`글리프 URL`,Help:_,Hide:v,"Horizon color":`지평선 색상`,"Horizon fog blend":`지평선-안개 블렌드`,"Icon layout properties":`아이콘 레이아웃 속성`,"Icon paint properties":`아이콘 페인트 속성`,"If the Map is in focused you can use the following shortcuts":`맵에 포커스가 맞춰진 경우 다음 단축키를 사용할 수 있습니다`,Image:y,"Image URL":`이미지 URL`,"Increase the pitch by 10 degrees.":`경사각을 10도 증가시킵니다.`,"Increase the rotation by 15 degrees.":`회전을 15도 증가시킵니다.`,"Increase the zoom level by 1.":`줌 레벨을 1 증가시킵니다.`,"IncLine truncated
|
||||
//# sourceMappingURL=translation-JlhmoUee.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"translation-JlhmoUee.js","names":["Base","Bearing","Cancel","Center","Close","Cluster","Collapse","Comments","Debug","Default","Delete","Duplicate","Encoding","Expand","Filter","Function","GeoJSON","Help","Hide","Image","Inspect","Key","Layer","Layers","Links","Loading","Map","Name","Open","Options","Owner","Pitch","Projection","Roll","Save","Search","Shortcuts","Show","Source","Sources","Stops","Type","Value","Video","View","Zoom","translation_default"],"sources":[],"mappings":""}
|
||||
@@ -0,0 +1,2 @@
|
||||
var e=`Baza`,t=`İstiqamət`,n=`Ləğv et`,r=`Mərkəz`,i=`Bağla`,a=`Klaster`,o=`Yığ`,s=`Şərhlər`,c=`Sazlama`,l=`Defolt`,u=`Sil`,d=`Dublikat et`,f=`Kodlaşdırma`,p=`Genişlət`,m=`Süzgəc`,h=`Funksiya`,g=`GeoJSON`,_=`Kömək`,v=`Gizlət`,y=`Şəkil`,b=`Yoxla`,x=`Açar`,S=`Qat`,C=`Qatlar`,w=`Keçidlər`,T=`Yüklənir`,E=`Xəritə`,D=`Ad`,O=`Aç`,k=`Seçimlər`,A=`Sahib`,j=`Meyl`,M=`Proyeksiya`,N=`Fırlanma`,P=`Yadda saxla`,F=`Axtar`,I=`Qısayollar`,L=`Göstər`,R=`Mənbə`,z=`Mənbələr`,B=`Dayanacaqlar`,V=`Növ`,H=`Dəyər`,U=`Video`,W=`Görünüş`,G=`Yaxınlaşma`,K={"<0>Open in OSM</0>. Opens the current view on openstreetmap.org":`<0>OSM-də aç</0>. Cari görünüşü openstreetmap.org saytında açır`,"Achromatopsia filter":`Axromatopsiya süzgəci`,"Active Sources":`Aktiv Mənbələr`,"Add a new source to your style. You can only choose the source type and id at creation time!":`Üslubunuza yeni mənbə əlavə edin. Mənbə növünü və ID-ni yalnız yaradılma zamanı seçə bilərsiniz!`,"Add filter":`Süzgəc əlavə et`,"Add Layer":`Qat Əlavə Et`,"Add New Source":`Yeni Mənbə Əlavə Et`,"Add one of the publicly available sources to your style.":`Üslubunuza ictimai mənbələrdən birini əlavə edin.`,"Add Source":`Mənbə Əlavə Et`,"Add stop":`Dayanacaq əlavə et`,"Add value":`Dəyər əlavə et`,"Add Variable":`Dəyişən Əlavə Et`,"any filter matches":`istənilən süzgəc uyğun gəlirsə`,"API key for Stadia Maps.":`Stadia Maps üçün API açarı.`,"Atmosphere blend":`Atmosfer qarışığı`,Base:e,Bearing:t,Cancel:n,Center:r,"Center altitude":`Mərkəzin hündürlüyü`,"Choose Public Source":`İctimai Mənbə Seç`,"Choose the default Maputnik renderer for this style.":`Bu üslub üçün defolt Maputnik renderer-ini seçin.`,"Click to close the editor":`Redaktoru bağlamaq üçün klikləyin`,Close:i,"Close modal":`Modalı bağla`,"Close popup":`Popapı bağla`,Cluster:a,"Code Editor":`Kod Redaktoru`,Collapse:o,"Color accessibility":`Rəng əlçatanlığı`,"Comment...":`Şərh...`,Comments:s,"Comments for the current layer. This is non-standard and not in the spec.":`Cari qat üçün şərhlər. Bu, standart deyil və spesifikasiyada yoxdur.`,"Convert property into a elevation function":`Xassəni hündürlük funksiyasına çevir`,"Convert property into a zoom function":`Xassəni yaxınlaşma funksiyasına çevir`,"Convert property to data function":`Xassəni məlumat funksiyasına çevir`,"Convert to expression":`İfadəyə çevir`,"Coord bottom left":`Koordinat aşağı sol`,"Coord bottom right":`Koordinat aşağı sağ`,"Coord top left":`Koordinat yuxarı sol`,"Coord top right":`Koordinat yuxarı sağ`,"CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain":`CORS siyasəti https-dən http üzərindən verilən resursların alınmasına icazə vermir, <1>https://</1> domenindən istifadə edin`,"Create HTML":`HTML Yarat`,"Data Sources":`Məlumat Mənbələri`,"Data Sources modal":`Məlumat Mənbələri modalı`,"Data value":`Məlumat dəyəri`,Debug:c,"Debug modal":`Sazlama modalı`,"Decrease the pitch by 10 degrees.":`Meyli 10 dərəcə azalt.`,"Decrease the rotation by 15 degrees.":`Fırlanmanı 15 dərəcə azalt.`,"Decrease the zoom level by 1.":`Yaxınlaşma səviyyəsini 1 azalt.`,"Decrease the zoom level by 2.":`Yaxınlaşma səviyyəsini 2 azalt.`,Default:l,Delete:`Sil`,"Delete expression":`İfadəni sil`,"Delete filter block":`Süzgəc blokunu sil`,"Deuteranopia filter":`Deuteranopiya süzgəci`,"Drag and drop a style JSON file here or click to browse":`Üslub JSON faylını buraya sürükləyib buraxın və ya seçmək üçün klikləyin`,"Drag to resize the layer list":`Qat siyahısının ölçüsünü dəyişmək üçün sürükləyin`,"Drag to resize the sidebar":`Yan panelin ölçüsünü dəyişmək üçün sürükləyin`,Duplicate:d,Encoding:f,"Enter URL...":`URL daxil edin...`,"every filter matches":`bütün süzgəclər uyğun gəlirsə`,Expand:p,"Export modal":`İxrac modalı`,Filter:m,"Focus map":`Xəritəyə fokuslan`,"Fog color":`Duman rəngi`,"Fog ground blend":`Duman-yer qarışığı`,"Font faces":`Şrift faylları`,Function:h,"Gallery Styles":`Qalereya Üslubları`,"General layout properties":`Ümumi düzülüş xassələri`,GeoJSON:g,"GeoJSON (JSON)":`GeoJSON (JSON)`,"GeoJSON (URL)":`GeoJSON (URL)`,"GeoJSON URL":`GeoJSON URL`,"Global State":`Qlobal Vəziyyət`,"Global State Variables":`Qlobal Vəziyyət Dəyişənləri`,"Glyphs URL":`Şriftlər URL-i`,Help:_,Hide:v,"Horizon color":`Üfüq rəngi`,"Horizon fog blend":`Üfüq-duman qarışığı`,"Icon layout properties":`İkon düzülüş xassələri`,"Icon paint properties":`İkon boyama xassələri`,"If the Map is in focused you can use the following shortcuts":`Xəritə fokusdadırsa aşağıdakı qısayollardan istifadə edə bilərsiniz`,Image:y,"Image URL":`Şəkil URL-i`,"Increase the pitch by 10 degrees.":`Meyli 10 dərəcə artır.`Line truncated
|
||||
//# sourceMappingURL=translation-KgmhpOlS.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"translation-KgmhpOlS.js","names":["Base","Bearing","Cancel","Center","Close","Cluster","Collapse","Comments","Debug","Default","Delete","Duplicate","Encoding","Expand","Filter","Function","GeoJSON","Help","Hide","Image","Inspect","Key","Layer","Layers","Links","Loading","Map","Name","Open","Options","Owner","Pitch","Projection","Roll","Save","Search","Shortcuts","Show","Source","Sources","Stops","Type","Value","Video","View","Zoom","translation_default"],"sources":[],"mappings":""}
|
||||
@@ -0,0 +1,2 @@
|
||||
var e={"Drag and drop a style JSON file here or click to browse":`Drag and drop a style JSON file here or click to browse`};export{e as default};
|
||||
//# sourceMappingURL=translation-kg7OItc9.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"translation-kg7OItc9.js","names":["translation_default"],"sources":[],"mappings":""}
|
||||
@@ -1,11 +0,0 @@
|
||||
# Build Scripts
|
||||
|
||||
This folder holds common build scripts used by some of the Github workflows.
|
||||
|
||||
The scripts are borrowed from [maplibre/maplibre-gl-js](https://github.com/maplibre/maplibre-gl-js/tree/bc70bc559cea5c987fa1b79fd44766cef68bbe28/build).
|
||||
|
||||
## Generate Release Notes
|
||||
|
||||
`bump-version-changelog.js` Used to update the changelog with the current notes, and set up a space for new notes
|
||||
|
||||
`release-notes.js` Used to generate release notes when releasing a new version
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* This script updates the changelog.md file with the version given in the arguments
|
||||
* It replaces ## main with ## <version>
|
||||
* Removes _...Add new stuff here..._
|
||||
* And adds on top a ## main with add stuff here.
|
||||
*
|
||||
* Copied from maplibre/maplibre-gl-js
|
||||
* https://github.com/maplibre/maplibre-gl-js/blob/bc70bc559cea5c987fa1b79fd44766cef68bbe28/build/release-notes.js
|
||||
*/
|
||||
|
||||
import * as fs from "fs";
|
||||
|
||||
const changelogPath = "CHANGELOG.md";
|
||||
let changelog = fs.readFileSync(changelogPath, "utf8");
|
||||
changelog = changelog.replace("## main", `## ${process.argv[2]}`);
|
||||
changelog = changelog.replaceAll("- _...Add new stuff here..._\n", "");
|
||||
changelog = `## main
|
||||
|
||||
### ✨ Features and improvements
|
||||
- _...Add new stuff here..._
|
||||
|
||||
### 🐞 Bug fixes
|
||||
- _...Add new stuff here..._
|
||||
|
||||
` + changelog;
|
||||
|
||||
fs.writeFileSync(changelogPath, changelog, "utf8");
|
||||
@@ -1,47 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// Copied from maplibre/maplibre-gl-js
|
||||
// https://github.com/maplibre/maplibre-gl-js/blob/bc70bc559cea5c987fa1b79fd44766cef68bbe28/build/release-notes.js
|
||||
|
||||
import * as fs from "fs";
|
||||
|
||||
const changelogPath = "CHANGELOG.md";
|
||||
const changelog = fs.readFileSync(changelogPath, "utf8");
|
||||
|
||||
/*
|
||||
Parse the raw changelog text and split it into individual releases.
|
||||
|
||||
This regular expression:
|
||||
- Matches lines starting with "## x.x.x".
|
||||
- Groups the version number.
|
||||
- Skips the (optional) release date.
|
||||
- Groups the changelog content.
|
||||
- Ends when another "## x.x.x" is found.
|
||||
*/
|
||||
const regex = /^## (\d+\.\d+\.\d+.*?)\n(.+?)(?=\n^## \d+\.\d+\.\d+.*?\n)/gms;
|
||||
|
||||
const releaseNotes = [];
|
||||
let match;
|
||||
// eslint-disable-next-line no-cond-assign
|
||||
while (match = regex.exec(changelog)) {
|
||||
releaseNotes.push({
|
||||
"version": match[1],
|
||||
"changelog": match[2].trim(),
|
||||
});
|
||||
}
|
||||
|
||||
const latest = releaseNotes[0];
|
||||
const previous = releaseNotes[1];
|
||||
|
||||
// Print the release notes template.
|
||||
|
||||
let header = "Changes since previous version";
|
||||
if (previous) {
|
||||
header = `https://github.com/maplibre/maputnik
|
||||
[Changes](https://github.com/maplibre/maputnik/compare/v${previous.version}...v${latest.version}) since [Maputnik v${previous.version}](https://github.com/maplibre/maputnik/releases/tag/v${previous.version})`;
|
||||
}
|
||||
const templatedReleaseNotes = `${header}
|
||||
|
||||
${latest.changelog}`;
|
||||
|
||||
process.stdout.write(templatedReleaseNotes.trimEnd());
|
||||
@@ -1,31 +0,0 @@
|
||||
# Compiled Object files, Static and Dynamic libs (Shared Objects)
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
|
||||
# Folders
|
||||
_obj
|
||||
_test
|
||||
editor
|
||||
|
||||
# Architecture specific extensions/prefixes
|
||||
*.[568vq]
|
||||
[568vq].out
|
||||
|
||||
*.cgo1.go
|
||||
*.cgo2.c
|
||||
_cgo_defun.c
|
||||
_cgo_gotypes.go
|
||||
_cgo_export.*
|
||||
|
||||
_testmain.go
|
||||
|
||||
*.exe
|
||||
*.test
|
||||
*.prof
|
||||
|
||||
# Binary version of pubilic/editor
|
||||
rice-box.go
|
||||
|
||||
# Built binary
|
||||
maputnik
|
||||
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Maputnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -1,47 +0,0 @@
|
||||
SOURCEDIR=.
|
||||
SOURCES := $(shell find $(SOURCEDIR) -name '*.go')
|
||||
BINARY=maputnik
|
||||
VERSION := $(shell node -p "require('../package.json').version")
|
||||
GOBIN := $(or $(shell if [ -d /go/bin ]; then echo "/go/bin"; fi),$(HOME)/go/bin)
|
||||
|
||||
all: $(BINARY)
|
||||
|
||||
$(BINARY): $(GOBIN)/gox $(GOBIN)/go-winres $(SOURCES) version.go rice-box.go winres/winres.json
|
||||
$(GOBIN)/go-winres make --product-version=$(VERSION)
|
||||
$(GOBIN)/gox -osarch "windows/amd64 linux/amd64 darwin/amd64" -output "bin/{{.OS}}/${BINARY}"
|
||||
|
||||
bin/linux/$(BINARY): $(GOBIN)/gox $(GOBIN)/go-winres $(SOURCES) version.go rice-box.go winres/winres.json
|
||||
$(GOBIN)/go-winres make --product-version=$(VERSION)
|
||||
$(GOBIN)/gox -osarch "linux/amd64" -output "bin/{{.OS}}/${BINARY}"
|
||||
|
||||
winres/winres.json: winres/winres_template.json
|
||||
sed 's/{{.Version}}/$(VERSION)/g' winres/winres_template.json > $@
|
||||
|
||||
$(GOBIN)/go-winres:
|
||||
go install github.com/tc-hib/go-winres@latest
|
||||
|
||||
# Copy the current release into ./editor/maputnik so it can be
|
||||
# embedded in the binary
|
||||
editor/pull_release:
|
||||
mkdir -p editor
|
||||
cp -r ../dist/* editor
|
||||
|
||||
$(GOBIN)/gox:
|
||||
go install github.com/mitchellh/gox@v1.0.1
|
||||
|
||||
$(GOBIN)/rice:
|
||||
go install github.com/GeertJohan/go.rice/rice@v1.0.3
|
||||
|
||||
# Embed the current version number in the executable by writing version.go
|
||||
.PHONY: version.go
|
||||
version.go:
|
||||
@printf "// DO NOT EDIT: Autogenerated by Makefile\n" > version.go
|
||||
@printf "package main\n" >> version.go
|
||||
@printf "const Version = \"$(VERSION)\"\n" >> version.go
|
||||
|
||||
rice-box.go: $(GOBIN)/rice editor/pull_release
|
||||
$(GOBIN)/rice embed-go
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf editor && rm -f rice-box.go && rm -rf bin
|
||||
@@ -1,73 +0,0 @@
|
||||
# Maputnik Desktop [][github-action-ci]
|
||||
|
||||
---
|
||||
|
||||
A Golang based cross platform executable for integrating Maputnik locally.
|
||||
This binary packages up the JavaScript and CSS bundle produced by maputnik
|
||||
and embeds it in the program for easy distribution. It also allows
|
||||
exposing a local style file and work on it both in Maputnik and with your favorite
|
||||
editor.
|
||||
|
||||
Report issues on [maplibre/maputnik](https://github.com/maplibre/maputnik).
|
||||
|
||||
## Install
|
||||
|
||||
You can download a zip file containing desktop binaries for Linux, OSX and Windows from [the latest releases of **maplibre/maputnik**](https://github.com/maplibre/maputnik/releases/latest).
|
||||
|
||||
### Usage
|
||||
|
||||
Simply start up a web server and access the Maputnik editor GUI at `localhost:8000`.
|
||||
|
||||
```bash
|
||||
maputnik
|
||||
```
|
||||
|
||||
Expose a local style file to Maputnik allowing the web based editor
|
||||
to save to the local filesystem.
|
||||
|
||||
```bash
|
||||
maputnik --file basic-v9.json
|
||||
```
|
||||
|
||||
Watch the local style for changes and inform the editor via web socket.
|
||||
This makes it possible to edit the style with a local text editor and still
|
||||
use Maputnik.
|
||||
|
||||
```bash
|
||||
maputnik --watch --file basic-v9.json
|
||||
```
|
||||
|
||||
Choose a local port to listen on, instead of using the default port 8000.
|
||||
|
||||
```bash
|
||||
maputnik --port 8001
|
||||
```
|
||||
|
||||
Specify a path to a directory which, if it exists, will be served under http://localhost:8000/static/ .
|
||||
Could be used to serve sprites and glyphs.
|
||||
|
||||
```bash
|
||||
maputnik --static ./localFolder
|
||||
```
|
||||
|
||||
### API
|
||||
|
||||
`maputnik` exposes the configured styles via a HTTP API.
|
||||
|
||||
| Method | Description |
|
||||
| ------------------------ | ------------------------------------------------------ |
|
||||
| `GET /styles` | List the ID of all configured style files |
|
||||
| `GET /styles/{filename}` | Get contents of a single style file |
|
||||
| `PUT /styles/{filename}` | Update contents of a style file |
|
||||
| `WEBSOCKET /ws` | Listen to change events for the configured style files |
|
||||
|
||||
### Build
|
||||
|
||||
From the root of the [maplibre/maputnik](https://github.com/maplibre/maputnik) project, install the deps and run the desktop-build command.
|
||||
|
||||
```
|
||||
npm install
|
||||
npm run build-desktop
|
||||
```
|
||||
|
||||
You should now find the `maputnik` binary in your `desktop/bin` directory.
|
||||
@@ -1,81 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
func StyleFileAccessor(filename string) styleFileAccessor {
|
||||
return styleFileAccessor{filename, styleId(filename)}
|
||||
}
|
||||
|
||||
func styleId(filename string) string {
|
||||
raw, err := ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
log.Panicln(err)
|
||||
}
|
||||
|
||||
var spec styleSpec
|
||||
err = json.Unmarshal(raw, &spec)
|
||||
if err != nil {
|
||||
log.Panicln(err)
|
||||
}
|
||||
|
||||
if spec.Id == "" {
|
||||
fmt.Println("No id in style")
|
||||
}
|
||||
return spec.Id
|
||||
}
|
||||
|
||||
type styleSpec struct {
|
||||
Id string `json:"id"`
|
||||
}
|
||||
|
||||
// Allows access to a single style file
|
||||
type styleFileAccessor struct {
|
||||
filename string
|
||||
id string
|
||||
}
|
||||
|
||||
func (fa styleFileAccessor) ListFiles(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
encoder := json.NewEncoder(w)
|
||||
encoder.Encode([]string{fa.id})
|
||||
}
|
||||
|
||||
func (fa styleFileAccessor) ReadFile(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
_ = vars["styleId"]
|
||||
|
||||
//TODO: Choose right file
|
||||
// right now we just return the single file we know of
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
||||
raw, err := ioutil.ReadFile(fa.filename)
|
||||
if err != nil {
|
||||
log.Panicln(err)
|
||||
}
|
||||
w.Write(raw)
|
||||
}
|
||||
|
||||
func (fa styleFileAccessor) SaveFile(w http.ResponseWriter, r *http.Request) {
|
||||
vars := mux.Vars(r)
|
||||
_ = vars["styleId"]
|
||||
|
||||
//TODO: Save to right file
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
||||
body, _ := ioutil.ReadAll(r.Body)
|
||||
var out bytes.Buffer
|
||||
json.Indent(&out, body, "", " ")
|
||||
|
||||
if err := ioutil.WriteFile(fa.filename, out.Bytes(), 0666); err != nil {
|
||||
log.Fatalf("Can not copy from request to file: %s", err.Error())
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
package filewatch
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/gorilla/websocket"
|
||||
)
|
||||
|
||||
var upgrader = websocket.Upgrader{
|
||||
ReadBufferSize: 1024,
|
||||
WriteBufferSize: 1024,
|
||||
CheckOrigin: func(r *http.Request) bool { return true },
|
||||
}
|
||||
|
||||
func writer(ws *websocket.Conn, filename string) {
|
||||
watcher, err := fsnotify.NewWatcher()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer watcher.Close()
|
||||
|
||||
done := make(chan bool)
|
||||
go func() {
|
||||
for {
|
||||
select {
|
||||
case event := <-watcher.Events:
|
||||
if event.Op&fsnotify.Write == fsnotify.Write {
|
||||
log.Println("Modified file:", event.Name)
|
||||
var p []byte
|
||||
var err error
|
||||
|
||||
p, err = ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
if p != nil {
|
||||
if err := ws.WriteMessage(websocket.TextMessage, p); err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
case err := <-watcher.Errors:
|
||||
log.Println("Watch error:", err)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
if err = watcher.Add(filename); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
<-done
|
||||
}
|
||||
|
||||
func ServeWebsocketFileWatcher(filename string, w http.ResponseWriter, r *http.Request) {
|
||||
ws, err := upgrader.Upgrade(w, r, nil)
|
||||
if err != nil {
|
||||
if _, ok := err.(websocket.HandshakeError); !ok {
|
||||
log.Println(err)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
writer(ws, filename)
|
||||
defer ws.Close()
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
module maputnik/desktop
|
||||
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/GeertJohan/go.rice v1.0.3
|
||||
github.com/fsnotify/fsnotify v1.6.0
|
||||
github.com/gorilla/handlers v1.5.1
|
||||
github.com/gorilla/mux v1.8.0
|
||||
github.com/gorilla/websocket v1.5.3
|
||||
github.com/maputnik/desktop v1.0.7
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
|
||||
github.com/urfave/cli v1.22.12
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
|
||||
github.com/daaku/go.zipexe v1.0.2 // indirect
|
||||
github.com/felixge/httpsnoop v1.0.1 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
golang.org/x/sys v0.1.0 // indirect
|
||||
)
|
||||
@@ -1,51 +0,0 @@
|
||||
github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
|
||||
github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0=
|
||||
github.com/GeertJohan/go.rice v1.0.3 h1:k5viR+xGtIhF61125vCE1cmJ5957RQGXG6dmbaWZSmI=
|
||||
github.com/GeertJohan/go.rice v1.0.3/go.mod h1:XVdrU4pW00M4ikZed5q56tPf1v2KwnIKeIdc9CBYNt4=
|
||||
github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
|
||||
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
|
||||
github.com/daaku/go.zipexe v1.0.2 h1:Zg55YLYTr7M9wjKn8SY/WcpuuEi+kR2u4E8RhvpyXmk=
|
||||
github.com/daaku/go.zipexe v1.0.2/go.mod h1:5xWogtqlYnfBXkSB1o9xysukNP9GTvaNkqzUZbt3Bw8=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ=
|
||||
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
|
||||
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
|
||||
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
|
||||
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
|
||||
github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q=
|
||||
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
|
||||
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
|
||||
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
|
||||
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
|
||||
github.com/maputnik/desktop v1.0.7 h1:rdFg7emIJOT3YsZpwqSChmWtMOvu+T4h6WwVQAZP9n4=
|
||||
github.com/maputnik/desktop v1.0.7/go.mod h1:wmDjHUztx9jOBz0I22589yWguAGdV/sEM57YANpN8oQ=
|
||||
github.com/nkovacs/streamquote v1.0.0/go.mod h1:BN+NaZ2CmdKqUuTUXUEm9j95B2TRbpOWpxbJYzzgUsc=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
|
||||
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
|
||||
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
|
||||
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
|
||||
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
|
||||
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
|
||||
github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8=
|
||||
github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8=
|
||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
||||
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
|
||||
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
|
||||
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||
@@ -1,103 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"github.com/GeertJohan/go.rice"
|
||||
"github.com/gorilla/handlers"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/maputnik/desktop/filewatch"
|
||||
"github.com/pkg/browser"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
func main() {
|
||||
app := cli.NewApp()
|
||||
app.Name = "maputnik"
|
||||
app.Usage = "Server for integrating Maputnik locally"
|
||||
app.Version = Version
|
||||
|
||||
app.Flags = []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "file, f",
|
||||
Usage: "Allow access to JSON style from web client",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "watch",
|
||||
Usage: "Notify web client about JSON style file changes",
|
||||
},
|
||||
&cli.IntFlag{
|
||||
Name: "port",
|
||||
Value: 8000,
|
||||
Usage: "TCP port to listen on",
|
||||
},
|
||||
&cli.StringFlag{
|
||||
Name: "static",
|
||||
Usage: "Serve directory under /static/",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "no-browser",
|
||||
Usage: "Do not automatically open the default browser",
|
||||
},
|
||||
}
|
||||
|
||||
app.Action = func(c *cli.Context) error {
|
||||
gui := http.FileServer(rice.MustFindBox("editor").HTTPBox())
|
||||
|
||||
router := mux.NewRouter().StrictSlash(true)
|
||||
|
||||
filename := c.String("file")
|
||||
if filename != "" {
|
||||
fmt.Printf("%s is accessible via Maputnik\n", filename)
|
||||
// Allow access to reading and writing file on the local system
|
||||
path, _ := filepath.Abs(filename)
|
||||
accessor := StyleFileAccessor(path)
|
||||
router.Path("/styles").Methods("GET").HandlerFunc(accessor.ListFiles)
|
||||
router.Path("/styles/{styleId}").Methods("GET").HandlerFunc(accessor.ReadFile)
|
||||
router.Path("/styles/{styleId}").Methods("PUT").HandlerFunc(accessor.SaveFile)
|
||||
|
||||
// Register websocket to notify we clients about file changes
|
||||
if c.Bool("watch") {
|
||||
router.Path("/ws").HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
filewatch.ServeWebsocketFileWatcher(filename, w, r)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
staticDir := c.String("static")
|
||||
if staticDir != "" {
|
||||
h := http.StripPrefix("/static/", http.FileServer(http.Dir(staticDir)))
|
||||
router.PathPrefix("/static/").Handler(h)
|
||||
}
|
||||
|
||||
router.PathPrefix("/").Handler(http.StripPrefix("/", gui))
|
||||
loggedRouter := handlers.LoggingHandler(os.Stdout, router)
|
||||
corsRouter := handlers.CORS(handlers.AllowedHeaders([]string{"Content-Type"}), handlers.AllowedMethods([]string{"GET", "PUT"}), handlers.AllowedOrigins([]string{"*"}), handlers.AllowCredentials())(loggedRouter)
|
||||
|
||||
listener, err := net.Listen("tcp", fmt.Sprintf(":%d", c.Int("port")))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
url := fmt.Sprintf("http://localhost:%d", c.Int("port"))
|
||||
fmt.Printf("Exposing Maputnik on %s\n", url)
|
||||
|
||||
// Listener is already accepting connections, so this can't race http.Serve below.
|
||||
// xdg-open is known to hang on some headless Linux setups, so this runs in its own
|
||||
// goroutine to keep a stuck opener from stalling server startup.
|
||||
if !c.Bool("no-browser") {
|
||||
go func() {
|
||||
if err := browser.OpenURL(url); err != nil {
|
||||
fmt.Printf("Could not open browser automatically: %s\nPlease open %s manually.\n", err, url)
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
return http.Serve(listener, corsRouter)
|
||||
}
|
||||
|
||||
app.Run(os.Args)
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
{
|
||||
"RT_GROUP_ICON": {
|
||||
"APP": {
|
||||
"0000": [
|
||||
"../../src/img/maputnik.png"
|
||||
]
|
||||
}
|
||||
},
|
||||
"RT_MANIFEST": {
|
||||
"#1": {
|
||||
"0409": {
|
||||
"identity": {
|
||||
"name": "Maputnik",
|
||||
"version": "{{.Version}}"
|
||||
},
|
||||
"description": "A MapLibre GL visual style editor",
|
||||
"minimum-os": "win7",
|
||||
"execution-level": "as invoker",
|
||||
"ui-access": false,
|
||||
"auto-elevate": false,
|
||||
"dpi-awareness": "system",
|
||||
"disable-theming": false,
|
||||
"disable-window-filtering": false,
|
||||
"high-resolution-scrolling-aware": false,
|
||||
"ultra-high-resolution-scrolling-aware": false,
|
||||
"long-path-aware": false,
|
||||
"printer-driver-isolation": false,
|
||||
"gdi-scaling": false,
|
||||
"segment-heap": false,
|
||||
"use-common-controls-v6": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"RT_VERSION": {
|
||||
"#1": {
|
||||
"0000": {
|
||||
"fixed": {
|
||||
"file_version": "{{.Version}}",
|
||||
"product_version": "{{.Version}}"
|
||||
},
|
||||
"info": {
|
||||
"0409": {
|
||||
"Comments": "https://github.com/maplibre/maputnik",
|
||||
"CompanyName": "Maputnik",
|
||||
"FileDescription": "A MapLibre GL visual style editor",
|
||||
"FileVersion": "{{.Version}}",
|
||||
"InternalName": "Maputnik",
|
||||
"LegalCopyright": "MIT License",
|
||||
"LegalTrademarks": "",
|
||||
"OriginalFilename": "Maputnik.exe",
|
||||
"PrivateBuild": "",
|
||||
"ProductName": "Maputnik",
|
||||
"ProductVersion": "{{.Version}}",
|
||||
"SpecialBuild": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
import { test, expect, describe, beforeEach } from "./utils/fixtures";
|
||||
import { MaputnikDriver } from "./maputnik-driver";
|
||||
import tokens from "../src/config/tokens.json" with { type: "json" };
|
||||
|
||||
describe("access tokens", () => {
|
||||
const { given, when } = new MaputnikDriver();
|
||||
|
||||
const tileJson = {
|
||||
tilejson: "2.2.0",
|
||||
tiles: ["https://example.local/{z}/{x}/{y}.pbf"],
|
||||
minzoom: 0,
|
||||
maxzoom: 14,
|
||||
};
|
||||
|
||||
beforeEach(async () => {
|
||||
await given.setupMockBackedResponses();
|
||||
});
|
||||
|
||||
test("uses the thunderforest token for a thunderforest source", async () => {
|
||||
await given.interceptAndMockResponse({
|
||||
method: "GET",
|
||||
url: /tile\.thunderforest\.com\/.*/,
|
||||
response: tileJson,
|
||||
alias: "thunderforest",
|
||||
});
|
||||
|
||||
await when.setStyle("access_tokens");
|
||||
|
||||
const request = await when.waitForResponse("thunderforest");
|
||||
expect(request.url()).toContain(`apikey=${tokens.thunderforest}`);
|
||||
});
|
||||
|
||||
test("uses the locationiq token for a locationiq source", async () => {
|
||||
await given.interceptAndMockResponse({
|
||||
method: "GET",
|
||||
url: /tiles\.locationiq\.com\/.*/,
|
||||
response: tileJson,
|
||||
alias: "locationiq",
|
||||
});
|
||||
|
||||
await when.setStyle("access_tokens");
|
||||
|
||||
const request = await when.waitForResponse("locationiq");
|
||||
expect(request.url()).toContain(`key=${tokens.locationiq}`);
|
||||
});
|
||||
|
||||
test("appends the stadia token as a query parameter", async () => {
|
||||
await given.interceptAndMockResponse({
|
||||
method: "GET",
|
||||
url: /tiles\.stadiamaps\.com\/.*/,
|
||||
response: tileJson,
|
||||
alias: "stadia",
|
||||
});
|
||||
|
||||
await when.setStyle("access_tokens");
|
||||
|
||||
const request = await when.waitForResponse("stadia");
|
||||
expect(request.url()).toContain("?api_key=stadia-test-token");
|
||||
});
|
||||
});
|
||||
@@ -1,48 +0,0 @@
|
||||
import { test, describe, beforeEach } from "./utils/fixtures";
|
||||
import { MaputnikDriver } from "./maputnik-driver";
|
||||
|
||||
describe("accessibility", () => {
|
||||
const { given, get, when, then } = new MaputnikDriver();
|
||||
|
||||
beforeEach(async () => {
|
||||
await given.setupMockBackedResponses();
|
||||
await when.setStyle("both");
|
||||
});
|
||||
|
||||
describe("skip links", () => {
|
||||
beforeEach(async () => {
|
||||
await when.setStyle("layer");
|
||||
});
|
||||
|
||||
test("skip link to layer list", async () => {
|
||||
const selector = "root:skip:layer-list";
|
||||
await then(get.elementByTestId(selector)).shouldExist();
|
||||
await when.tab();
|
||||
await then(get.elementByTestId(selector)).shouldBeFocused();
|
||||
await when.click(selector);
|
||||
await then(get.skipTargetLayerList()).shouldBeFocused();
|
||||
});
|
||||
|
||||
test("skip link to layer editor", async () => {
|
||||
const selector = "root:skip:layer-editor";
|
||||
await then(get.elementByTestId(selector)).shouldExist();
|
||||
await then(get.elementByTestId("skip-target-layer-editor")).shouldExist();
|
||||
await when.tab();
|
||||
await when.tab();
|
||||
await then(get.elementByTestId(selector)).shouldBeFocused();
|
||||
await when.click(selector);
|
||||
await then(get.skipTargetLayerEditor()).shouldBeFocused();
|
||||
});
|
||||
|
||||
test("skip link to map view", async () => {
|
||||
const selector = "root:skip:map-view";
|
||||
await then(get.elementByTestId(selector)).shouldExist();
|
||||
await when.tab();
|
||||
await when.tab();
|
||||
await when.tab();
|
||||
await then(get.elementByTestId(selector)).shouldBeFocused();
|
||||
await when.click(selector);
|
||||
await then(get.canvas()).shouldBeFocused();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,23 +0,0 @@
|
||||
import { beforeEach, describe, test } from "./utils/fixtures";
|
||||
import { MaputnikDriver } from "./maputnik-driver";
|
||||
|
||||
describe("code editor", () => {
|
||||
const { given, get, when, then } = new MaputnikDriver();
|
||||
|
||||
beforeEach(async () => {
|
||||
await given.setupMockBackedResponses();
|
||||
await when.setStyle("both");
|
||||
});
|
||||
|
||||
test("open code editor", async () => {
|
||||
await when.click("nav:code-editor");
|
||||
await then(get.element(".maputnik-code-editor")).shouldExist();
|
||||
});
|
||||
|
||||
test("closes code editor", async () => {
|
||||
await when.click("nav:code-editor");
|
||||
await then(get.element(".maputnik-code-editor")).shouldExist();
|
||||
await when.click("nav:code-editor");
|
||||
await then(get.element(".maputnik-code-editor")).shouldNotExist();
|
||||
});
|
||||
});
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"version": 8,
|
||||
"name": "Access token style",
|
||||
"metadata": {
|
||||
"maputnik:stadia_access_token": "stadia-test-token"
|
||||
},
|
||||
"sources": {
|
||||
"thunderforest_transport": {
|
||||
"type": "vector",
|
||||
"url": "https://tile.thunderforest.com/thunderforest.transport-v2.json?apikey={key}"
|
||||
},
|
||||
"stadia_outdoors": {
|
||||
"type": "vector",
|
||||
"url": "https://tiles.stadiamaps.com/data/openmaptiles.json"
|
||||
},
|
||||
"locationiq": {
|
||||
"type": "vector",
|
||||
"url": "https://tiles.locationiq.com/v3/pbf/tiles.json?key={key}"
|
||||
}
|
||||
},
|
||||
"layers": []
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"id": "test-style",
|
||||
"version": 8,
|
||||
"name": "Test Style",
|
||||
"metadata": {
|
||||
"maputnik:renderer": "mlgljs"
|
||||
},
|
||||
"sources": {},
|
||||
"glyphs": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"sprites": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"layers": [
|
||||
{
|
||||
"id": "background",
|
||||
"type": "background"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
{
|
||||
"id": "test-style",
|
||||
"version": 8,
|
||||
"name": "Test Style",
|
||||
"metadata": {
|
||||
"maputnik:renderer": "mlgljs"
|
||||
},
|
||||
"sources": {
|
||||
"example": {
|
||||
"type": "geojson",
|
||||
"data": {
|
||||
"type": "FeatureCollection",
|
||||
"features":[{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"name": "Dinagat Islands"
|
||||
},
|
||||
"geometry":{
|
||||
"type": "Point",
|
||||
"coordinates": [125.6, 10.1]
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
"glyphs": "https://www.glyph-server.com/fonts/{fontstack}/{range}.pbf",
|
||||
"sprites": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"layers": [
|
||||
{
|
||||
"id": "label",
|
||||
"type": "symbol",
|
||||
"source": "example",
|
||||
"layout": {
|
||||
"text-font": ["Font"]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
"id": "test-style",
|
||||
"version": 8,
|
||||
"name": "Test Style",
|
||||
"metadata": {
|
||||
"maputnik:renderer": "mbgljs"
|
||||
},
|
||||
"sources": {},
|
||||
"layers": []
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"id": "test-style",
|
||||
"center": [50,50],
|
||||
"zoom": 5,
|
||||
"version": 8,
|
||||
"name": "Test Style",
|
||||
"sources": {
|
||||
"rectangles": {
|
||||
"type": "geojson",
|
||||
"data": {
|
||||
"type": "FeatureCollection",
|
||||
"features": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"glyphs": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"sprites": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"layers": []
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"id": "test-style",
|
||||
"center": [0,51],
|
||||
"zoom": 7,
|
||||
"version": 8,
|
||||
"name": "Test Style",
|
||||
"sources": {
|
||||
"rectangles": {
|
||||
"type": "geojson",
|
||||
"data": {
|
||||
"type": "FeatureCollection",
|
||||
"features": []
|
||||
}
|
||||
}
|
||||
},
|
||||
"layers": []
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
{
|
||||
"id": "test-style",
|
||||
"version": 8,
|
||||
"name": "Test Style",
|
||||
"metadata": {
|
||||
"maputnik:renderer": "mlgljs",
|
||||
"data": [
|
||||
0,
|
||||
1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5,
|
||||
6,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
11,
|
||||
12,
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
16,
|
||||
17,
|
||||
18,
|
||||
19,
|
||||
20,
|
||||
21,
|
||||
22,
|
||||
23,
|
||||
24,
|
||||
25,
|
||||
26,
|
||||
27,
|
||||
28,
|
||||
29,
|
||||
30,
|
||||
31,
|
||||
32,
|
||||
33,
|
||||
34,
|
||||
35,
|
||||
36,
|
||||
37,
|
||||
38,
|
||||
39,
|
||||
40,
|
||||
41,
|
||||
42,
|
||||
43,
|
||||
44,
|
||||
45,
|
||||
46,
|
||||
47,
|
||||
48,
|
||||
49,
|
||||
50,
|
||||
51,
|
||||
52,
|
||||
53,
|
||||
54,
|
||||
55,
|
||||
56,
|
||||
57,
|
||||
58,
|
||||
59,
|
||||
60,
|
||||
61,
|
||||
62,
|
||||
63,
|
||||
64,
|
||||
65,
|
||||
66,
|
||||
67,
|
||||
68,
|
||||
69,
|
||||
70,
|
||||
71,
|
||||
72,
|
||||
73,
|
||||
74,
|
||||
75,
|
||||
76,
|
||||
77,
|
||||
78,
|
||||
79,
|
||||
80,
|
||||
81,
|
||||
82,
|
||||
83,
|
||||
84,
|
||||
85,
|
||||
86,
|
||||
87,
|
||||
88,
|
||||
89,
|
||||
90,
|
||||
91,
|
||||
92,
|
||||
93,
|
||||
94,
|
||||
95,
|
||||
96,
|
||||
97,
|
||||
98,
|
||||
99
|
||||
]
|
||||
},
|
||||
"sources": {},
|
||||
"glyphs": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"sprites": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"layers": []
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{
|
||||
"id": "test-style",
|
||||
"version": 8,
|
||||
"name": "Test Style",
|
||||
"metadata": {
|
||||
"maputnik:renderer": "mlgljs"
|
||||
},
|
||||
"sources": {
|
||||
"example": {
|
||||
"type": "vector",
|
||||
"data": {
|
||||
"type": "FeatureCollection",
|
||||
"features":[{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"name": "Dinagat Islands"
|
||||
},
|
||||
"geometry":{
|
||||
"type": "Point",
|
||||
"coordinates": [125.6, 10.1]
|
||||
}
|
||||
}]
|
||||
}
|
||||
},
|
||||
"raster": {
|
||||
"tileSize": 256,
|
||||
"tiles": ["http://localhost/example/{x}/{y}/{z}"],
|
||||
"type": "raster"
|
||||
}
|
||||
},
|
||||
"glyphs": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"sprites": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"layers": []
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
{
|
||||
"id": "test-style",
|
||||
"version": 8,
|
||||
"name": "Test Style",
|
||||
"metadata": {
|
||||
"maputnik:renderer": "mlgljs"
|
||||
},
|
||||
"sources": {
|
||||
"example": {
|
||||
"type": "vector",
|
||||
"data": {
|
||||
"type": "FeatureCollection",
|
||||
"features":[{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"name": "Dinagat Islands"
|
||||
},
|
||||
"geometry":{
|
||||
"type": "Point",
|
||||
"coordinates": [125.6, 10.1]
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
},
|
||||
"glyphs": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"sprites": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"layers": []
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"version": 8,
|
||||
"name": "Grouped layers",
|
||||
"sources": {},
|
||||
"layers": [
|
||||
{ "id": "background", "type": "background" },
|
||||
{ "id": "park-a", "type": "background" },
|
||||
{ "id": "park-b", "type": "background" },
|
||||
{ "id": "park-c", "type": "background" },
|
||||
{ "id": "road", "type": "background" },
|
||||
{ "id": "park-d", "type": "background" },
|
||||
{ "id": "park-e", "type": "background" },
|
||||
{ "id": "water-a", "type": "background" },
|
||||
{ "id": "water-b", "type": "background" }
|
||||
]
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
{
|
||||
"id": "test-style",
|
||||
"version": 8,
|
||||
"name": "Test Style",
|
||||
"metadata": {
|
||||
"maputnik:renderer": "mlgljs"
|
||||
},
|
||||
"sources": {
|
||||
"raster": {
|
||||
"tileSize": 256,
|
||||
"tiles": ["http://localhost/example/{x}/{y}/{z}"],
|
||||
"type": "raster"
|
||||
}
|
||||
},
|
||||
"glyphs": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"sprites": "https://example.local/fonts/{fontstack}/{range}.pbf",
|
||||
"layers": []
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
{
|
||||
"version": 8,
|
||||
"sources": {
|
||||
"rectangles": {
|
||||
"type": "geojson",
|
||||
"data": {
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {},
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
-130.78125,
|
||||
-33.13755119234615
|
||||
],
|
||||
[
|
||||
-130.78125,
|
||||
63.548552232036414
|
||||
],
|
||||
[
|
||||
15.468749999999998,
|
||||
63.548552232036414
|
||||
],
|
||||
[
|
||||
15.468749999999998,
|
||||
-33.13755119234615
|
||||
],
|
||||
[
|
||||
-130.78125,
|
||||
-33.13755119234615
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {},
|
||||
"geometry": {
|
||||
"type": "Polygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
-48.515625,
|
||||
-54.97761367069625
|
||||
],
|
||||
[
|
||||
-48.515625,
|
||||
36.5978891330702
|
||||
],
|
||||
[
|
||||
169.45312499999997,
|
||||
36.5978891330702
|
||||
],
|
||||
[
|
||||
169.45312499999997,
|
||||
-54.97761367069625
|
||||
],
|
||||
[
|
||||
-48.515625,
|
||||
-54.97761367069625
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "background",
|
||||
"type": "background",
|
||||
"paint": {
|
||||
"background-color": "white"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "rectangles",
|
||||
"type": "fill",
|
||||
"source": "rectangles",
|
||||
"paint": {
|
||||
"fill-opacity": 0.3
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"version": 8,
|
||||
"name": "Sprite preview test",
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"zoom": 0,
|
||||
"sources": {
|
||||
"points": {
|
||||
"type": "geojson",
|
||||
"data": {
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {},
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"sprite": "http://localhost:8888/sprite-alternate",
|
||||
"layers": [
|
||||
{
|
||||
"id": "symbols",
|
||||
"type": "symbol",
|
||||
"source": "points",
|
||||
"layout": {
|
||||
"icon-image": "red"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"blue": {
|
||||
"x": 64,
|
||||
"y": 0,
|
||||
"width": 32,
|
||||
"height": 32,
|
||||
"pixelRatio": 2
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"red": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 4,
|
||||
"height": 2,
|
||||
"pixelRatio": 1
|
||||
},
|
||||
"green": {
|
||||
"x": 16,
|
||||
"y": 0,
|
||||
"width": 16,
|
||||
"height": 16,
|
||||
"pixelRatio": 1
|
||||
},
|
||||
"sdf-circle": {
|
||||
"x": 32,
|
||||
"y": 0,
|
||||
"width": 32,
|
||||
"height": 32,
|
||||
"pixelRatio": 1,
|
||||
"sdf": true
|
||||
},
|
||||
"retina-square": {
|
||||
"x": 64,
|
||||
"y": 0,
|
||||
"width": 32,
|
||||
"height": 32,
|
||||
"pixelRatio": 2
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 712 B |
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"red": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 8,
|
||||
"height": 4,
|
||||
"pixelRatio": 2
|
||||
},
|
||||
"green": {
|
||||
"x": 32,
|
||||
"y": 0,
|
||||
"width": 32,
|
||||
"height": 32,
|
||||
"pixelRatio": 2
|
||||
},
|
||||
"sdf-circle": {
|
||||
"x": 64,
|
||||
"y": 0,
|
||||
"width": 64,
|
||||
"height": 64,
|
||||
"pixelRatio": 2,
|
||||
"sdf": true
|
||||
},
|
||||
"retina-square": {
|
||||
"x": 128,
|
||||
"y": 0,
|
||||
"width": 32,
|
||||
"height": 32,
|
||||
"pixelRatio": 2
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1005 B |
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"version": 8,
|
||||
"name": "Sprite preview test",
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"zoom": 0,
|
||||
"sources": {
|
||||
"points": {
|
||||
"type": "geojson",
|
||||
"data": {
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {},
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"id": "symbols",
|
||||
"type": "symbol",
|
||||
"source": "points",
|
||||
"layout": {
|
||||
"icon-image": "red"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
Sprite fixtures authored for this test suite and distributed under the repository MIT license. The 96×32 base atlas contains a small red rectangle, a green square, an analytic circle distance field (alpha=0.75+signedDistance/8), and a blue 2× square. The 192×64 `@2x` atlas uses doubled positions and dimensions for the base sprites and keeps the blue square at its original 2× resolution. The alternate catalog serves the blue square through the base atlas.
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
"version": 8,
|
||||
"name": "Sprite preview test",
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"zoom": 0,
|
||||
"sources": {
|
||||
"points": {
|
||||
"type": "geojson",
|
||||
"data": {
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {},
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"sprite": [
|
||||
{
|
||||
"id": "default",
|
||||
"url": "http://localhost:8888/sprite-atlas?key=test"
|
||||
},
|
||||
{
|
||||
"id": "extra",
|
||||
"url": "http://localhost:8888/sprite-alternate"
|
||||
}
|
||||
],
|
||||
"layers": [
|
||||
{
|
||||
"id": "symbols",
|
||||
"type": "symbol",
|
||||
"source": "points",
|
||||
"layout": {
|
||||
"icon-image": "red"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
{
|
||||
"version": 8,
|
||||
"name": "Sprite preview test",
|
||||
"center": [
|
||||
0,
|
||||
0
|
||||
],
|
||||
"zoom": 0,
|
||||
"sources": {
|
||||
"points": {
|
||||
"type": "geojson",
|
||||
"data": {
|
||||
"type": "FeatureCollection",
|
||||
"features": [
|
||||
{
|
||||
"type": "Feature",
|
||||
"properties": {},
|
||||
"geometry": {
|
||||
"type": "Point",
|
||||
"coordinates": [
|
||||
0,
|
||||
0
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"sprite": "http://localhost:8888/sprite-atlas?key=test",
|
||||
"layers": [
|
||||
{
|
||||
"id": "symbols",
|
||||
"type": "symbol",
|
||||
"source": "points",
|
||||
"layout": {
|
||||
"icon-image": "red"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
import { beforeEach, describe, test } from "./utils/fixtures";
|
||||
import { MaputnikDriver } from "./maputnik-driver";
|
||||
|
||||
describe("history", () => {
|
||||
const { given, get, when, then } = new MaputnikDriver();
|
||||
|
||||
const undoKeyCombo = process.platform === "darwin" ? "{meta}z" : "{ctrl}z";
|
||||
const redoKeyCombo = process.platform === "darwin" ? "{meta}{shift}z" : "{ctrl}y";
|
||||
|
||||
beforeEach(async () => {
|
||||
await given.setupMockBackedResponses();
|
||||
await when.setStyle("both");
|
||||
});
|
||||
|
||||
test("undo/redo", async () => {
|
||||
await when.setStyle("geojson");
|
||||
await when.modal.open();
|
||||
|
||||
await when.modal.fillLayers({
|
||||
id: "step 1",
|
||||
type: "background",
|
||||
});
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "step 1", type: "background" }],
|
||||
});
|
||||
|
||||
await when.modal.open();
|
||||
await when.modal.fillLayers({
|
||||
id: "step 2",
|
||||
type: "background",
|
||||
});
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{ id: "step 1", type: "background" },
|
||||
{ id: "step 2", type: "background" },
|
||||
],
|
||||
});
|
||||
|
||||
await when.typeKeys(undoKeyCombo);
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "step 1", type: "background" }],
|
||||
});
|
||||
|
||||
await when.typeKeys(undoKeyCombo);
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ layers: [] });
|
||||
|
||||
await when.typeKeys(redoKeyCombo);
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "step 1", type: "background" }],
|
||||
});
|
||||
|
||||
await when.typeKeys(redoKeyCombo);
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{ id: "step 1", type: "background" },
|
||||
{ id: "step 2", type: "background" },
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("should not redo after undo and value change", async () => {
|
||||
await when.setStyle("geojson");
|
||||
await when.modal.open();
|
||||
await when.modal.fillLayers({
|
||||
id: "step 1",
|
||||
type: "background",
|
||||
});
|
||||
|
||||
await when.modal.open();
|
||||
await when.modal.fillLayers({
|
||||
id: "step 2",
|
||||
type: "background",
|
||||
});
|
||||
|
||||
await when.typeKeys(undoKeyCombo);
|
||||
await when.typeKeys(undoKeyCombo);
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({ layers: [] });
|
||||
|
||||
await when.modal.open();
|
||||
await when.modal.fillLayers({
|
||||
id: "step 3",
|
||||
type: "background",
|
||||
});
|
||||
|
||||
await when.typeKeys(redoKeyCombo);
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "step 3", type: "background" }],
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,38 +0,0 @@
|
||||
import { beforeEach, describe, test } from "./utils/fixtures";
|
||||
import { MaputnikDriver } from "./maputnik-driver";
|
||||
|
||||
describe("i18n", () => {
|
||||
const { given, get, when, then } = new MaputnikDriver();
|
||||
|
||||
beforeEach(async () => {
|
||||
await given.setupMockBackedResponses();
|
||||
await when.setStyle("both");
|
||||
});
|
||||
|
||||
describe("language detector", () => {
|
||||
test("English", async () => {
|
||||
await when.visit("?lng=en");
|
||||
await then(get.elementByTestId("maputnik-lang-select")).shouldHaveValue("en");
|
||||
});
|
||||
|
||||
test("Japanese", async () => {
|
||||
await when.visit("?lng=ja");
|
||||
await then(get.elementByTestId("maputnik-lang-select")).shouldHaveValue("ja");
|
||||
});
|
||||
});
|
||||
|
||||
describe("language switcher", () => {
|
||||
beforeEach(async () => {
|
||||
await when.setStyle("layer");
|
||||
});
|
||||
|
||||
test("the language switcher switches to Japanese", async () => {
|
||||
const selector = "maputnik-lang-select";
|
||||
await then(get.elementByTestId(selector)).shouldExist();
|
||||
await when.select(selector, "ja");
|
||||
await then(get.elementByTestId(selector)).shouldHaveValue("ja");
|
||||
|
||||
await then(get.elementByTestId("nav:settings")).shouldHaveText("スタイル設定");
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,83 +0,0 @@
|
||||
import { beforeEach, describe, test } from "./utils/fixtures";
|
||||
import { MaputnikDriver } from "./maputnik-driver";
|
||||
|
||||
describe("keyboard", () => {
|
||||
const { given, get, when, then } = new MaputnikDriver();
|
||||
|
||||
beforeEach(async () => {
|
||||
await given.setupMockBackedResponses();
|
||||
await when.setStyle("both");
|
||||
});
|
||||
|
||||
describe("shortcuts", () => {
|
||||
beforeEach(async () => {
|
||||
await given.setupMockBackedResponses();
|
||||
await when.setStyle("");
|
||||
});
|
||||
|
||||
test("ESC should unfocus", async () => {
|
||||
const targetSelector = "maputnik-select";
|
||||
await when.focus(targetSelector);
|
||||
await then(get.elementByTestId(targetSelector)).shouldBeFocused();
|
||||
await when.typeKeys("{esc}");
|
||||
await then(get.elementByTestId(targetSelector)).shouldNotBeFocused();
|
||||
});
|
||||
|
||||
test("'?' should show shortcuts modal", async () => {
|
||||
await when.typeKeys("?");
|
||||
await then(get.elementByTestId("modal:shortcuts")).shouldBeVisible();
|
||||
});
|
||||
|
||||
test("'o' should show open modal", async () => {
|
||||
await when.typeKeys("o");
|
||||
await then(get.elementByTestId("modal:open")).shouldBeVisible();
|
||||
});
|
||||
|
||||
test("'e' should show export modal", async () => {
|
||||
await when.typeKeys("e");
|
||||
await then(get.elementByTestId("modal:export")).shouldBeVisible();
|
||||
});
|
||||
|
||||
test("'d' should show sources modal", async () => {
|
||||
await when.typeKeys("d");
|
||||
await then(get.elementByTestId("modal:sources")).shouldBeVisible();
|
||||
});
|
||||
|
||||
test("'s' should show settings modal", async () => {
|
||||
await when.typeKeys("s");
|
||||
await then(get.elementByTestId("modal:settings")).shouldBeVisible();
|
||||
});
|
||||
|
||||
test("'i' should change map to inspect mode", async () => {
|
||||
await when.typeKeys("i");
|
||||
await then(get.inputValue("maputnik-select")).shouldEqual("inspect");
|
||||
});
|
||||
|
||||
test("'m' should focus map", async () => {
|
||||
await when.typeKeys("m");
|
||||
await then(get.canvas()).shouldBeFocused();
|
||||
});
|
||||
|
||||
test("'!' should show debug modal", async () => {
|
||||
await when.typeKeys("!");
|
||||
await then(get.elementByTestId("modal:debug")).shouldBeVisible();
|
||||
});
|
||||
|
||||
describe("while the map has focus", () => {
|
||||
beforeEach(async () => {
|
||||
await when.typeKeys("m");
|
||||
await then(get.canvas()).shouldBeFocused();
|
||||
});
|
||||
|
||||
test("'!' should show debug modal", async () => {
|
||||
await when.typeKeys("!");
|
||||
await then(get.elementByTestId("modal:debug")).shouldBeVisible();
|
||||
});
|
||||
|
||||
test("'s' should show settings modal", async () => {
|
||||
await when.typeKeys("s");
|
||||
await then(get.elementByTestId("modal:settings")).shouldBeVisible();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,630 +0,0 @@
|
||||
import { v1 as uuid } from "uuid";
|
||||
import { beforeEach, describe, test } from "./utils/fixtures";
|
||||
import { MaputnikDriver } from "./maputnik-driver";
|
||||
|
||||
describe("layer editor", () => {
|
||||
const { given, get, when, then } = new MaputnikDriver();
|
||||
|
||||
beforeEach(async () => {
|
||||
await given.setupMockBackedResponses();
|
||||
await when.setStyle("both");
|
||||
await when.modal.open();
|
||||
});
|
||||
|
||||
async function createBackground() {
|
||||
const id = uuid();
|
||||
|
||||
await when.selectWithin("add-layer.layer-type", "background");
|
||||
await when.setValue("add-layer.layer-id.input", "background:" + id);
|
||||
|
||||
await when.click("add-layer");
|
||||
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "background:" + id, type: "background" }],
|
||||
});
|
||||
return id;
|
||||
}
|
||||
|
||||
test("expand/collapse", async () => {
|
||||
const bgId = await createBackground();
|
||||
await when.click("layer-list-item:background:" + bgId);
|
||||
|
||||
await then(get.elementByTestId("layer-editor.layer-id.input")).shouldBeVisible();
|
||||
|
||||
await when.toggleGroupInLayerEditor("Layer");
|
||||
await then(get.elementByTestId("layer-editor.layer-id.input")).shouldNotBeVisible();
|
||||
|
||||
await when.toggleGroupInLayerEditor("Layer");
|
||||
await then(get.elementByTestId("layer-editor.layer-id.input")).shouldBeVisible();
|
||||
});
|
||||
|
||||
test("id", async () => {
|
||||
const bgId = await createBackground();
|
||||
|
||||
await when.click("layer-list-item:background:" + bgId);
|
||||
|
||||
const id = uuid();
|
||||
await when.setValue("layer-editor.layer-id.input", "foobar:" + id);
|
||||
await when.click("min-zoom");
|
||||
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "foobar:" + id, type: "background" }],
|
||||
});
|
||||
});
|
||||
|
||||
describe("source", () => {
|
||||
test("should show error when the source is invalid", async () => {
|
||||
await when.modal.fillLayers({
|
||||
type: "circle",
|
||||
layer: "invalid",
|
||||
});
|
||||
await then(
|
||||
get.element(".maputnik-input-block--error .maputnik-input-block-label")
|
||||
).shouldHaveCss("color", "rgb(207, 74, 74)");
|
||||
});
|
||||
});
|
||||
|
||||
describe("min-zoom", () => {
|
||||
let bgId: string;
|
||||
|
||||
beforeEach(async () => {
|
||||
bgId = await createBackground();
|
||||
await when.click("layer-list-item:background:" + bgId);
|
||||
await when.setValue("min-zoom.input-text", "1");
|
||||
await when.click("layer-editor.layer-id");
|
||||
});
|
||||
|
||||
test("should update min-zoom in local storage", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "background:" + bgId, type: "background", minzoom: 1 }],
|
||||
});
|
||||
});
|
||||
|
||||
test("when clicking next layer should update style on local storage", async () => {
|
||||
await when.type("min-zoom.input-text", "{backspace}");
|
||||
await when.click("max-zoom.input-text");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "background:" + bgId, type: "background", minzoom: 1 }],
|
||||
});
|
||||
});
|
||||
|
||||
test("the range slider adjusts min-zoom", async () => {
|
||||
await when.focus("min-zoom.input-range");
|
||||
await when.typeKeys("{rightarrow}");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "background:" + bgId, type: "background", minzoom: 2 }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("max-zoom", () => {
|
||||
let bgId: string;
|
||||
|
||||
beforeEach(async () => {
|
||||
bgId = await createBackground();
|
||||
await when.click("layer-list-item:background:" + bgId);
|
||||
await when.setValue("max-zoom.input-text", "1");
|
||||
await when.click("layer-editor.layer-id");
|
||||
});
|
||||
|
||||
test("should update style in local storage", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "background:" + bgId, type: "background", maxzoom: 1 }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("comments", () => {
|
||||
let bgId: string;
|
||||
const comment = "42";
|
||||
|
||||
beforeEach(async () => {
|
||||
bgId = await createBackground();
|
||||
await when.click("layer-list-item:background:" + bgId);
|
||||
await when.setValue("layer-comment.input", comment);
|
||||
await when.click("layer-editor.layer-id");
|
||||
});
|
||||
|
||||
test("should update style in local storage", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{
|
||||
id: "background:" + bgId,
|
||||
type: "background",
|
||||
metadata: { "maputnik:comment": comment },
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
describe("when unsetting", () => {
|
||||
beforeEach(async () => {
|
||||
await when.clear("layer-comment.input");
|
||||
await when.click("min-zoom.input-text");
|
||||
});
|
||||
|
||||
test("should update style in local storage", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "background:" + bgId, type: "background" }],
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("color", () => {
|
||||
let bgId: string;
|
||||
beforeEach(async () => {
|
||||
bgId = await createBackground();
|
||||
await when.click("layer-list-item:background:" + bgId);
|
||||
await when.click("spec-field:background-color");
|
||||
});
|
||||
|
||||
test("should update style in local storage", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "background:" + bgId, type: "background" }],
|
||||
});
|
||||
});
|
||||
|
||||
test("typing a hex value updates the paint color", async () => {
|
||||
await when.setColorValue("background-color", "#ff0000");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "background:" + bgId, type: "background", paint: { "background-color": "#ff0000" } }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("opacity", () => {
|
||||
let bgId: string;
|
||||
beforeEach(async () => {
|
||||
bgId = await createBackground();
|
||||
await when.click("layer-list-item:background:" + bgId);
|
||||
await when.type("spec-field-input:background-opacity", "0.");
|
||||
});
|
||||
|
||||
test("should keep '.' in the input field", async () => {
|
||||
await then(get.elementByTestId("spec-field-input:background-opacity")).shouldHaveValue("0.");
|
||||
});
|
||||
|
||||
test("should revert to a valid value when focus out", async () => {
|
||||
await when.click("layer-list-item:background:" + bgId);
|
||||
await then(get.elementByTestId("spec-field-input:background-opacity")).shouldHaveValue("0");
|
||||
});
|
||||
});
|
||||
|
||||
describe("filter", () => {
|
||||
let id: string;
|
||||
|
||||
beforeEach(async () => {
|
||||
id = await when.modal.fillLayers({ type: "fill", layer: "example" });
|
||||
await when.addFilter();
|
||||
});
|
||||
|
||||
test("should add a filter item", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "fill", source: "example", filter: ["all", ["==", "name", ""]] }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should change the filter operator", async () => {
|
||||
await when.selectFilterOperator("!=");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, filter: ["all", ["!=", "name", ""]] }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should extend the compound filter with a second item", async () => {
|
||||
await when.addFilter();
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, filter: ["all", ["==", "name", ""], ["==", "name", ""]] }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should change the combining operator", async () => {
|
||||
await when.selectFilterCombiningOperator("any");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, filter: ["any", ["==", "name", ""]] }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should delete a filter item", async () => {
|
||||
await when.addFilter();
|
||||
await when.deleteFilterItem();
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, filter: ["all", ["==", "name", ""]] }],
|
||||
});
|
||||
});
|
||||
|
||||
describe("when converted to an expression", () => {
|
||||
beforeEach(async () => {
|
||||
await when.convertFilterToExpression();
|
||||
});
|
||||
|
||||
test("should migrate the filter to an expression", async () => {
|
||||
// A single-item "all" collapses to the bare comparison when migrated.
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, filter: ["==", ["get", "name"], ""] }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should restore the default filter when the expression is deleted", async () => {
|
||||
await when.deleteFilterExpression();
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, filter: ["all"] }],
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("functions", () => {
|
||||
let id: string;
|
||||
|
||||
describe("zoom function", () => {
|
||||
beforeEach(async () => {
|
||||
id = await when.modal.fillLayers({ type: "circle", layer: "example" });
|
||||
await when.makeZoomFunction("circle-radius");
|
||||
});
|
||||
|
||||
test("should convert the property to a zoom function", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{ id, type: "circle", source: "example", paint: { "circle-radius": { stops: [[6, 5], [10, 5]] } } },
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("should add a stop", async () => {
|
||||
await when.addFunctionStop("circle-radius");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-radius": { stops: [[6, 5], [10, 5], [11, 5]] } } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should delete the first stop", async () => {
|
||||
// A function needs more than two stops, otherwise deleting one collapses
|
||||
// it back into a plain value.
|
||||
await when.addFunctionStop("circle-radius");
|
||||
await when.deleteFunctionStop("circle-radius");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-radius": { stops: [[10, 5], [11, 5]] } } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should leave a plain editable value after deleting a stop", async () => {
|
||||
await when.setFunctionStopValue("circle-radius", "Output value", 1, "0");
|
||||
await when.deleteFunctionStop("circle-radius");
|
||||
await then(get.elementByTestId("spec-field:circle-radius")).shouldBeVisible();
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-radius": 0 } }],
|
||||
});
|
||||
|
||||
await when.setValue("spec-field-input:circle-radius", "7");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-radius": 7 } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should set the base", async () => {
|
||||
await when.setFunctionBase("circle-radius", "2");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-radius": { base: 2, stops: [[6, 5], [10, 5]] } } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should edit the zoom of a stop", async () => {
|
||||
await when.setFunctionStopValue("circle-radius", "Zoom", 0, "3");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-radius": { stops: [[3, 5], [10, 5]] } } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should edit the output value of a stop", async () => {
|
||||
await when.setFunctionStopValue("circle-radius", "Output value", 0, "9");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-radius": { stops: [[6, 9], [10, 5]] } } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should convert to an expression without crashing", async () => {
|
||||
await when.makeExpression("circle-radius");
|
||||
await then(get.element("[data-wd-key='spec-field-container:circle-radius'] .maputnik-expression-editor")).shouldBeVisible();
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-radius": ["interpolate", ["linear"], ["zoom"], 6, 5, 10, 5] } }],
|
||||
});
|
||||
});
|
||||
|
||||
describe("when converted to a data function", () => {
|
||||
beforeEach(async () => {
|
||||
// Any non-interpolate scale turns the zoom function into a data one.
|
||||
await when.selectFunctionType("circle-radius", "categorical");
|
||||
});
|
||||
|
||||
test("should carry the stops over as zoom/value pairs", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{
|
||||
id,
|
||||
paint: {
|
||||
"circle-radius": {
|
||||
property: "",
|
||||
type: "exponential",
|
||||
stops: [[{ zoom: 6, value: 0 }, 5], [{ zoom: 10, value: 0 }, 5]],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("should convert back to a zoom function", async () => {
|
||||
await when.selectFunctionType("circle-radius", "interpolate");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-radius": { stops: [[6, 5], [10, 5]] } } }],
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("data function", () => {
|
||||
beforeEach(async () => {
|
||||
id = await when.modal.fillLayers({ type: "circle", layer: "example" });
|
||||
await when.setValue("spec-field-input:circle-blur", "1");
|
||||
await when.makeDataFunction("circle-blur");
|
||||
});
|
||||
|
||||
test("should convert the property to a data function", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{
|
||||
id,
|
||||
type: "circle",
|
||||
source: "example",
|
||||
paint: {
|
||||
"circle-blur": {
|
||||
property: "",
|
||||
type: "exponential",
|
||||
stops: [[{ zoom: 6, value: 0 }, 1], [{ zoom: 10, value: 0 }, 1]],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("should add a stop", async () => {
|
||||
await when.addFunctionStop("circle-blur");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{
|
||||
id,
|
||||
paint: {
|
||||
"circle-blur": {
|
||||
stops: [[{ zoom: 6, value: 0 }, 1], [{ zoom: 10, value: 0 }, 1], [{ zoom: 11, value: 0 }, 1]],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("should delete the first stop", async () => {
|
||||
await when.addFunctionStop("circle-blur");
|
||||
await when.deleteFunctionStop("circle-blur");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{
|
||||
id,
|
||||
paint: {
|
||||
"circle-blur": {
|
||||
stops: [[{ zoom: 10, value: 0 }, 1], [{ zoom: 11, value: 0 }, 1]],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("should set the property", async () => {
|
||||
await when.setFunctionProperty("circle-blur", "myprop");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-blur": { property: "myprop" } } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should set the default", async () => {
|
||||
await when.setFunctionDefault("circle-blur", "0.5");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-blur": { default: 0.5 } } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should edit the input value of a stop", async () => {
|
||||
await when.setFunctionStopValue("circle-blur", "Input value", 0, "7");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{
|
||||
id,
|
||||
paint: {
|
||||
"circle-blur": {
|
||||
stops: [[{ zoom: 6, value: 7 }, 1], [{ zoom: 10, value: 0 }, 1]],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("should change the function type", async () => {
|
||||
await when.selectFunctionType("circle-blur", "categorical");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-blur": { type: "categorical" } } }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("expression", () => {
|
||||
beforeEach(async () => {
|
||||
id = await when.modal.fillLayers({ type: "circle", layer: "example" });
|
||||
await when.setValue("spec-field-input:circle-blur", "1");
|
||||
await when.makeExpression("circle-blur");
|
||||
});
|
||||
|
||||
test("should wrap the property value in a literal expression", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-blur": ["literal", 1] } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should restore the plain value when reverted", async () => {
|
||||
await when.undoExpression("circle-blur");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-blur": 1 } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should fall back to the spec default when deleted", async () => {
|
||||
await when.deleteExpression("circle-blur");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, paint: { "circle-blur": 0 } }],
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("layout", () => {
|
||||
test("text-font", async () => {
|
||||
await when.setStyle("font");
|
||||
await when.collapseGroupInLayerEditor();
|
||||
await when.collapseGroupInLayerEditor(1);
|
||||
await when.collapseGroupInLayerEditor(2);
|
||||
await when.clickWithin("spec-field:text-font", ".maputnik-autocomplete input");
|
||||
await then(get.element(".maputnik-autocomplete-menu-item")).shouldBeVisible();
|
||||
await then(get.element(".maputnik-autocomplete-menu-item")).shouldHaveLength(3);
|
||||
});
|
||||
});
|
||||
|
||||
describe("paint", () => {
|
||||
let id: string;
|
||||
|
||||
beforeEach(async () => {
|
||||
id = await when.modal.fillLayers({ type: "fill", layer: "example" });
|
||||
});
|
||||
|
||||
test("expand/collapse", async () => {
|
||||
await then(get.elementByTestId("spec-field:fill-color")).shouldBeVisible();
|
||||
|
||||
await when.toggleGroupInLayerEditor("Paint properties");
|
||||
await then(get.elementByTestId("spec-field:fill-color")).shouldNotBeVisible();
|
||||
|
||||
await when.toggleGroupInLayerEditor("Paint properties");
|
||||
await then(get.elementByTestId("spec-field:fill-color")).shouldBeVisible();
|
||||
});
|
||||
|
||||
test("color", async () => {
|
||||
await when.setColorValue("fill-color", "#ff0000");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "fill", source: "example", paint: { "fill-color": "#ff0000" } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("pattern", async () => {
|
||||
await when.setStringValue("fill-pattern", "some-pattern");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "fill", source: "example", paint: { "fill-pattern": "some-pattern" } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("opacity", async () => {
|
||||
await when.setValue("spec-field-input:fill-opacity", "0.4");
|
||||
await when.click("layer-editor.layer-id");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "fill", source: "example", paint: { "fill-opacity": 0.4 } }],
|
||||
});
|
||||
});
|
||||
|
||||
test("antialias is checked when unset, as it defaults to true", async () => {
|
||||
await then(get.element("[data-wd-key='spec-field:fill-antialias'] input")).shouldBeChecked();
|
||||
});
|
||||
|
||||
test("unchecking antialias sets it to false", async () => {
|
||||
await when.clickWithin("spec-field:fill-antialias", "input");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "fill", source: "example", paint: { "fill-antialias": false } }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("json-editor", () => {
|
||||
test("add", async () => {
|
||||
const id = await when.modal.fillLayers({
|
||||
type: "circle",
|
||||
layer: "example",
|
||||
});
|
||||
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "circle", source: "example" }],
|
||||
});
|
||||
|
||||
await when.clickByText('"source"');
|
||||
await when.typeKeys('"');
|
||||
|
||||
await then(get.element(".cm-lint-marker-error")).shouldExist();
|
||||
});
|
||||
|
||||
test("expand/collapse", async () => {
|
||||
const bgId = await createBackground();
|
||||
await when.click("layer-list-item:background:" + bgId);
|
||||
|
||||
await then(get.element(".cm-content")).shouldBeVisible();
|
||||
|
||||
await when.toggleGroupInLayerEditor("JSON Editor");
|
||||
await then(get.element(".cm-content")).shouldNotBeVisible();
|
||||
|
||||
await when.toggleGroupInLayerEditor("JSON Editor");
|
||||
await then(get.element(".cm-content")).shouldBeVisible();
|
||||
});
|
||||
|
||||
test("modify", async () => {
|
||||
const bgId = await createBackground();
|
||||
await when.click("layer-list-item:background:" + bgId);
|
||||
|
||||
await when.appendToJsonEditorLine('"background"', ',\n"minzoom": 5');
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id: "background:" + bgId, type: "background", minzoom: 5 }],
|
||||
});
|
||||
});
|
||||
|
||||
test("parse error", async () => {
|
||||
const bgId = await createBackground();
|
||||
|
||||
await when.click("layer-list-item:background:" + bgId);
|
||||
await when.collapseGroupInLayerEditor();
|
||||
await when.collapseGroupInLayerEditor(1);
|
||||
await then(get.element(".cm-lint-marker-error")).shouldNotExist();
|
||||
|
||||
// Inject an invalid token (CodeMirror auto-closes brackets/quotes, so a
|
||||
// bare word reliably breaks the JSON) and expect a lint error.
|
||||
await when.appendTextInJsonEditor("zzz");
|
||||
await then(get.element(".cm-lint-marker-error")).shouldExist();
|
||||
});
|
||||
});
|
||||
|
||||
describe("sticky header", () => {
|
||||
test("should keep layer header visible when scrolling properties", async () => {
|
||||
// Setup: Create a layer with many properties (e.g. symbol layer)
|
||||
await when.modal.fillLayers({
|
||||
type: "symbol",
|
||||
layer: "example",
|
||||
});
|
||||
|
||||
await when.wait(500);
|
||||
const header = get.elementByTestId("layer-editor.header");
|
||||
await then(header).shouldBeVisible();
|
||||
|
||||
await when.scrollToBottom(get.element(".maputnik-scroll-container"));
|
||||
await when.wait(200);
|
||||
|
||||
await then(header).shouldBeVisible();
|
||||
await then(get.elementByTestId("skip-target-layer-editor")).shouldBeVisible();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,441 +0,0 @@
|
||||
import { beforeEach, describe, expect, test } from "./utils/fixtures";
|
||||
import { MaputnikDriver } from "./maputnik-driver";
|
||||
|
||||
describe("layers list", () => {
|
||||
const { given, get, when, then } = new MaputnikDriver();
|
||||
|
||||
beforeEach(async () => {
|
||||
await given.setupMockBackedResponses();
|
||||
await when.setStyle("both");
|
||||
await when.modal.open();
|
||||
});
|
||||
|
||||
describe("ops", () => {
|
||||
let id: string;
|
||||
beforeEach(async () => {
|
||||
id = await when.modal.fillLayers({ type: "background" });
|
||||
});
|
||||
|
||||
test("should update layers in local storage", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "background" }],
|
||||
});
|
||||
});
|
||||
|
||||
describe("when clicking delete", () => {
|
||||
beforeEach(async () => {
|
||||
await when.click("layer-list-item:" + id + ":delete");
|
||||
});
|
||||
test("should empty layers in local storage", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("when clicking duplicate", () => {
|
||||
beforeEach(async () => {
|
||||
await when.click("layer-list-item:" + id + ":copy");
|
||||
});
|
||||
test("should add copy layer in local storage", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{ id: id + "-copy", type: "background" },
|
||||
{ id, type: "background" },
|
||||
],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test("should title the visibility button with the action it performs", async () => {
|
||||
const key = "layer-list-item:" + id + ":toggle-visibility";
|
||||
// A visible layer is about to be hidden, and a hidden one to be shown.
|
||||
await expect(get.elementByTestId(key)).toHaveAttribute("title", "hide");
|
||||
await when.click(key);
|
||||
await expect(get.elementByTestId(key)).toHaveAttribute("title", "show");
|
||||
});
|
||||
|
||||
describe("when clicking hide", () => {
|
||||
beforeEach(async () => {
|
||||
await when.click("layer-list-item:" + id + ":toggle-visibility");
|
||||
});
|
||||
|
||||
test("should update visibility to none in local storage", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "background", layout: { visibility: "none" } }],
|
||||
});
|
||||
});
|
||||
|
||||
describe("when clicking show", () => {
|
||||
beforeEach(async () => {
|
||||
await when.click("layer-list-item:" + id + ":toggle-visibility");
|
||||
});
|
||||
|
||||
test("should update visibility to visible in local storage", async () => {
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "background", layout: { visibility: "visible" } }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("when selecting a layer", () => {
|
||||
let secondId: string;
|
||||
beforeEach(async () => {
|
||||
await when.modal.open();
|
||||
secondId = await when.modal.fillLayers({
|
||||
id: "second-layer",
|
||||
type: "background",
|
||||
});
|
||||
});
|
||||
test("should show the selected layer in the editor", async () => {
|
||||
await when.realClick("layer-list-item:" + secondId);
|
||||
await then(get.elementByTestId("layer-editor.layer-id.input")).shouldHaveValue(secondId);
|
||||
await when.realClick("layer-list-item:" + id);
|
||||
await then(get.elementByTestId("layer-editor.layer-id.input")).shouldHaveValue(id);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("background", () => {
|
||||
test("add", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "background" });
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "background" }],
|
||||
});
|
||||
});
|
||||
|
||||
test("modify", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "background" });
|
||||
await when.click("layer-list-item:" + id);
|
||||
await when.setValue("spec-field-input:background-opacity", "0.4");
|
||||
await when.click("layer-editor.layer-id");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "background", paint: { "background-opacity": 0.4 } }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("fill", () => {
|
||||
test("add", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "fill", layer: "example" });
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "fill", source: "example" }],
|
||||
});
|
||||
});
|
||||
|
||||
test("change source", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "fill", layer: "example" });
|
||||
await when.changeLayerSource("raster");
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "fill", source: "raster" }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("line", () => {
|
||||
test("add", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "line", layer: "example" });
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "line", source: "example" }],
|
||||
});
|
||||
});
|
||||
|
||||
test("groups", async () => {
|
||||
const id1 = await when.modal.fillLayers({ id: "aa", type: "line", layer: "example" });
|
||||
|
||||
await when.modal.open();
|
||||
const id2 = await when.modal.fillLayers({ id: "aa-2", type: "line", layer: "example" });
|
||||
|
||||
await when.modal.open();
|
||||
const id3 = await when.modal.fillLayers({ id: "b", type: "line", layer: "example" });
|
||||
|
||||
await then(get.elementByTestId("layer-list-item:" + id1)).shouldBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:" + id2)).shouldNotBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:" + id3)).shouldBeVisible();
|
||||
await when.click("layer-list-group:aa-0");
|
||||
await then(get.elementByTestId("layer-list-item:" + id1)).shouldBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:" + id2)).shouldBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:" + id3)).shouldBeVisible();
|
||||
await when.click("layer-list-item:" + id2);
|
||||
await when.click("skip-target-layer-editor");
|
||||
await when.click("menu-move-layer-down");
|
||||
await then(get.elementByTestId("layer-list-group:aa-0")).shouldNotExist();
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{ id: "aa", type: "line", source: "example" },
|
||||
{ id: "b", type: "line", source: "example" },
|
||||
{ id: "aa-2", type: "line", source: "example" },
|
||||
],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("symbol", () => {
|
||||
test("add", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "symbol", layer: "example" });
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "symbol", source: "example" }],
|
||||
});
|
||||
});
|
||||
|
||||
test("should show spec info when hovering and clicking single line property", async () => {
|
||||
await when.modal.fillLayers({ type: "symbol", layer: "example" });
|
||||
|
||||
await when.hover("spec-field-container:text-rotate");
|
||||
await then(get.elementByTestId("field-doc-button-Rotate")).shouldBeVisible();
|
||||
await when.click("field-doc-button-Rotate", 0);
|
||||
await then(get.elementByTestId("spec-field-doc")).shouldContainText("Rotates the ");
|
||||
});
|
||||
|
||||
test("should show spec info when hovering and clicking multi line property", async () => {
|
||||
await when.modal.fillLayers({ type: "symbol", layer: "example" });
|
||||
|
||||
await when.hover("spec-field-container:text-offset");
|
||||
await then(get.elementByTestId("field-doc-button-Offset")).shouldBeVisible();
|
||||
await when.click("field-doc-button-Offset", 0);
|
||||
await then(get.elementByTestId("spec-field-doc")).shouldContainText("Offset distance");
|
||||
});
|
||||
|
||||
test("should hide spec info when clicking a second time", async () => {
|
||||
await when.modal.fillLayers({ type: "symbol", layer: "example" });
|
||||
|
||||
await when.hover("spec-field-container:text-rotate");
|
||||
await then(get.elementByTestId("field-doc-button-Rotate")).shouldBeVisible();
|
||||
await when.click("field-doc-button-Rotate", 0);
|
||||
await when.wait(200);
|
||||
await when.click("field-doc-button-Rotate", 0);
|
||||
await then(get.elementByTestId("spec-field-doc")).shouldNotBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
describe("raster", () => {
|
||||
test("add", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "raster", layer: "raster" });
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "raster", source: "raster" }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("circle", () => {
|
||||
test("add", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "circle", layer: "example" });
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "circle", source: "example" }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("fill extrusion", () => {
|
||||
test("add", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "fill-extrusion", layer: "example" });
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "fill-extrusion", source: "example" }],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("hillshade", () => {
|
||||
test("add", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "hillshade", layer: "example" });
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "hillshade", source: "example" }],
|
||||
});
|
||||
});
|
||||
|
||||
test("set hillshade illumination direction array", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "hillshade", layer: "example" });
|
||||
await when.collapseGroupInLayerEditor();
|
||||
await when.collapseGroupInLayerEditor(1);
|
||||
await when.setValueToPropertyArray("spec-field:hillshade-illumination-direction", "1");
|
||||
await when.addValueToPropertyArray("spec-field:hillshade-illumination-direction", "2");
|
||||
await when.addValueToPropertyArray("spec-field:hillshade-illumination-direction", "3");
|
||||
await when.addValueToPropertyArray("spec-field:hillshade-illumination-direction", "4");
|
||||
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{
|
||||
id,
|
||||
type: "hillshade",
|
||||
source: "example",
|
||||
paint: { "hillshade-illumination-direction": [1, 2, 3, 4] },
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
test("set hillshade highlight color array", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "hillshade", layer: "example" });
|
||||
await when.collapseGroupInLayerEditor();
|
||||
await when.setValueToPropertyArray("spec-field:hillshade-highlight-color", "blue");
|
||||
await when.addValueToPropertyArray("spec-field:hillshade-highlight-color", "#00ff00");
|
||||
await when.addValueToPropertyArray("spec-field:hillshade-highlight-color", "rgba(255, 255, 0, 1)");
|
||||
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{
|
||||
id,
|
||||
type: "hillshade",
|
||||
source: "example",
|
||||
paint: {
|
||||
"hillshade-highlight-color": ["blue", "#00ff00", "rgba(255, 255, 0, 1)"],
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("color-relief", () => {
|
||||
test("add", async () => {
|
||||
const id = await when.modal.fillLayers({ type: "color-relief", layer: "example" });
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [{ id, type: "color-relief", source: "example" }],
|
||||
});
|
||||
});
|
||||
|
||||
test("adds elevation expression when clicking the elevation button", async () => {
|
||||
await when.modal.fillLayers({ type: "color-relief", layer: "example" });
|
||||
await when.collapseGroupInLayerEditor();
|
||||
await when.click("make-elevation-function");
|
||||
await then(
|
||||
get.element("[data-wd-key='spec-field-container:color-relief-color'] .cm-line")
|
||||
).shouldBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
describe("groups", () => {
|
||||
for (const control of ["menu", "trash"] as const) {
|
||||
describe(`after deletion using ${control}`, () => {
|
||||
beforeEach(async () => {
|
||||
await when.setStyle("grouped_layers");
|
||||
});
|
||||
|
||||
test("keeps all groups expanded when an earlier layer is deleted", async () => {
|
||||
await when.click("skip-target-layer-list");
|
||||
await then(get.elementByTestId("layer-list-item:park-b")).shouldBeVisible();
|
||||
await when.deleteLayer("background", control);
|
||||
await then(get.elementByTestId("layer-list-item:background")).shouldNotExist();
|
||||
await then(get.elementByTestId("layer-list-group:park-0")).shouldExist();
|
||||
await expect(get.elementByTestId("layer-list-group:water-6").getByRole("button")).toHaveAttribute("aria-expanded", "true");
|
||||
await then(get.elementByTestId("layer-list-item:park-b")).shouldBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:park-e")).shouldBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:water-b")).shouldBeVisible();
|
||||
});
|
||||
|
||||
test("preserves separate states for groups with the same prefix", async () => {
|
||||
await when.click("layer-list-group:park-1");
|
||||
await when.deleteLayer("background", control);
|
||||
await then(get.elementByTestId("layer-list-group:park-0")).shouldExist();
|
||||
await when.click("layer-list-item:road");
|
||||
await expect(get.elementByTestId("layer-list-group:park-0").getByRole("button")).toHaveAttribute("aria-expanded", "true");
|
||||
await expect(get.elementByTestId("layer-list-group:park-4").getByRole("button")).toHaveAttribute("aria-expanded", "false");
|
||||
await then(get.elementByTestId("layer-list-item:park-b")).shouldBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:park-e")).shouldNotBeVisible();
|
||||
});
|
||||
|
||||
test("keeps a group expanded when its first layer is deleted", async () => {
|
||||
await when.click("layer-list-group:park-1");
|
||||
await when.deleteLayer("park-a", control);
|
||||
await then(get.elementByTestId("layer-list-item:park-a")).shouldNotExist();
|
||||
await when.click("layer-list-item:road");
|
||||
await expect(get.elementByTestId("layer-list-group:park-1").getByRole("button")).toHaveAttribute("aria-expanded", "true");
|
||||
await then(get.elementByTestId("layer-list-item:park-c")).shouldBeVisible();
|
||||
});
|
||||
|
||||
for (const expandedGroup of ["park-1", "park-5"]) {
|
||||
test(`keeps a merged group expanded when ${expandedGroup} was expanded`, async () => {
|
||||
await when.click("layer-list-group:" + expandedGroup);
|
||||
await when.deleteLayer("road", control);
|
||||
await then(get.elementByTestId("layer-list-item:road")).shouldNotExist();
|
||||
await expect(get.elementByTestId("layer-list-group:park-1").getByRole("button")).toHaveAttribute("aria-expanded", "true");
|
||||
await then(get.elementByTestId("layer-list-item:park-b")).shouldBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:park-e")).shouldBeVisible();
|
||||
});
|
||||
}
|
||||
|
||||
test("keeps a merged group collapsed when both groups were collapsed", async () => {
|
||||
await when.deleteLayer("road", control);
|
||||
await then(get.elementByTestId("layer-list-item:road")).shouldNotExist();
|
||||
await when.click("layer-list-item:background");
|
||||
await expect(get.elementByTestId("layer-list-group:park-1").getByRole("button")).toHaveAttribute("aria-expanded", "false");
|
||||
await then(get.elementByTestId("layer-list-item:park-b")).shouldNotBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:park-e")).shouldNotBeVisible();
|
||||
});
|
||||
|
||||
test("preserves later groups after deleting an entire group", async () => {
|
||||
await when.click("skip-target-layer-list");
|
||||
await when.deleteLayer("park-a", control);
|
||||
await when.deleteLayer("park-b", control);
|
||||
await when.deleteLayer("park-c", control);
|
||||
await expect(get.elementByTestId("layer-list-group:water-4").getByRole("button")).toHaveAttribute("aria-expanded", "true");
|
||||
await then(get.elementByTestId("layer-list-item:water-b")).shouldBeVisible();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
test("simple", async () => {
|
||||
await when.setStyle("geojson");
|
||||
|
||||
await when.modal.open();
|
||||
await when.modal.fillLayers({ id: "foo", type: "background" });
|
||||
|
||||
await when.modal.open();
|
||||
await when.modal.fillLayers({ id: "foo_bar", type: "background" });
|
||||
|
||||
await when.modal.open();
|
||||
await when.modal.fillLayers({ id: "foo_bar_baz", type: "background" });
|
||||
|
||||
await then(get.elementByTestId("layer-list-item:foo")).shouldBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:foo_bar")).shouldNotBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:foo_bar_baz")).shouldNotBeVisible();
|
||||
await when.click("layer-list-group:foo-0");
|
||||
await then(get.elementByTestId("layer-list-item:foo")).shouldBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:foo_bar")).shouldBeVisible();
|
||||
await then(get.elementByTestId("layer-list-item:foo_bar_baz")).shouldBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
describe("drag and drop", () => {
|
||||
test("move layer should update local storage", async () => {
|
||||
const firstId = await when.modal.fillLayers({ id: "a", type: "background" });
|
||||
await when.modal.open();
|
||||
const secondId = await when.modal.fillLayers({ id: "b", type: "background" });
|
||||
await when.modal.open();
|
||||
const thirdId = await when.modal.fillLayers({ id: "c", type: "background" });
|
||||
|
||||
await when.dragAndDropWithWait("layer-list-item:" + firstId, "layer-list-item:" + thirdId);
|
||||
|
||||
await then(get.styleFromLocalStorage()).shouldDeepNestedInclude({
|
||||
layers: [
|
||||
{ id: secondId, type: "background" },
|
||||
{ id: thirdId, type: "background" },
|
||||
{ id: firstId, type: "background" },
|
||||
],
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("sticky header", () => {
|
||||
test("should keep header visible when scrolling layer list", async () => {
|
||||
// Setup: Create multiple layers to enable scrolling
|
||||
// The modal is already open (beforeEach) for the first layer.
|
||||
await when.modal.fillLayers({ id: "layer-0", type: "background" });
|
||||
for (let i = 1; i < 20; i++) {
|
||||
await when.modal.open();
|
||||
await when.modal.fillLayers({ id: `layer-${i}`, type: "background" });
|
||||
}
|
||||
|
||||
await when.wait(500);
|
||||
const header = get.elementByTestId("layer-list.header");
|
||||
await then(header).shouldBeVisible();
|
||||
|
||||
// Scroll the layer list container
|
||||
await when.scrollToBottom(get.elementByTestId("layer-list"));
|
||||
await when.wait(200);
|
||||
await then(header).shouldBeVisible();
|
||||
await then(get.elementByTestId("layer-list:add-layer")).shouldBeVisible();
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -1,67 +0,0 @@
|
||||
import { beforeEach, describe, test } from "./utils/fixtures";
|
||||
import { MaputnikDriver } from "./maputnik-driver";
|
||||
|
||||
describe("map", () => {
|
||||
const { given, get, when, then } = new MaputnikDriver();
|
||||
|
||||
beforeEach(async () => {
|
||||
await given.setupMockBackedResponses();
|
||||
await when.setStyle("both");
|
||||
});
|
||||
|
||||
describe("zoom level", () => {
|
||||
test("via url", async () => {
|
||||
const zoomLevel = 12.37;
|
||||
await when.setStyle("geojson", zoomLevel);
|
||||
await then(get.elementByTestId("maplibre:ctrl-zoom")).shouldBeVisible();
|
||||
await then(get.elementByTestId("maplibre:ctrl-zoom")).shouldContainText("Zoom: " + zoomLevel);
|
||||
});
|
||||
|
||||
test("via map controls", async () => {
|
||||
const zoomLevel = 12.37;
|
||||
await when.setStyle("geojson", zoomLevel);
|
||||
await then(get.elementByTestId("maplibre:ctrl-zoom")).shouldBeVisible();
|
||||
await when.clickZoomIn();
|
||||
await then(get.elementByTestId("maplibre:ctrl-zoom")).shouldContainText("Zoom: " + (zoomLevel + 1));
|
||||
});
|
||||
|
||||
test("via style file definition", async () => {
|
||||
await when.setStyle("zoom_7_center_0_51");
|
||||
await then(get.elementByTestId("maplibre:ctrl-zoom")).shouldBeVisible();
|
||||
await then(get.elementByTestId("maplibre:ctrl-zoom")).shouldContainText("Zoom: " + 7);
|
||||
await then(get.locationHash()).shouldInclude("#7/51/0");
|
||||
|
||||
// opening another stylefile does not update the map view again
|
||||
// as discussed in https://github.com/maplibre/maputnik/issues/1546
|
||||
await when.openASecondStyleWithDifferentZoomAndCenter();
|
||||
await then(get.locationHash()).shouldInclude("#7/51/0");
|
||||
});
|
||||
});
|
||||
|
||||
describe("search", () => {
|
||||
test("should exist", async () => {
|
||||
await then(get.searchControl()).shouldBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
describe("popup", () => {
|
||||
beforeEach(async () => {
|
||||
await when.setStyle("rectangles");
|
||||
await then(get.locationHash()).shouldExist();
|
||||
});
|
||||
|
||||
test("should open on feature click", async () => {
|
||||
await when.clickCenter("maplibre:map");
|
||||
await then(get.elementByTestId("feature-layer-popup")).shouldBeVisible();
|
||||
});
|
||||
|
||||
test("should open a second feature after closing popup", async () => {
|
||||
await when.clickCenter("maplibre:map");
|
||||
await then(get.elementByTestId("feature-layer-popup")).shouldBeVisible();
|
||||
await when.closePopup();
|
||||
await then(get.elementByTestId("feature-layer-popup")).shouldNotExist();
|
||||
await when.clickCenter("maplibre:map");
|
||||
await then(get.elementByTestId("feature-layer-popup")).shouldBeVisible();
|
||||
});
|
||||
});
|
||||
});
|
||||
Loaded 100 of 277 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user