JavaScript

mapControl.viewMarkerGroups Method

Syntax

mapObj.viewMarkerGroups(markerGroup1, [,...markerGroupN]);

mapObj.viewMarkerGroups(markerGroupArray);

Arguments

markerGroup1

The first marker group to include in the view calculation.

markerGroupN

Optional. Additional marker group(s) to include in the view calculation. You can specify as many additional marker groups as you want.

markerGroupArray

An array of marker groups to include in the view calculation.

Description

Adjusts the Map Control's center point and zoom to view one or more markers in the specified marker groups.

Example

//get a pointer to the map control for variable 'mymap1'
var mapObj = {dialog.object}.getControl('mymap1');

// center on a single marker group
mapObj.viewMarkerGroups('mymarkergroup1');

// view multiple marker groups
mapObj.viewMarkerGroups('mymarkergroup1','mymarkergroup2','mymarkergroup3');