Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: links between markers #208

Open
srilumpa opened this issue May 4, 2013 · 7 comments
Open

Feature: links between markers #208

srilumpa opened this issue May 4, 2013 · 7 comments
Milestone

Comments

@srilumpa
Copy link

srilumpa commented May 4, 2013

Hi,

I would like to suggest a feature. I haven't found it in the documentation nor in the examples so I suppose it does not exist yet.

I think it would be really great to implement the ability to create links between markers.

Here is an example:

$('#map').vectorMap({
...
markers: [
      {latLng: [41.90, 12.45], name: 'Vatican City'},
      {latLng: [43.73, 7.41], name: 'Monaco'},
      {latLng: [-0.52, 166.93], name: 'Nauru'},
      {latLng: [-8.51, 179.21], name: 'Tuvalu'}
],
links: [
      [0,2],
      [1,3],
      [0,3]
],
series: {
      links: {
            attribute: 'thick',
            scale: [1,5],
            values: [6,10,2],
            style: 'straight'
      },
},
...
});

That would create the four markers as it is done today. Then you would have 3 straight lines between markers: one linking Vatican City to Nauru, one linking Monaco to Tuvalu and one linking Vatican City to Tuvalu.

With attribute "thick", scale would be interpreted as the width of the line. Here, you would have the first line would be 3 pixels large, the second one 5 pixels large and the last one only 1 pixel large.

Style could be "straight" to have straight lines between the markers or "curve" to have something like a spline.

It would be useful to display everything linked to transfer between two points on a map (planes trajectories, commercial/financial exchanges, etc.)

Thanks for all the good work! jVectorMap is amazing!

@PereiraM
Copy link

+1 This would be a great addition to an already powerful tool.

@jdurand
Copy link

jdurand commented Jun 25, 2013

+1

1 similar comment
@Kabelaz
Copy link

Kabelaz commented Feb 26, 2014

+1

@bjornd bjornd added this to the 2.0 milestone May 18, 2014
@stefan-kolb
Copy link

👍

@bjornd bjornd modified the milestones: 2.0, NF Aug 11, 2014
@scooterlord
Copy link

+1

1 similar comment
@fdominik
Copy link

👍

fdominik pushed a commit to fdominik/jvectormap that referenced this issue Dec 20, 2017
@fdominik
Copy link

Hi,
I have created a Pull Request with an implemented functionality of drawing Lines on JVectorMap. I am currently using this in my personnal blog at https://sevenhillsaway.com/map/
So this issue should be related to the Pull Request #431

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants