Skip to Content

Zooming Analytical Map

Oct 03, 2017 at 05:54 AM


avatar image

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.



ques1.png (10.9 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Iftah Peretz
Jan 13 at 05:14 PM


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);
10 |10000 characters needed characters left characters exceeded