title: JvectorMap Region Selection
body: <p>I am trying to reuse the region selection feature of JVectorMap. I am using a custom map (js) file. I have tested it in and it works fine for region selection.
  Now I need to pass the regions which are selected by the user to the back end vb code. In this case maps.getSelectedRegions() gives an array of the user selected regions. I am not clear on how to pass a javascript array to back end vb code. The window.localstorage as how it is given in the example don't seem to work out here. Can somebody help me out on how this an be done?
  This is the link of JVectorMap Region Selection - <a href="http://jvectormap.com/examples/regions-selection/" rel="nofollow">http://jvectormap.com/examples/regions-selection/</a></p>
  
  <p>Following is the code I have used so far.</p>
  
  <blockquote>
  <pre><code>&lt;script&gt;
  $(function(){   var maps;   maps = new jvm.WorldMap({
  container: $('#map'),
  map: 'xyz_map',
  regionsSelectable: true,
  
  regionStyle: {
    initial: {
      fill: '#B8E186'
    },
    selected: {
      fill: '#F4A582'
    }
  },
  series: {
  
  },
  onRegionSelected: function(){
    if (window.localStorage) {
      window.localStorage.setItem(
        'jvectormap-selected-regions',
        JSON.stringify(maps.getSelectedRegions())
  
      );
    }
  }
     });   maps.setSelectedRegions( JSON.parse( window.localStorage.getItem('jvectormap-selected-regions') || '[]' )
    );   });
  
     &lt;/script&gt;
  </code></pre>
  </blockquote>
  
  <p>Thanks in advance</p>
  
  <p>Sina</p>