It is currently Fri Sep 22, 2017 7:01 pm Advanced search

JSONs not working in Highmaps

Technical support, bug reports and more.

JSONs not working in Highmaps

Postby Katwood » Thu Sep 14, 2017 2:00 am

Hey all,

I was mocking up a map with specific countries highlighted in the Fixed Tooltip with HTML map. I edited the JSON, validated it, and hosted it at myjSON. As you can see, that first version worked: http://jsfiddle.net/katwood/2ppqpm8n/

When my data became more solid, I added a few more countries to the JSON, validated that one, and hosted it at myJSON again. However, when I add the new UPI for the new JSON, the whole thing fails: http://jsfiddle.net/katwood/2ppqpm8n/10/

I just changed the UPI, but other than that, everything's the same. What happened?
Katwood
 
Posts: 6
Joined: Wed Aug 03, 2016 8:19 pm

Re: JSONs not working in Highmaps

Postby daniel_s » Thu Sep 14, 2017 6:35 pm

Hi Katwood,

On this forum, we are solving only the problems related with Highcharts, Highstock and Highmaps libraries. It isn't looks like the problem with any of them. Generally, there is a problem with your JavaScript implementation, exactly in that place:
Code: Select all
$.each(data, function() {
    this.flag = this.code.replace('UK', 'GB').toLowerCase();
});


I repaired that, and I have a tip for you.
In code above, you want to refer to the this.code object, but not everyone from each objects from passed data has got this one. Please, take a look at that little closer.

Best regards!
Daniel Studencki,
Highcharts Developer
daniel_s
 
Posts: 35
Joined: Fri Sep 01, 2017 1:01 pm

Re: JSONs not working in Highmaps

Postby Katwood » Sat Sep 16, 2017 1:53 am

That's the same code that's in the demo version. What did you fix?
Katwood
 
Posts: 6
Joined: Wed Aug 03, 2016 8:19 pm

Re: JSONs not working in Highmaps

Postby Katwood » Mon Sep 18, 2017 8:48 pm

Issue resolved; the JSON has been edited.
Katwood
 
Posts: 6
Joined: Wed Aug 03, 2016 8:19 pm


Return to Highmaps Usage

Who is online

Users browsing this forum: No registered users and 0 guests