Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions examples/official-site/sqlpage/migrations/10_map.sql
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Showing how to place a marker on a map. Useful for basic location displays like
This example demonstrates using topographic map tiles, custom marker styling,
and clickable markers that link to external content - perfect for educational or tourism applications.

It uses [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) to display polygons and lines.
The [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) feature here is a single point. Its coordinates are `[longitude, latitude]`; the top-level `latitude` and `longitude` set the map''s initial center.

- You can generate GeoJSON data from PostGIS geometries using the [`ST_AsGeoJSON`](https://postgis.net/docs/ST_AsGeoJSON.html) function.
- In spatialite, you can use the [`AsGeoJSON`](https://www.gaia-gis.it/gaia-sins/spatialite-sql-5.1.0.html#p3misc) function.
Expand All @@ -216,7 +216,8 @@ It uses [GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) to display polygons and
{ "icon": "peace",
"size": 20,
"link": "https://en.wikipedia.org/wiki/Nelson_Mandela",
"geojson": "{\"type\":\"Feature\", \"properties\": { \"title\":\"Mvezo, Birth Place of Nelson Mandela\" }, \"geometry\": { \"type\":\"Point\", \"coordinates\": [28.49, -31.96] }}"}]'
"geojson": "{\"type\":\"Feature\", \"properties\": { \"title\":\"Mvezo, Birth Place of Nelson Mandela\" }, \"geometry\": { \"type\":\"Point\", \"coordinates\": [28.49, -31.96] }}"},
{"component": "text", "contents_md": "Map data: [© OpenStreetMap contributors](https://www.openstreetmap.org/copyright), SRTM. Map style: [© OpenTopoMap](https://opentopomap.org/) ([CC BY-SA](https://creativecommons.org/licenses/by-sa/3.0/))."}]'
)
),
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ INSERT INTO example(component, description, properties) VALUES
{"title": "Blue card", "color": "blue", "width": 6, "background_color": "blue-lt", "description": "The Blue Card facilitates migration of foreigners to Europe.", "icon":"currency-euro" },
{"title": "Green card", "color": "green", "background_color": "green-lt", "description": "Welcome to the United States of America !", "icon":"user-dollar" }
]')),
('card', 'Cards with remote content',
('card', 'The first card embeds a SQLPage chart as a page fragment. The second embeds a video player in an iframe with its own `height` and `allow` attributes.',
json('[
{"component":"card", "title":"Card with embedded remote content", "columns": 2},
{"title": "Embedded Chart", "embed": "/examples/chart.sql?_sqlpage_embed" },
{"title": "Embedded Chart", "embed": "/examples/chart.sql" },
{"title": "Embedded Video", "embed": "https://www.youtube.com/embed/mXdgmSdaXkg", "allow": "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share", "embed_mode": "iframe", "height": "350" }
]'));

Expand Down
6 changes: 3 additions & 3 deletions examples/official-site/sqlpage/migrations/63_modal.sql
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ INSERT INTO example(component, description, properties) VALUES
]')
),
('modal',
'Example of modal form content',
'The button opens the dialog by its `id`. `embed` loads the form from another SQLPage file without its surrounding page shell.',
json('[
{
"component":"modal",
"id":"my_embed_form_modal",
"title":"Embeded form content",
"title":"Embedded form",
"large":true,
"embed":"/examples/form.sql?_sqlpage_embed"
"embed":"/examples/form.sql"
},
{"component": "button"},
{"title":"Open a modal with a form","link":"#my_embed_form_modal"}
Expand Down
Loading