1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-11 04:19:56 +00:00
TiddlyWiki5/plugins/tiddlywiki/geospatial/docs/geolayer.tid
Jeremy Ruston b1cd1306ef
Geospatial Plugin: Support for custom popups (#8404)
* Allow width, height and maxZoom to be specified

* Add images to city marker tiddlers

* Initial support for custom popups

* Custom popup templates for the US and Canadian example data

* Popups should use the geomap as their parent widget

This lets root widget messages work

* Typo in default popup template

* Clean up the use of popup templates

* Allow GeoJSON features to be hidden via a checkbox

* Popup template for volcano dataset

* Add Natural Earth country data

* Optimise marker SVG
2024-07-25 17:31:37 +01:00

27 lines
1.4 KiB
Plaintext

title: $:/plugins/tiddlywiki/geospatial/docs/geolayer
caption: geolayer widget
tags: $:/tags/GeospatialDocs
!! `<$geolayer>` widget
The `<$geolayer>` widget is used inside the `<$geomap>` widget to indicate the layers and markers to display.
The following attributes are supported:
|!Attribute |!Description |
|''json'' |Optional GeoJSON Feature Collection to be rendered |
|''name'' |Optional name to be displayed for this layer |
|''color'' |Optional CSS colour for this layer |
|''lat'' |Optional latitude of marker if json attribute missing |
|''long'' |Optional longitude of marker if json attribute missing |
|''alt'' |Optional altitude of marker if json attribute missing |
|''draggable'' |Set to "yes" to make the marker draggable |
|''updateActions'' |Optional actions when the marker is dragged other otherwise modified. The variables ''lat'' and ''long'' contain the new coordinates of the marker |
|''properties'' |<<.from-version "5.3.6">> Optional JSON properties to be attached to the marker (only supported for non-JSON layers) |
|''popupTemplate'' |<<.from-version "5.3.6">> Optional template to be used for popups. The template is rendered with the variable ''feature'' containing the JSON text of the feature |
Note that the `<$geolayer>` widget can be used in one of two modes:
* With the ''json'' attibute specifying the layer to be drawn
* With the ''lat'', ''long'' and optional ''alt'' and ''properties'' attributes specifying a marker to be drawn