0

genPOI: support polylines and filled-in polygons

Add support for polyline POIs just like in the good ol'
Google Maps days. See #883.

The format after this commit is:
{ id, x, y, z, text, color, polyline/polygon: [{ x, y, z }, ...] }

Optional properties:
- common ones like "icon" and "hovertext"
- "strokeColor" (string),
- "fill" (boolean)
- "weight" (integer)

Docs not included.

Largely based on PR #1536 by @jsmienk.
Closes #1456, closes #1536, closes #1643.
This commit is contained in:
Nikita Litvin
2019-09-25 05:21:09 +03:00
parent 2b699d0355
commit a3b9493c57
3 changed files with 64 additions and 26 deletions

View File

@@ -7,11 +7,10 @@ var world = "top";
markersDB[groupName] = {
"raw": [
{
"fillColor": "#00FF00",
"fillOpacity": 0.2,
"strokeColor": "#FF0000",
"strokeOpacity": 1,
"polygon" : [
"strokeWeight": 2,
"fill": true,
"polyline" : [
{"x": 347, "y": 67, "z": 95},
{"x": 347, "y": 77, "z": 95},
{"x": 347, "y": 77, "z": 105},
@@ -19,7 +18,7 @@ markersDB[groupName] = {
{"x": 347, "y": 67, "z": 105}
]}
],
"name": "Regions",
"name": groupName,
"created": false
}
@@ -31,4 +30,4 @@ markers[world].push(
"displayName": displayName,
"checked": true
});
*/
*/