Showing results for 
Search instead for 
Did you mean: 

Zooming Analytical Map

0 Kudos

Hello All,

I am trying to zoom to a particular location in an analytical map.

I am using this code to display my map ques1.png

The map looks fine, but now on selection of a particular parameter I want to zoom into the map.

I am using zoomToRegions(aCodes,oCorr) method to zoom into the map, but am unable to understand what aCodes should be.

Please guide.



Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos


The aCodes is an array of the region codes you want to zoom into, each code is the same as the one you defined in the JSON of the map.

If you download this example and insert the following code instead of onRegionClick function, you'll get what codes are and how to zoom (once you'll click a region you'll get 150% zoom into it)

onRegionClick: function(e) {
 var aCodes = [];
 var oCorr = 1.5; //A factor
 this.byId("vbi").zoomToRegions(aCodes, oCorr);