JavaScript
mapControl.viewMarkers Method
Syntax
mapObj.viewMarkers(marker1, [,...markerN]);
mapObj.viewMarkers(markerArray);
Arguments
- marker1string
The first marker to include in the view calculation.
- markerNstring
Additional marker(s) to include in the view calculation. You can specify as many additional markers as you want.
- markerArrayarray
An array of markers to include in the view calculation.
Description
Adjusts the Map Control's center point and zoom to view one or more markers.
Example
//get a pointer to the map control for variable 'mymap1' var mapObj = {dialog.object}.getControl('mymap1'); if (mapObj) { // center on a single marker named 'myMarker1' mapObj.viewMarkers('myMarker1'); // view multiple markers mapObj.viewMarkers('myMarker1','myMarker2','myMarker3'); }