littlerave
Posts: 37
Joined: Sun May 16, 2021 4:17 pm

SVG to map conversion

Hello,

So far I've been using the github page to convert SVG files into map data for my multi-leveled drilldown map. However, I'd like to dynamically upload an SVG file in my angular app to convert it into map data and then store it as drilldown map for a specific country in my database instead of using the github page to create the map data, then copy the respective parts out of the result to manually insert them into my database. Is there a way to install the SVG map parser into my app via npm or some other way to extend the Highcharts.data function to use the svg attribute object?
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: SVG to map conversion

Hello,

Thanks for contacting us with your question and apologise for the late reply!

The map-from-svg (https://github.com/highcharts/map-from-svg) is available only on GitHub. This is a public repo, so you can clone it, edit it locally and integrate it with your project. In case you will get TS errors while trying to integrate this code you could cast to any (as any). If you find any functionality missing (lack of NPM package, TS/Angular integration issues, any other errors or problems) please feel free to report them directly on the tool's repository as an issue (https://github.com/highcharts/map-from-svg/issues).

Let me know if you have any further questions,
Regards
Magdalena Gut
Developer and Highcharts Support Engineer

Return to “Highcharts Maps”