Search.../

location

Sets or gets the location information of a map's marked location.

Description

Setting the location property to a MapLocation object moves the map's marked location.

Getting the location property returns the location information of the map's marked location.

Type:

MapLocationRead & Write
NAME
TYPE
DESCRIPTION
latitude
number

The latitude of the location. Must be between -90 and 90.

longitude
number

The longitude of the location. Must be between -180 and 180.

description
string

The description of the location.

Was this helpful?

Get map location info

Copy Code
1let myLocation = $w("#myGoogleMap").location;
2
3let locationLatitude = myLocation.latitude; // 37.77065
4let locationLongitude = myLocation.longitude; // -122.387301
5let locationDescription = myLocation.description; // "Wix Office"
Set map location info

Copy Code
1$w("#myGoogleMap").location = {
2 "latitude": 37.77065,
3 "longitude": -122.387301,
4 "description":"Wix Office"
5 };