React Map - center

An object, a string, or an array specifying which part of the map is displayed at the UI component's center using coordinates. The UI component can change this value if autoAdjust is enabled.

Type:

Object

|

String

|

Array<Number>

Raised Events: onOptionChanged

You can specify the center value in one of the following formats:

  • { lat: 40.749825, lng: -73.987963}
  • "40.749825, -73.987963"
  • [40.749825, -73.987963]
  • "Brooklyn Bridge,New York,NY"

If provider is "osm" and you specify center as an address string, implement providerConfig.calculateLocation to convert this address to coordinates. If the Map cannot resolve this address, the component sets center to {lat: 0, lng: 0}.

lat

The latitude location of the UI component.

Type:

Number

Default Value: 0

lng

The longitude location of the UI component.

Type:

Number

Default Value: 0