jQuery-Mapael icon indicating copy to clipboard operation
jQuery-Mapael copied to clipboard

Updating map areas from file

Open vikobeibe opened this issue 5 years ago • 0 comments

Hello, I am trying to load areas into the map. To do this I am making an Ajax call to a PHP script which then returns the areas formatted:

{
   "GH":{
      "value":"4",
      "tooltip":{
         "content":"<span style='font-weight:bold;'>GH</span><br />Hits : 4"
      }
   },
   "TR":{
      "value":"27",
      "tooltip":{
         "content":"<span style='font-weight:bold;'>TR</span><br />Hits : 27"
      }
   }
}

The data is stored in a variable msg and I'd like to use this variable when loading the map. However, I am not sure how to do this. In my script, If I simply do

},
areas: msg
...

nothing happens. I guess it should be extremely easy to use the Ajax response and feed it to the map but after a whole day trying I decided to ask for your help.

vikobeibe avatar Oct 29 '19 15:10 vikobeibe