Comments (6)
Did you try viewing the map through the built-in viewer? It provides out-of-the-box viewers for Mapbox GL JS, Openlayers, and other debug tools. I would first test here, as it could be an issue with your Mapbox GL JS implementation locally (layers/styling not configured properly). The viewer can be accessed by pointing your browser to the instance running t-rex (i.e. http://:8080). You may need to zoom/pan around to find your points. Using Inspector, you can also click on the different tiles to get more info (like # of features).
Finally, @pka also included instructions in the README for decoding vector tiles so you can view the payload in each tile:
curl --silent http://127.0.0.1:6767/ne_10m_populated_places/5/31/17.pbf | gunzip -d | protoc --decode=vector_tile.Tile src/mvt/vector_tile.proto
from t-rex.
This tile looks empty indeed. You write that your data was in mercator projection, but your config says that the layer data is in SRID 4326, which is WGS84. So t-rex transforms from 4326 to 3857 (Web Mercator). This could be the reason for missing data. Maybe you had wrong parameters in the DB loading process?
When you set RUST_LOG=debug
(e.g. RUST_LOG=debug t_rex serve
...) you get additional log output including the SQL queries. So you can check manually why no data is found.
from t-rex.
I tried the the viewer. It looks nice, but does not return my points when I look under the mapbox tab. I actually would expect to -at least- have a zoomin&out widget (as it is included under the OpenLayers tab...), but I have just white, nothing else.
Part of my confusion is that it seems I need to add some styling as the viewer mentions:
Style JSON: http://<remoteIPaddress>:8080/customlayer.style.json
Or is this autogenerated and thus not really necessary to add?
The confusion comes from the fact that my styling -thus far- has been part of my mapbox-gl-js setup (so separate from the vector tiles... I am just looking for serving 'unstyled' tiles, but without styling my points might not show in the viewer?
I also tried decoding vector tiles. As I seemed to need one, I supplied a proto file from here:
https://raw.githubusercontent.com/mapbox/vector-tile-spec/master/2.1/vector_tile.proto
And then did:
$ curl --silent http://<remoteIPaddress>:8080/markers/4/2/6.pbf | gunzip -d | protoc --decode=vector_tile.Tile vector_tile.proto
I get:
layers {
name: "customlayer"
extent: 4096
version: 2
}
and that's it. Does this mean there are no points in that tile? As I am sure it should contain many of my points, this would be good to know.
BTW: the coords of the points I uploaded into postgres were in mercator (so not wgs84) format. This worked for the tileserver I had before, but am wondering if this could be a culprit of my troubles maybe?
from t-rex.
Ha! After changing srid = 4326 into srid = 3857 in the config.toml it works within my mapbox-gl-js app! Looks really good and fast!
However, my points still do not show within the viewer (both not mapbox-gl and openlayers). Why is that? Styling?
from t-rex.
I guess because of cached tiles. Empty the browser cache and try again.
from t-rex.
Yep, that did the trick. As there is no basemap it is hard to see whether my points are 'correct'. They seem on different places (maybe to do with the 'srid trick' I did). In my app everything is working brilliantly. Very happy!
from t-rex.
Related Issues (20)
- startup take too long time with many postgis tables HOT 1
- Pixel size for sampling tolerance in WGS84 HOT 1
- gpkg / gdal parallel performance less than sequential HOT 6
- How to configure t-rex to use a database function with PostGIS ST_AsMVT HOT 2
- corrupted polygons with clipping tile borders
- jammy packaging for 0.14x HOT 9
- --cache command line option ignored HOT 2
- Unable to generate tiles, tile extents appear to be wrong ... HOT 1
- t-rex vs other MVT servers? HOT 1
- gdal 3.5 support HOT 1
- Error in loading vector tiles with standalone mapbox gl js viewer HOT 1
- What default tile size is used by Trex? 256 or 512? HOT 1
- Polygon Shift: Custom Projection HOT 2
- cargo build error for GDAL HOT 6
- Parallel calls performance with geopackage as datasource HOT 1
- t-rex doesn't recognize the CRS/SRS HOT 1
- Debian packages for bookworm HOT 3
- Invalid MBTiles metadata.json HOT 4
- Buffer region not served as part of the vector tile HOT 2
- T-Rex doesn't handle invalid geometry results correctly when transforming between coordinate systems HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from t-rex.