curious1
curious1

Reputation: 14717

Loading map data from highcharts.com

I am playing with Highmaps to see how it works. I notice that in its examples, all the maps are loaded from this place:

https://code.highcharts.com/mapdata/

Questions:

  1. Is the above link for production?

  2. Would it be better to have a copy on my own server? If yes, where to download all the maps?

Upvotes: 0

Views: 461

Answers (1)

MorKadosh
MorKadosh

Reputation: 6006

Yes indeed. The mapdata is actually the official collection of maps by Highcharts.

As described on the official docs: http://www.highcharts.com/docs/maps/map-collection

You can simply load the maps using script tags, AMD or any other way of module loading, by including the files hosted on Highcharts's servers, for instance:

<script src="http://code.highcharts.com/mapdata/custom/world.js"></script>

All of the maps in the collection are also available in geojson format and svg.

In my projects, I'd rather download the maps and load them from my server's local system. I don't believe it really matters, but since I did not expect these maps to change any soon, I could allow myself to have a copy of my own. The reason I did it was since I used AMD (requirejs), and with that I could load the maps as modules.

Upvotes: 1

Related Questions