Search code examples
highchartsgeojsonhighmaps

Using a geojson with highmaps


I want to display some data about San Francisco using highmaps but there is no maps of the different neighborhoods in SF in the highmaps library so I found an geojson of San Francisco wich was validate by this site: geojson validator but when I use the highmaps validator he doesn't read it: the highmap validator

$('#run').click(function () {     
var geojson = $.parseJSON($('#geojson').val());

// Initiate the chart
$('#container').slideDown().highcharts('Map', {
    series: [{
        mapData: geojson
    }]
   });    
});

This is my geojson: pastebin code. Do you know why it's not validated by highmaps but it's validate by the geojson validator? Or do you know a San Francisco map which will be validated by highmaps?


Solution

  • Consider importing your .geojson into QGis, then exporting it out again. In my experience any .geojson that QGis produces is usable by Highmaps. Also see this tutorial Creating custom geojson maps for Highmaps with QGis.