{"id":22206,"date":"2022-03-09T12:32:27","date_gmt":"2022-03-09T12:32:27","guid":{"rendered":"https:\/\/www.highcharts.com\/blog\/?p=22206"},"modified":"2026-01-13T11:24:24","modified_gmt":"2026-01-13T11:24:24","slug":"highcharts-now-prefers-topojson-maps","status":"publish","type":"post","link":"https:\/\/www.highcharts.com\/blog\/product-updates\/highcharts-now-prefers-topojson-maps\/","title":{"rendered":"Highcharts now prefers TopoJSON maps"},"content":{"rendered":"<p class=\"p1\">With Highcharts v10, we have built TopoJSON support and client-side projection into the core product. This means smaller map files, faster loading, and more flexible map layouts.<\/p>\n<p class=\"p3\"><b>TopoJSON<\/b><\/p>\n<p class=\"p1\"><span class=\"s1\"><a href=\"https:\/\/github.com\/topojson\/topojson\">TopoJSON<\/a><\/span> is an extension of <a href=\"https:\/\/geojson.org\/\"><span class=\"s1\">GeoJSON<\/span><\/a> that identifies shared polygon or line segments, typically a border between two countries, and refers it instead of repeating it. This, together with data compression of coordinates, greatly reduces file size compared to GeoJSON, and makes it highly suitable for use on the web. With the <a href=\"https:\/\/code.highcharts.com\/mapdata\/\"><span class=\"s1\">Highcharts Map Collection v2<\/span><\/a> we provide TopoJSON versions of our maps. Most of our <a href=\"https:\/\/www.highcharts.com\/demo\/maps\"><span class=\"s1\">map demo charts<\/span><\/a> are rewritten to use the new map sources.<\/p>\n<p class=\"p3\"><b>Built-in projection<\/b><\/p>\n<p class=\"p1\">Our legacy GeoJSON map sources were pre-projected, and information about the projection was encoded in the file. With use of a third party projection library it could be handled and longitude\/latitude could be used in the map. With Highcharts v10 this is no longer necessary, as projection is built right into the product. This allows some features that were not previously possible:<\/p>\n<ul class=\"ul1\">\n<li class=\"li1\">Projection can be updated dynamically and by preference like in the <a href=\"https:\/\/www.highcharts.com\/samples\/maps\/mapview\/projection-explorer\"><span class=\"s1\">Projection Explorer<\/span><\/a><\/li>\n<li class=\"li1\">Multiple map sources <a href=\"https:\/\/jsfiddle.net\/gh\/get\/library\/pure\/highcharts\/highcharts\/tree\/master\/samples\/maps\/series\/mapdata-multiple\/\"><span class=\"s1\">can be combined<\/span><\/a> in the same map<\/li>\n<li class=\"li1\">Setting and getting the map view (center and zoom) is more intuitive and always based on longitude\/latitude<\/li>\n<li class=\"li1\">In the future, we will start implementing support for web map tiling services (WMTS)<\/li>\n<\/ul>\n<p class=\"p3\"><b>Map insets<\/b><\/p>\n<p class=\"p1\">Another feature of the legacy GeoJSON maps was to project offshore areas next to the mainland. Think Alaska and Hawaii next to mainland USA. When we removed projection from the source files we no longer had control over that, so instead we created the <a href=\"https:\/\/www.highcharts.com\/docs\/maps\/mapview-and-projection#insets\"><span class=\"s1\">MapView Insets<\/span><\/a> feature. It allows rendering features within a certain geographic area into a frame in the map, all defined in the chart configuration. But to make it more useable, we added a recommended map view node to some of the TopoJSON map sources, which will include recommended inset definitions. Furthermore, this is completely extendable and can be replaced, removed or modified by the chart configuration.<\/p>\n<p class=\"demo-container\"><iframe style=\"width: 100%; height: 490px; border: none;\" title=\"A US map with insets\" src=\"https:\/\/www.highcharts.com\/samples\/embed\/maps\/mapview\/insetoptions-border\" height=\"550\"><\/iframe><\/p>\n<p class=\"p3\"><b>A better world map<\/b><\/p>\n<p class=\"p1\">As projection was removed from the source files, we needed to make sure maps look good by default. For small parts of the globe we chose the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Lambert_conformal_conic_projection\"><span class=\"s1\">Lambert Conformal Conic<\/span><\/a> projection, which is already recommended by many countries.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p class=\"p1\">For world maps, the most common map projection on the web is the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Web_Mercator_projection\"><span class=\"s1\">WebMercator<\/span><\/a>, but that is mainly because it works good with tiled map services. All in all it is not the best representation of the world map because it extremely exaggerates the size of polar areas. Another popular projection is <a href=\"https:\/\/en.wikipedia.org\/wiki\/Robinson_projection\"><span class=\"s1\">Robinson<\/span><\/a>, but it has also been criticized for emphasizing regions like Europe and North America.<span class=\"Apple-converted-space\">\u00a0<\/span><\/p>\n<p class=\"p1\">Therefore, we chose the <a href=\"https:\/\/en.wikipedia.org\/wiki\/Equal_Earth_projection\"><span class=\"s1\">Equal Earth<\/span><\/a> as the default world projection. It was created as a response to the criticism. It retains the relative areas of countries, is visually pleasing like the Robinson, and also renders fast. It has been taken up by NASA among others.<\/p>\n<p class=\"demo-container\"><iframe style=\"width: 100%; height: 600px; border: none;\" title=\"A world map with Equal Earth projection\" src=\"https:\/\/www.highcharts.com\/samples\/embed\/highcharts\/blog\/world-projection\" height=\"600\"><\/iframe><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn more about how the benefits of TopoJSON support and client-side projection into Highcharts&#8217; core product.<\/p>\n","protected":false},"author":49,"featured_media":22343,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"meta_title":"","meta_description":"","hc_selected_options":[],"footnotes":""},"categories":[1103],"tags":[876],"coauthors":[734],"class_list":["post-22206","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-product-updates","tag-highcharts-maps"],"_links":{"self":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts\/22206","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/users\/49"}],"replies":[{"embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/comments?post=22206"}],"version-history":[{"count":2,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts\/22206\/revisions"}],"predecessor-version":[{"id":29366,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/posts\/22206\/revisions\/29366"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/media\/22343"}],"wp:attachment":[{"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/media?parent=22206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/categories?post=22206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/tags?post=22206"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.highcharts.com\/blog\/wp-json\/wp\/v2\/coauthors?post=22206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}