---
title: "longitudeToMercatorX | Mobile sdk | Mobile sdk android | Android"
description: "longitudeToMercatorX"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# longitudeToMercatorX

fun [longitudeToMercatorX](https://docs.maptiler.com/mobile-sdk/android/api/-map-tiler-s-d-k/com.maptiler.maptilersdk.helpers/-m-t-math/longitude-to-mercator-x/)(longitude: [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)): [Double](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-double/index.html)

Converts a longitude to Web Mercator X coordinate in meters.
