Skip to Content
0

Zooming Analytical Map

Oct 03, 2017 at 05:54 AM

40

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.

Thanks,

Aakanksha

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
0

Hi,

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 = [];
 aCodes.push(e.getParameter("code"));
 var oCorr = 1.5; //A factor
 this.byId("vbi").zoomToRegions(aCodes, oCorr);
},
Share
10 |10000 characters needed characters left characters exceeded