JavaScript

mapControl.viewMarkerGroups Method

Syntax

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

mapObj.viewMarkerGroups(markerGroupArray);

Arguments

markerGroup1string

The first marker group to include in the view calculation.

markerGroupNstring

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

markerGroupArrayarray

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');

if (mapObj) {
    // center on a single marker group
    mapObj.viewMarkerGroups('myMarkerGroup1');

    // view multiple marker groups
    mapObj.viewMarkerGroups('myMarkerGroup1','myMarkerGroup2','myMarkerGroup3');
}