2

I've been trying to use map tile images from services like OpenStreetMap to create a globe, and I've mostly succeeded. The problem is that when I compare my globe to one using the same image source made with Cesium.js, mine looks weird and stretched.

Here's mine:

My Globe

Here's the one that Cesium.js makes

enter image description here

As you can see, the one that I've made fits all the images together properly, but they seem slightly too large.

What could be causing this?

My methodology for texturing the globe is as follows

  1. Get the latitude and longitude of the vertex
  2. Project lat/lng to a x/y value in tile-space using leaflet.js
  3. Use that x,y coordinate to sample the image and put it on my sphere

Those three steps seem pretty straightforward to me, but I'm clearly doing something wrong and I'm not sure what it is.

  • There might not be anything wrong--you could simply be displaying things a little differently. Exactly what projection are you using and what projection is Cesium.js using? Exactly what formulas are you using to put image tiles on your sphere? – whuber May 13 '16 at 16:06
1

Turns out that the problem was the field of view on my camera. I lowered it and with a little tweaking everything looked exactly the same. In addition to that I made some lat/lng debug points on the sphere and they matched up perfectly, so I knew that all of my math / projection was right.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.