Implement XYZ tile layer in NASA Worldwind

698 views Asked by At

I'm using the NASA Worldwind API to put a virtual globe in my Android app. I would like to be able to implement an XYZ tile layer in my application, but there are no examples that I can find of this. The only examples I have found for adding layers are for WMS and WMTS. Here is an example of a layer i would like to add:

https://a.tile.openstreetmap.org/${z}/${x}/${y}.png 

Is this possible to add this type of layer in Worldwind?

Edit 12/20/2019: After researching this for a while, I found out that this isn't possible out of the box. It seems that the Android version capabilities are lagging a good bit behind the Web and Java versions.

I did get this working after pulling in some code from the the community edition fork. If anyone else needs to do this, check out this pull request in the community edition: https://github.com/WorldWindEarth/WorldWindAndroid/pull/17

1

There are 1 answers

1
wcmatthysen On

Take a look at the OSMMapnikLayer in the gov.nasa.worldwind.layers.Earth package. It provides an example of how to implement a custom Mercator-layer (which is what you're looking for). In fact, the OSMMapnikLayer already uses https://a.tile.openstreetmap.org as a server.