How to make the 2D map center at a given location?

Hello all,

The default view of the 2D map is usually by the “land scientists”, and most “ocean scientists” would like to see a 2D map centers at the North Pole.

I’d like to know how to use Cesium to make the 2D map center at a given location, e.g. south pole, north pole.

Thanks in advance,

Steven

Any information is appreciated.

在 2014年10月1日星期三UTC-7上午3时00分35秒,Steven写道:

Centering the map in 2D is simple using viewRectangle.

var west = -77.0;

var south = 38.0;

var east = -72.0;

var north = 42.0;

scene.camera.viewRectangle(Cesium.Rectangle.fromDegrees(west, south, east, north));

However, I’m guessing what you actually want to do change the origin of the map so that the north pole is the center when completely zoomed out. Unfortunately, this isn’t a feature that Cesium supports yet. I’m not sure how difficult it would be to add; but I have heard others request this before. Perhaps Patrick or Kevin could shine some light on how easy/hard that would be to implement.

Thanks for the reply, Matt.

Yes, what I want to know is how to change the origin of the 2D and 2.5D maps so that north/south pole or any location is the center when completely zoomed out.

Does Cesium team has the plan to include this feature in the future? Which javascript files are currently doing the job of centering the 2D and 2.5D maps when completely zoomed out?

Thanks,

Steven

在 2014年10月3日星期五UTC-7下午5时17分10秒,Matthew Amato写道:

It’s a perfectly reasonable feature request and I see no reason why we wouldn’t eventually support it (given enough demand). Unfortunately, as far as I know there are no short term plans to add it and I have no idea what the level of effort is for doing so (as that’s not an area of the code I play in often).