Add ability to plot points based on Longitude/Latitude on HighMaps
As I learned from Sebastian, it seems the BETA version of HighMaps supports GeoJSON for rendering, but does not have a function to convert a given lat/lon point to a point on the map.
This feature would be extremely useful for visualizations related to Maps.
-
@cxytomo: Please contact our support for technical questions, as this board is reserved for feature requests. See http://www.highcharts.com/support.
-
cxytomo commented
Hi, I want to add mappoint to map when I click a 'click to addpoint' button. I use mapdata from http://code.highcharts.com/mapdata/ and I enrolled proj4 before all the js file. Highcharts version 4.1.9, Highmap version is 1.1.9, map data version 1.1.1. I changed province names in map data from English to Chinese.
Still it report error 22. Map does not support latitude/longitude
-
A getting started article is provided at http://www.highcharts.com/docs/maps/latlon.
The API docs have also been updated to reflect the new functionality: http://api.highcharts.com/highmaps.
We also have some new demos using lat/lon: http://www.highcharts.com/maps/demo.
-
Amit commented
Great news, now that it's implemented, where can I find documentation?
-
Josh McCullough commented
When is this expected to be released? Currently we're using this branch (https://github.com/highslide-software/highcharts.com/tree/latlon) but I don't feel real good about it, since it's 700+ commits behind master!
-
Marcus: Unfortunately it doesn't look like 1.1 will be out before next year. The lat/lon code is considered stable, however, so you could run the code from github as shown in the comments below. Hope this is okay for you.
-
Marcus Henningsen commented
We're interested in this feature, too. In fact we would want to implement it as soon as an Jan 2015, so I would just humbly like to ask if you're still counting on a 1.1 to be released before the end of this month?
-
See our roadmap for time estimates: http://www.highcharts.com/support/roadmap
Currently we expect Highmaps 1.1 to be released in Q4 2014.
-
Amit commented
Hey, any thoughts on when this will be released?
Thanks! -
Latitude/longitude support will be available in the upcoming version of Highmaps. It will rely on the proj4 library for projection conversion, and will work with the official Highmaps Map Collection (from v1.1.0 onwards). We will publish documentation on how to make lat/lon work with custom maps once we are ready for release.
For now, the in-development code can be found in the "latlon" branch on github. See these jsFiddles for a preview: http://jsfiddle.net/oysteinmoseng/f97jkgz6/ http://jsfiddle.net/oysteinmoseng/s8yc0cxk/
-
Anonymous commented
I am trying to add POIs to a state map but they appear outside the map. Coordinates work seem to work correctly on a world map but not state. Can you please help?
http://jsfiddle.net/vc8hswxv/6/ -
Eugene OZ commented
Admin, but if I use maps from your collection, I can't use long/lat coordinates.
-
Anonymous commented
Ok, i got it. (thanks! : )) Here the fiddle : http://jsfiddle.net/V6Z7Q/6/
But when you play a lot with the zoom, the cities are out of their original places.
I need to hide and show again any serie to make the points correct. -
Anonymous commented
Hey Alexis! I combined your fiddle with Highmaps demo example called "GeoJSON with rivers and cities", and here is what I got
Hope this helps
-
Alexis commented
Hello,
I've try to make it works, but there is something i'm missing.
i've made a very simple geojson world map here : http://geojson.io/#id=gist:anonymous/d5c2f0456dc9da73dba4&map=2/24.7/-3.2
and another one representing Australia with a point close of Australia here :
http://geojson.io/#id=gist:anonymous/eb365ae30cac3abc85a6&map=2/10.7/14.1And try to load inside highmap here :
http://jsfiddle.net/V6Z7Q/2/The point is not visible.
Could you help me ?
Thanks.
Alexis
-
Roger Guess commented
I would also like to see this ability. Torstein, I have looked for examples of the solution you suggested, but have not found one yet.
-
You can use latitude and longitude directly in your GeoJSON. Then the X and Y coordinates of any point, line or area of the map will correspond to latitude and longitude. The Axis.toValue and Axis.toPixels method will translate between lat/long and pixels.