Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web Mercator Weirdness #3153

Open
emackey opened this issue Oct 30, 2015 · 10 comments
Open

Web Mercator Weirdness #3153

emackey opened this issue Oct 30, 2015 · 10 comments

Comments

@emackey
Copy link
Contributor

emackey commented Oct 30, 2015

I tried enabling WebMercator mode like this:

var viewer = new Cesium.Viewer('cesiumContainer', {
    mapProjection: new Cesium.WebMercatorProjection(Cesium.Ellipsoid.WGS84)
});
//viewer.extend(Cesium.viewerCesiumInspectorMixin);
viewer.scene.morphTo2D(0);

But the world went awash in wacky weirdness:

badmercator_v2

Is this a bug or am I just doing it wrong? If it's not a bug then we might need clearer docs on how to do this.

/cc @kring @abwood

@pjcozzi
Copy link
Contributor

pjcozzi commented Oct 30, 2015

Can you reproduce this in 1.14?

@emackey
Copy link
Contributor Author

emackey commented Oct 30, 2015

This is master 595bb4e from Oct 26.

@emackey
Copy link
Contributor Author

emackey commented Oct 30, 2015

I'll check 1.14

@emackey
Copy link
Contributor Author

emackey commented Oct 30, 2015

Yeah, this behavior goes way back, I can reproduce in 1.1 and 1.14

@kring
Copy link
Member

kring commented Nov 2, 2015

@emackey I remember seeing these kinds of artifacts ages ago, and I thought at the time that it was a result of projecting Bing tiles from Web Mercator to Geographic and then back to Web Mercator; we're losing information. There's a roadmap item to fix this (#526 search for mercator), but doing so probably requires us to keep the original Web Mercator images around "just in case." Although, this looks a bit worse than I remember, so maybe there is something more nefarious going on.

@mramato
Copy link
Contributor

mramato commented Nov 2, 2015

Could #3104 have cause this to be more noticeable?

@emackey
Copy link
Contributor Author

emackey commented Nov 2, 2015

It's possible that WebMercator just isn't used much. I had to go back to b28 to find a Sandcastle example of it, and it appeared to exhibit this bug there too. My main concern isn't blurriness, it's the noticable "pop" where the top half of Greenland moves several degrees North or South as you cross a tile/zoom boundary. I don't think the re-projection back from Geographic to Mercator is working, at least not for texels between the vertices (try wireframe mode in Cesium Inspector to see this).

@emackey
Copy link
Contributor Author

emackey commented Nov 2, 2015

You can just barely see in the wireframe version, but the Northern coast of Greenland shifts a noticable amount here. The same is happening in the other direction near the South Pole. I'm suspicious that the polar "caps" are playing a role here too.

badmercator_wireframe

@cfickler
Copy link

Could this be related to the issue I am seeing with stretching of the map when the height of the canvas exceeds the width of the canvas, you are viewing the full world and you zoom out using the mouse scroll ? This is not a polar problem either as you can rotate the map 90 degress and watch is stretch east and west. Also, slightly changing the size of the canvas (via the window) sets it back to what you would expect. This seems to happen in both Web Mercator and WGS84

Stretched Map
image

After slightly changing the window size
image

@mramato
Copy link
Contributor

mramato commented Dec 15, 2015

@cfickler , I think what you are seeing is an unrelated issue, so I submitted #3346 for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants