Jquery Mapael : How to dynamically construct the list of areas?

340 Views Asked by At

currently, when you initialize the areas, you have to write something like :

areas : { 'id1' : { ... },}

My problem is that I would like to initialize it with a variable, but if I write :

var myareas={}
var myareas['id1']={...}

areas: myareas

This doesn't work as it generates :

areas : { id1 : {...}}

stripping the quotes around id1

Any idea?

0

There are 0 best solutions below