The map tile images I created have non-square tiles in the maps edge. If the image format is png, I can put transparent pixels to make images square, but unfortunately, my image format is jpg, so I can't add transparent pixels to tiles.

If Cesium loads non-square tile images, it expands the tile image fit to be square, and this looks so bad. Remodelling ImageryProvider.js to add transparent pixels to the tile on-the-fly is the possible solution, and actually I did this on OpenLayers 3, but it takes too much effort.

Are there any good hacks to load non-square tiles on Cesium, with no or light effort?

closed as too broad by Richard Law, Midavalo Dec 12 '16 at 22:19

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    What counts as too much (or heavy) effort? Is it too much effort for you, or is it causing problems to your PC? What counts as a good hack (as opposed a standard or bad hack)? – nmtoken Dec 12 '16 at 17:13
  • 2
    Do you really mean "without needing to modify Cesium"? Can you just add white or black fill to your JPEG tiles, or bulk convert everything to PNG? – BradHards Dec 12 '16 at 20:56
  • nmtoken - I mean "without or less modifying Cesium". I once modified OpenLayers3, but it takes too much time to understand OL3 inside and also take too much effort to keep delta each time OL3's update. BradHards - jpeg tiles overlay to other map, so black/white background is not good, and PNG is 10 times larger size than for JPG, for my image. It is something like photo. – kochizufan Dec 12 '16 at 21:32
  • Possible solution I found by myself is, only edge tiles convert to PNG. identifying edge tile is easy, so if I call PNG instead of JPG for edge tiles, this may work. But if there are another way to solve this, I want to know... – kochizufan Dec 12 '16 at 21:40

Browse other questions tagged or ask your own question.