Skip to content

Commit cab2f01

Browse files
author
Luis Cabrera
authored
Merge pull request #46 from pritish-devurkar/master
Add zoom control to maps
2 parents ca599d6 + 0f79530 commit cab2f01

File tree

1 file changed

+12
-0
lines changed
  • 02 - Web UI Template/CognitiveSearch.UI/wwwroot/js

1 file changed

+12
-0
lines changed

02 - Web UI Template/CognitiveSearch.UI/wwwroot/js/results.js

+12
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,18 @@ function AuthenticateResultsMap(results) {
6060
}
6161
});
6262

63+
//Wait until the map resources are ready.
64+
resultsMap.events.add('ready', function () {
65+
66+
/* Construct a zoom control*/
67+
var zoomControl = new atlas.control.ZoomControl();
68+
69+
/* Add the zoom control to the map*/
70+
resultsMap.controls.add(zoomControl, {
71+
position: "bottom-right"
72+
});
73+
});
74+
6375
AddMapPoints(results);
6476

6577
return;

0 commit comments

Comments
 (0)