I've started to add some geo-data to a table (postgis enabled database) and I just saw I can visualize the point on a integrated leaflet.
But how does it work ? Is pgAdmin querying an API or a webservice ? Is this leaflet integrated with the postgis setup ?
I'm just begining with postgis so I have no idea about this magic ^^
Once the different components are clearly defined and separated, the magic goes away....
Simplifying a bit, we have:
Postrgres, the database that contains your data.
PostGIS is an extension for Postgres that allows you to store (and work with) geometries.
PGAdmin is a viewer for Postgres that runs in a webbrowser.
Leaflet is a javascript library used to display spatial data.
OpenStreetMap is an open-source dataset that can be used as a basemap.
So, PGAdmin
runs in the browser and can run any javascript code. It makes use of this to load the Leaflet
library. When the geometry viewer is used, PGAdmin
creates a Leaflet map, tells it to display the public OpenStreetMap
basemap and overlay your data from your table.