From 75d439fe85ff877e0a32e92c886c6be20deb4d6f Mon Sep 17 00:00:00 2001 From: Andrew Calcutt Date: Wed, 27 Sep 2023 02:08:03 -0400 Subject: [PATCH] docs: reformat path docs Signed-off-by: Andrew Calcutt --- docs/endpoints.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/endpoints.rst b/docs/endpoints.rst index a18473f..dd84bee 100644 --- a/docs/endpoints.rst +++ b/docs/endpoints.rst @@ -35,7 +35,7 @@ Static images * All the static image endpoints additionally support following query parameters: - * ``path`` + * ``path`` - ``((fill|stroke|width)\:[^\|]+\|)*((enc:.+)|((-?\d+\.?\d*,-?\d+\.?\d*\|)+(-?\d+\.?\d*,-?\d+\.?\d*)))`` * can be provided multiple times * syntax @@ -44,11 +44,15 @@ Static images * e.g. ``path=5.9,45.8|5.9,47.8|10.5,47.8|10.5,45.8|5.9,45.8`` - * Match pattern with options + * `Google Encoded Polyline Format `_ + + * e.g. ``path=enc:_p~iF~ps|U_ulLnnqC_mqNvxq`@`` + * If 'enc:' is used, the rest of the path parameter is considered to be part of the encoded polyline string -- do not specify the coordinate pairs. + + * With Options (fill|stroke|width) + + * 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 ``stroke:blue|width:1|fill:yellow|enc:_p~iF~ps|U_ulLnnqC_mqNvxq`@`` - * ``((fill|stroke|width)\:[^\|]+\|)*((enc:.+)|((-?\d+\.?\d*,-?\d+\.?\d*\|)+(-?\d+\.?\d*,-?\d+\.?\d*)))`` - * 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 ``stroke:blue|enc:_p~iF~ps|U_ulLnnqC_mqNvxq`@`` - * 'enc:' is specified in `Google Encoded Polyline Format `_. If used, the rest of the path parameter is considered to be part of the encoded polyline string -- do not specify the coordinate pairs. * ``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``) * ``stroke`` - color of the path stroke