Skip to main content

Navigation

Pan & zoom the map to a WGS84 coordinate.

Parameters:

FieldTypeRequiredDescription
latitudenumberYesWGS84 latitude (y).
longitudenumberYesWGS84 longitude (x).
zoomnumberYesTarget zoom level.

Usage:

control.navigateToLatLong(-31.9505, 115.8575, 14);

Fit the map to the provided bounding box.

Parameters:

FieldTypeRequiredDescription
minLatitudenumberYesMinimum (south) latitude bound.
minLongitudenumberYesMinimum (west) longitude bound.
maxLatitudenumberYesMaximum (north) latitude bound.
maxLongitudenumberYesMaximum (east) longitude bound.

Usage:

control.navigateToExtent(-32.2, 115.7, -31.8, 116.05);

Center on a previously retrieved address search result.

Parameters:

FieldTypeRequiredDescription
itemSearchResultYesResult object returned by searchAddresses().

Usage:

// Search for an address then navigate to it
const [first] = await control.searchAddresses('752 North Lake Rd');
await control.navigateToAddress(first);
note
  • If the result contains an intrinsic zoom level it will be applied; otherwise a default fit/zoom is chosen.

Center on a previously retrieved region (e.g., suburb, state, admin boundary).

Parameters:

FieldTypeRequiredDescription
itemSearchResultYesResult object returned by searchRegions().

Usage:

const regions = await control.searchRegions('Perth');
await control.navigateToRegion(regions[0]);
note
  • Automatically fits the region's bounding geometry / extent.

Center on (or fit to) a previously retrieved feature (e.g., a feature result from a feature or layer search).

Parameters:

FieldTypeRequiredDescription
itemSearchResultYesResult from searchFeatures() / searchLayers().

Usage:

const features = await control.searchFeatures('Hospital');
await control.navigateToFeature(features[0]);
note
  • If the feature has a geometry with an area the map will fit its bounds; for point features it will center & apply an appropriate zoom.