Commit graph

67 commits

Author SHA1 Message Date
Miko
f02c63c94c
Fix broken light (invalid use of heavy dependencies) (#1449)
* fix broken light (invalid use of heavy dependencies)
- move elevation calculation to serve_rendered and stub in serve_light due to use of canvas and sharp
- elevation api is not available for light

* add elevatppy lint:js:fix

* remove not working isLight function

* apply lint:js:fix

* add isLight to data.tmpl

* add note of not available elevation api in light version

* hide elevation link in light version

* cleanup terrain and elevation template flags

---------

Co-authored-by: Miko <miko@none>
2025-01-17 18:51:35 -05:00
Miko
4a783446cd
Fix Elevation API and extend Elevation Preview (#1432)
* add elevation info in preview

* fix various issues
- pmtile coordinates
- pixel calculation
- swapped lat / long
- allow tileSize to be configured
- allow any zoom for coordinates

* apply linter changes

* remove not used entry

* drop baseUrl in favor of public_url

* fix map not using full body

* remove bounds check for coordinates

---------

Co-authored-by: Miko <miko@none>
2025-01-10 10:51:17 -05:00
Miko
a2bc9f0cce
Feature: Terrain Preview and simple Elevation Query (#1425)
* add terrain preview and elevation link

* add elevation api for terrain tiles

* add documentation for elevation api

* applied lint:js:fix

* Add `test-docker` for test execution in docker build environment

* Fix too greedy router expression

* Add pmtile support

Co-authored-by: Andrew Calcutt <acalcutt@techidiots.net>

* add encoding param to pmtile section

* add map controls

Co-authored-by: Andrew Calcutt <acalcutt@techidiots.net>

* remove not needed check

* fix possible float usage in thumbnail url

* update readme for encoding option

* add better link name

---------

Co-authored-by: Miko <miko@none>
Co-authored-by: Andrew Calcutt <acalcutt@techidiots.net>
2025-01-02 14:03:03 -05:00
Martijn van Exel
5cb00470c7
feat: simple typeahead search (#1335)
* feat: simple typeahead search

Signed-off-by: Martijn van Exel <m@rtijn.org>

* Update public/templates/index.tmpl

Co-authored-by: Aarni Koskela <akx@iki.fi>

* Update public/templates/index.tmpl

Co-authored-by: Aarni Koskela <akx@iki.fi>

* Update public/templates/index.tmpl

Co-authored-by: Aarni Koskela <akx@iki.fi>

* fix: clean up styling, use data attrs

Signed-off-by: Martijn van Exel <m@rtijn.org>

---------

Signed-off-by: Martijn van Exel <m@rtijn.org>
Co-authored-by: Aarni Koskela <akx@iki.fi>
Co-authored-by: Andrew Calcutt <acalcutt@techidiots.net>
2024-08-09 15:14:12 -04:00
Andrew Calcutt
366f71ca44
Update to MapLibre-GL-JS v4.1.3 and Maplibre-GL-Inspect v1.6.3 (#1233)
* chore: update inspect to maplibre version 1.6.3

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* chore: update maplibre-js to 4.1.3

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

---------

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2024-04-23 14:59:53 -04:00
Andrew Calcutt
4a999e06a3
Fix 512px tiles so they work with maplibre-js raster 512 tilesize (#1152)
* fix: try to add attribution to wmts

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: 512 tiles being wrong level for maplibre-js

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: revert wmts zoom level hack

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: test tileMargin

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: remove broken mercator_512 change

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: put back mercator

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* Revert "fix: try to add attribution to wmts"

This reverts commit b8d858f2c6d6354ea54a7fe18d08bb50d8f28219.

* fix: put back if

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: semicolon

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: semicolon

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: lint

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: center without mercator_512

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: put back const

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: lint

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: text

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

---------

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2024-01-29 20:54:05 -05:00
Andrew Calcutt
26d8066cdc fix: wmts urls
Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2024-01-26 21:07:54 -05:00
Andrew Calcutt
e1738cc107
Fix WMTS endpoint issues after 512px tile PR (#1149)
* fix: get wmts tiles to load properly

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* chore: update version to 4.9.1

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

---------

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2024-01-26 20:46:04 -05:00
Andrew Calcutt
d68ab38442
Add support for 512 sized raster tiles - v2 (#1136)
* test: using 512px rendered tiles

Based on https://github.com/maptiler/tileserver-gl/pull/495

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: use static renderer at zoom 0

renderer is not able to change the size of tile to more than 512px in tile mode

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* Add support for 512 sized raster tiles (#1)

* Enable setting tilesize for raster tiles

* Serve correct endpoint for raster tiles

* Add 256 & 512 sized raster layers to wmts getCapabilities document

* Update wmts getCapabilities tileMatrixSets

* Add rendered tiles format for getTileUrls method

* Update endpoints documentation

* Add and fix tiles_rendered tests

* fix: formatting

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: corrent bad merge

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: if tile size is undefined don't add it

needed for data endpoint right now

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: set tile size in raster endpoints to 512

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: add semicolon

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: lint

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: test z1 512px file that actually exists

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: make tileSize optional

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: cleaner if statement

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* docs: update tileSize to show as optional

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: allow tile size in data url

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: remove unneeded tileSize

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: set data as 256 tileSize for consistency

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* docs: add note about optional data tileSize

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: lint

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* Revert "fix: remove unneeded tileSize"

This reverts commit a4583161bf53653d65a4606c407ba9b5249d1061.

* fix: allow tile size to be set at json endpoints

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: set default endpoint tilesizes

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: don't use tilesize one data endpoint

It doesn't do anything

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: default style endpoint to undefined

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: zoom 0 workaround

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* Revert "fix: zoom 0 workaround"

This reverts commit 0f3bbd765c9c151016cec66768675f990676c8b3.

* fix: limit min zoom to 1 in viewer

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: put back orig string

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* docs: add optional tilesize to TileJSON

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: cleanup thumbnails

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: default undefined like other data endpoints

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: move data xyz_link

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: remove console.log

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: lint

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* chore: update version

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: update path

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: join error

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: revert path change

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

---------

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
Co-authored-by: Petteri Pesonen <teemu.p.pesonen@gmail.com>
2024-01-25 21:23:07 -05:00
Andrew Calcutt
3c228f4562
Update to Leaflet 1.9.4, remove L.TileLayer.NoGap.js (#1070)
* feat: update leaflet to 1.9.4

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

* fix: add marker images from leaflet package

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>

---------

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
2023-12-01 09:34:45 -05:00
Martin d'Allens
36d3e9d356 chore: apply camelCase to function and variable names
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
2023-11-23 17:08:32 +01:00
Martin d'Allens
d7af5235bf
fix: clean error message, remove outdated data wmts (#1067)
Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
2023-11-21 16:23:53 -05:00
Andrew Calcutt
a6dadfda28
Add pmtiles support (#1009)
Adds pmtiles support to TileServer-GL

Signed-off-by: Andrew Calcutt <acalcutt@techidiots.net>
Signed-off-by: Michael Nutt <michael@nuttnet.net>
Co-authored-by: Michael Nutt <michael@nuttnet.net>
2023-10-15 03:03:15 -04:00
Andrew Calcutt
9129a62245
Update maplibre-gl-js to 3.3.0 / increase default max pitch (#953)
* Update maplibre-gl-js to 3.3.0

* raise maxPitch to 85

* replace maplibregl.supported, that's removed in v3

Use the new example code from https://maplibre.org/maplibre-gl-js/docs/examples/check-for-support/

* remove unneeded note
2023-08-12 17:57:51 -04:00
Andrew Calcutt
b0af3aee27
Remove IE support (#722)
* Remove IE support
2023-08-12 01:18:42 -04:00
Andrew Calcutt
47856340ed
Update maplibre-gl-inspect to v1.4.6 (#753)
* maplibre-gl-inspect v1.4.6

https://github.com/acalcutt/maplibre-gl-inspect/releases/tag/v1.4.6

* add inspect toggle callback

* fix inconsistent indents

* Revert "add inspect toggle callback"

This reverts commit 3acbbb602b6eed29dfa5c592b6c848b1d19d03bb.
2023-03-09 21:27:38 -05:00
Vinayak Kulkarni
0519ee7535
fix: add key_query to static assets 🎉 (#730)
* fix: add `key_query` to static assets

Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>

* style: fix lint issues in css

Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>

* fix: issue with static images in `leaflet.css`

Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>

Signed-off-by: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com>
2023-01-25 09:23:02 -05:00
Michael Nutt
78c17773db
Fix xss due to handlebars variables in javascript (#535)
* fix xss due to handlebars variables in javascript

* fix: update data viewer against XSS

Signed-off-by: Michael Nutt <michael@nuttnet.net>

* fix: remove key_query from all static assets to prevent XSS

Signed-off-by: Michael Nutt <michael@nuttnet.net>

Signed-off-by: Michael Nutt <michael@nuttnet.net>
2023-01-19 00:12:31 -05:00
Monstrofil
38604c0a45
Bugfix: publicUrl is not used in some urls (#605)
In WMTS the publicUrl path was missed and it was not working properly.
Similar story about wmts.tmpl: the baseUrl is not working properly when
tileserver is hidden behind the proxy with different root path.

* Minor bugfix: make baseUrl always use '/' in the end

Co-authored-by: Oleksandr Shyshatskyi <oshyshatskyi@cloudlinux.com>
Co-authored-by: acalcutt <acalcutt@techidiots.net>
2022-09-30 09:18:13 -04:00
Mateusz Łoskot
44372784e1
Fix URL to WMTS capabilities to be based on public URL (#501) 2022-09-23 09:35:32 -04:00
acalcutt
abe5cd6401 update data and viewer templates 2022-09-14 20:39:02 -04:00
poljvd
5377414710
Fix missing ScaleDenominator in wmts.tmpl
The missing ScaleDenominator causes GeoServer to throw an error when importing the layer.
2020-09-28 10:33:21 +02:00
Petr Sloup
0a7c403f0b Update repo links, footnote, etc. (klokantech->maptiler) 2019-12-30 16:54:35 +01:00
Alban Mouton
c99a1a5425 Merge remote-tracking branch 'klokantech/master' into public_url
# Conflicts:
#	src/main.js
#	src/server.js
2018-12-19 09:53:40 +01:00
Måns Beckman
782c28cd64 Add key to WMTS xml
This should add the key to the wmts xml for hosted services
2018-09-13 17:58:13 +02:00
Måns Beckman
71fab2a2a1 Add support for WMTS capabilites
https://github.com/klokantech/tileserver-gl/issues/274

Clean up wmts template with correct syntax

Update endpoint URL and change content type

After a good nights sleep I considered the structure of the endpoint link for WMTS, at the same time I cleaned up the code and added the correct content type for the response.
2018-08-21 19:33:37 +02:00
Alban Mouton
47ff33166d missing public_url in templates 2017-10-18 14:20:33 +02:00
Alban Mouton
875521c5a8 add public_url option 2017-10-18 13:51:37 +02:00
Petr Sloup
698c527e94 Change endpoint URLs (close #154)
- styles at /style/{id}/style.json
- rendered tiles at /style/{id}/{z}/{x}/{y}.{format}
- TileJSONs at /style/{id}.json
2017-06-22 16:37:32 +02:00
Petr Sloup
37386bfb29 Hide empty headers on index (close #125) 2017-03-14 16:02:54 +01:00
Petr Sloup
e6ebb918fb Add mapbox-gl-rtl-text to correctly render labels in javascript (close #112) 2017-02-03 10:01:31 +01:00
Petr Sloup
1079ece860 Index footer improvements (fix typo) 2017-01-25 15:30:58 +01:00
Petr Sloup
85692e9659 Specify font family in the Inspect mode (close #106) 2017-01-17 12:09:03 +01:00
Petr Sloup
b66ae40a1e Allow layer list in inspect mode use more space (close #106) 2017-01-16 16:27:18 +01:00
Petr Sloup
4082828790 Rename button from "X-Ray" to "Inspect" (see #103) 2017-01-10 15:17:34 +01:00
Lukas Martinelli
3d993458b5 Add different inspect viewer for data 2017-01-09 14:30:20 +01:00
Petr Sloup
dfb07b8286 Show layer name in data viewer (close #83) 2016-12-13 08:48:28 +01:00
Petr Sloup
c1de2a7903 Upgrade MB GL JS to v0.28.0 (close #88) 2016-12-13 08:48:12 +01:00
Petr Sloup
becb46ab80 Add "Style JSON" link to the front page 2016-12-06 22:16:29 +01:00
Lauri Kajan
63090802ae fixing typo 2016-11-16 11:28:15 +02:00
Lauri Kajan
131b5e2f81 added circle symbols for point layers 2016-11-16 10:16:14 +02:00
Petr Sloup
a3d8240aac Do not add scale prefix when viewing raster data tiles (close #57) 2016-10-07 11:16:22 +02:00
Petr Sloup
f9f26f0d65 Indicate clearly when running light version on index.html 2016-08-25 10:44:29 +02:00
Petr Pridal
f9e5afbf49 Update index.tmpl 2016-08-24 16:29:49 +02:00
Petr Sloup
1004f4cce1 Add XYZ to the list of services (close #42) 2016-08-20 14:01:12 +02:00
Petr Sloup
2ab9d9e168 Print the package name on the index 2016-08-06 18:40:50 +08:00
Dalibor Janák
b048990e14 Responsive CSS for the web page #33 2016-07-27 14:05:33 +02:00
Petr Sloup
7efe22cf7f Minor typo fix 2016-07-26 19:02:44 +07:00
Petr Sloup
ed0af943da New design (close #31) 2016-07-26 17:27:08 +07:00
Petr Sloup
a43c96f6cc Print package version to log and index 2016-07-13 14:04:42 +02:00