NOTICE: Google Maps Platform gaming services is deprecated as of October 18, 2021. Current users will have continued access until December 31, 2022. During this time, we will continue to provide support and fixes to major bugs and outages. See the Gaming Services Transition Guide for resources to help you plan the next steps for your projects.

Projection between latitude/longitude and Unity worldspace.

## Summary

Caution: You must set the floating origin before using the Coordinate System. For more information, see the MapsService.InitFloatingOrigin method.

Zoom
int
The zoom level.

### Properties

IsFloatingOriginSet
bool
Whether FloatingOrigin has been set.

### Public functions

FromLatLngToVector3(LatLng latLng)
Vector3
Converts a LatLng value into a Unity Worldspace Vector3 by way of the Spherical Mercator projection:
FromVector3ToLatLng(Vector3 vector3)
Converts a Unity Worldspace Vector3 into a LatLng, by way of the Spherical Mercator projection.

int Zoom

The zoom level.

## Properties

### IsFloatingOriginSet

bool IsFloatingOriginSet

Whether FloatingOrigin has been set.

## Public functions

### FromLatLngToVector3

Vector3 FromLatLngToVector3(
LatLng latLng
)

Converts a LatLng value into a Unity Worldspace Vector3 by way of the Spherical Mercator projection:

• translated relative to the current origin (FloatingOrigin).
• scaled relative to the latitude of the initial floating origin (MercatorScale).

Details
Parameters
 latLng The LatLng value to convert.
Returns
A Vector3 value in Unity Worldspace.

### FromVector3ToLatLng

LatLng FromVector3ToLatLng(
Vector3 vector3
)

Converts a Unity Worldspace Vector3 into a LatLng, by way of the Spherical Mercator projection.

This method is the inverse of the FromLatLngToVector3 method. It takes into account the fact that the Vector3 has been translated relative to the current origin, and scaled relative to the latitude of the initial origin.

Details
Parameters
 vector3 The Vector3 value to convert.
Returns
The converted LatLng value.
[]
[]