t-rex icon indicating copy to clipboard operation
t-rex copied to clipboard

First T-rex webmap

Open Vangogh-dev opened this issue 4 years ago • 3 comments

Hello,

I am working on a project that needs a vector tile map. I am using postgresql with geofabrik data imported with osm2pgsql and t-rex to serve it. I can display data from my db but the goal is to display a basemap to load geojson on top. What is the next step to get my basemap ? I am a bit lost in the web map/geographic data community because i am just begining. t_rex_alsace_roads Here is what t-rex is displaying from the db

PS : one of my late goal is to display 3d building so if you have solutions or info about that i would love to ear it.

Vangogh-dev avatar Feb 10 '21 13:02 Vangogh-dev

Is the title an error message you got? t-rex does only serve or generate vector tiles. You need a viewer library like mapbox-gl or OpenLayers to create a web map with overlays. Or you just want to view your data locally? Then QGIS would support that.

pka avatar Feb 10 '21 14:02 pka

Is the title an error message you got? t-rex does only serve or generate vector tiles. You need a viewer library like mapbox-gl or OpenLayers to create a web map with overlays. Or you just want to view your data locally? Then QGIS would support that.

Hello thanks for your reply, no there is not any error when loading the tiles. The goal is to display some data on top of the basemap. just like roads, buildings etc on a web browser. i've never QGIS btw. As i undestant i need a library to display all layer at same time to build a "real" basemap ? What should be the next step ?

Vangogh-dev avatar Feb 10 '21 14:02 Vangogh-dev

I use https://github.com/visgl/deck.gl and import the url that trex tells me ( the http://…/{x}/{y}.pbf URL) with a https://deck.gl/docs/api-reference/geo-layers/mvt-layer . You can use many different basemaps with deck.gl

chris-aeviator avatar Mar 16 '21 11:03 chris-aeviator