chore: consistency between previous changes, docs, and serve_style.js

Signed-off-by: Martin d'Allens <martin.dallens@liberty-rider.com>
This commit is contained in:
Martin d'Allens 2023-10-11 23:19:43 +02:00
parent 78638469d7
commit 869ab0489c
2 changed files with 3 additions and 3 deletions

View file

@ -35,7 +35,7 @@ Static images
* All the static image endpoints additionally support following query parameters:
* ``path`` - ``((fill|stroke|width)\:[^\|]+\|)*((enc:.+)|((-?\d+\.?\d*,-?\d+\.?\d*\|)+(-?\d+\.?\d*,-?\d+\.?\d*)))``
* ``path`` - ``((fill|stroke|width)\:[^\|]+\|)*(enc:.+|-?\d+(\.\d*)?,-?\d+(\.\d*)?(\|-?\d+(\.\d*)?,-?\d+(\.\d*)?)+)``
* comma-separated ``lng,lat``, pipe-separated pairs
@ -50,7 +50,7 @@ Static images
* e.g. ``path=stroke:yellow|width:2|fill:green|5.9,45.8|5.9,47.8|10.5,47.8|10.5,45.8|5.9,45.8`` or ``path=stroke:blue|width:1|fill:yellow|enc:_p~iF~ps|U_ulLnnqC_mqNvxq`@``
* can be provided multiple times
* can be provided multiple times
* ``latlng`` - indicates coordinates are in ``lat,lng`` order rather than the usual ``lng,lat``
* ``fill`` - color to use as the fill (e.g. ``red``, ``rgba(255,255,255,0.5)``, ``#0000ff``)

View file

@ -9,7 +9,7 @@ import { validate } from '@maplibre/maplibre-gl-style-spec';
import { getPublicUrl } from './utils.js';
const httpTester = /^(http(s)?:)?\/\//;
const httpTester = /^\/\//;
const fixUrl = (req, url, publicUrl, opt_nokey) => {
if (!url || typeof url !== 'string' || url.indexOf('local://') !== 0) {