Skip to content

Struggling with R3F setup for XYZ Tiles, WMTS Tiles, Centering Map and adding 3D Cube #1376

@newguy123-creator

Description

@newguy123-creator

Question

Hi Guys

See my StackBlitz setup below

1st time questions here, kindly bear with me!

I'm currently using the XYZTilesPlugin, and it seems to work OKish for openstreetmap, however I had to ask AI to help me with a component to setup the initial map location, orientation and zoom, and that is in the form of "LookATFrameNorthUp.jsx" in the components folder.

I'm a bit gobsmacked that I had to create that component in the 1st place, as there must be something already built in whereby I can very easily just go to a specific location on the map with specific zoom level, pitch and bearing!

Anyway, that LookAT doesnt work as intended anyway as the map is not centered to my lat long coords that I gave it in App.jsx

Then, using the "EastNorthUpFrame" I'm trying to stick in a basic cube in same lat long coordinates, however I'm not seeing any cube. I know I dont have any lights in, but I would expect to at least see a black cube.

At the end of the day, I would like to show a specific Mapbox map I designed, and I added that in tests with my token etc, but it seems a bit pixelated and text is hard to read, and not crisp compared to when I use regular Mapbox GL JS instead of 3D-Tiles-Renderer. Is the Mapbox MVT thing working yet and would that makes things crisper for me similar to Mapbox GL JS, and if so, How can I adjust my code to use the MVT tiles please from Mapbox?

Supplemental Data

https://stackblitz.com/edit/vitejs-vite-gdkdexq2?file=src%2FApp.jsx

Library Version

0.4.18

Three.js Version

0.181.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions