# How to find the tileset.json corresponding to any arbitrary lat,long position?

**URL:** <https://community.cesium.com/t/how-to-find-the-tileset-json-corresponding-to-any-arbitrary-lat-long-position/34239>\
**Category:** Cesium ion\
**Created:** [August 1, 2024, 11:40am UTC](https://community.cesium.com/t/how-to-find-the-tileset-json-corresponding-to-any-arbitrary-lat-long-position/34239 "2024-08-01T11:40:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jenit\_Shah](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/jenit_shah/32/16175_2.png) [@Jenit\_Shah](https://community.cesium.com/u/Jenit_Shah)\
**Post date:** [August 1, 2024, 11:40am UTC](https://community.cesium.com/t/how-to-find-the-tileset-json-corresponding-to-any-arbitrary-lat-long-position/34239/1 "2024-08-01T11:40:36Z")

</div>

I am trying to calculate the x and y tile coordinates from a given longitude and latitude using the Web Mercator Tiling Scheme in Cesium. Below is the code snippet I am using to get the coordinates:

```auto
const lg = <longitude>;
const lt = <latitude>;
const ts = new WebMercatorTilingScheme();
const pos = new Cartographic(CesiumMath.toRadians(lg), CesiumMath.toRadians(lt), 50);
const position = ts.positionToTileXY(pos, 4);

```

and then used the `x` and `y` values from `position` to fetch the appropriate tileset using a REST API. Here is the URL format I attempted:

`https://assets.ion.cesium.com/ap-northeast-1/asset_depot/96188/OpenStreetMap/CWT/2024-03-04/{z}-{x}-{y}.json?v=57181480-e706-11ee-857d-e18e4a3674dc`
