on 10-03-2017 6:54 AM
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
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);
},
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.