Australia - Highmaps
Highmaps demo
HTML
<script src="http://cdnjs.cloudflare.com/ajax/libs/proj4js/2.2.2/proj4.js"></script>
<script src="http://code.highcharts.com/maps/highmaps.js"></script>
<script src="http://code.highcharts.com/maps/modules/exporting.js"></script>
<script src="http://code.highcharts.com/mapdata/countries/au/au-all.js"></script>
<div id="container"></div>
CSS
#container {
height: 500px;
min-width: 310px;
max-width: 800px;
margin: 0 auto;
}
.loading {
margin-top: 10em;
text-align: center;
color: gray;
}
JavaScript
$(function () {
// Prepare data with all values being 0.
// We will later increment the value for each lat/lon point that matches.
H
// Initiate the chart
$('#container').highcharts('Map', {
// Enable colorAxis
colorAxis: {
min: 0
},
series : [{
data : data,
mapData: Highcharts.maps['countries/au/au-all'],
joinBy: 'hc-key',
dataLabels: {
enabled: false, // Make sure data labels are disabled until we have calculated the location of the lat/lon points. Otherwise, the document.getElementFromPoint() method might return the data label element.
format: '{point.name}'
}
}]
}, function (chart) {
// Callback function called on chart load
// Here we go through the list of lat/lon points and change our data accordingly.
var pointSeriesData = [],
latLonList = [
// Western Australia points
{lat: -24.731284, lon: 122.261538},
{lat: -22.638773, lon: 116.812319},
// Northern Territory points
{lat: -18.983616, lon: 131.709780},
// South Australia points
{lat: -28.153783, lon: 132.017397},
{lat: -27.337047, lon: 138.916811},
{lat: -31.395301, lon: 133.379702},
// Queensland points
{lat: -21.048021, lon: 143.399233},
{lat: -24.491566, lon: 146.870913},
// New South Wales points
{lat: -29.882964, lon: 146.783022},
// Victoria points
{lat: -36.248188, lon: 141.861147},
{lat: -37.269173, lon: 147.046694}
// No points for Tasmania or Norfolk Island
],
// Get chart Point object from lat/lon coordinates
...