akuranz
Posts: 1
Joined: Mon Feb 28, 2022 2:33 am

Can you still post in specific coordinates or is the only option the default?

Hi I am trying to figure out map projections. I'm mapping a GeoJSON file of 7 states in the Interior Wester U.S. (AZ, CO, MT, NM, NV, UT, WY) with the goal of eventually mapping river watersheds. I would love for the map to look similar to the map in the "custom/us-all-territories" js file Highcharts provides.

I worked with the us-all-territories map to exclude all other states and territories except the seven I need to isolate here:
https://jsfiddle.net/akuranz/gxz4pwun/14/

But can seem to replicate that projection here:
https://jsfiddle.net/akuranz/uhqxwprd/60/

The javascript files are set up with the same pre-proj data. I really want to understand how the default project on the fly feature works in Highcharts bc when I map river watersheds there will be no way for me to start from one of the provided maps.

Thank you in advance!
magdalena
Posts: 517
Joined: Tue Aug 24, 2021 1:32 pm

Re: Can you still post in specific coordinates or is the only option the default?

Hello akuranz,

Welcome to our forum and thanks for contacting us with your question!

If you would like to combine your geojson with series.data you can do this by various keys (hc-key, iso-a2, name, etc.) and series.joinBy.

Example:
When you have ('AZ', 'CO', 'MT', 'NM', 'NV', 'UT', 'WY') in your data, and want to combine it with geojson, you need to find the name of the key associated with them.

From your geojson:

Code: Select all

"STUSPS": "AZ"

Then you need to set series.joinBy: 'STUSPS' and additionally series.keys: ['STUSPS', 'value'], because Highcharts needs to recognize that in your 2D array, the first element is STUSPS and the second one is value.

Demo:
https://jsfiddle.net/BlackLabel/ve9orju5/2/

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

Return to “Highcharts Maps”