Open fdominik opened 6 years ago
hi fdominik, thank u for the pull supporting lines,but i have a problem about overlaying the lines on the shapefile below. the shapefile(just called the base map) and the lines over are in the same coordinate system, but how can i transform these at same time and so these can be displayed correctly? thank u very much!
I am not really sure if I understand correctly. If you need to redraw the lines (e.g. for some movement of the objects etc...), you can call repositionLines(), which is available If you need some other transformation, the best would be some code example of what you are trying to achieve.
BTW.: I have an update to thus pull request, where I have added toggle switch next to zoom buttons to allow switching on/off the lines on the map. However I am still not satisfied with results (CSS is not my strongest skill) so I will push this later when I will resolve it.
thank u for you answer! i didn't make my point. sorry~ i have two kinds of data ,one is polygon shapefile, the other is line shapefile. this two files have the same coordinates(wgs1984),so the line is well displayed over the polygon,for example, the line is in the middle of the polygon. but now i use the processor program transform the polygon and the line shapefiles into jvectormap format independently,so in the jvectormap object these two dismatched. how can i get the Lat and Long of the points of the line that match the polygon well?
@fdominik Thanks for your awesome work. The only problem is that it seems we can only set color for one line?
@gezichenshan oh indeed, I didn't have this in mind when doing it. I am thinking, is it already working anywhere in jvectormap? I think markers can also have only one color, am I right?
I am thinking how this can be realized, maybe adding a new property next to points, text, something like
{points: [[31.52, -87.37], [21.18, -157.49]], color: #ffffff, text: "second path"}
what do you think?
Also I have in my local repo stil a change to it to add UI controls to toggle on/off the lines. However I am not a graphic specialist and still it somehow doesn't look that perfectly like the other controls of jvectormap. So any help would be welcome :)
@selinafocus I am not sure about the transformation. I haven't used the processor transformation, maybe some unit tests would be nice to see where it doesn't work. the true is there is probably no transformation for lines in the processor, because I have never used the processor yet, so I am not sure how it works. Are you a developer who can take a deep look into it or rather a user of jvector map?
@fdominik Thank you for your reply. Setting a new property "color" is a good choice. Anyway, maybe there is no need to set different color for different line. I am not good at graphic, either. May somebody can help :)
I have added support for creating lines between markers (or rather a points defined by Lat and Long). There is not much functionality (like creating Arcs), but styling of Lines and Line Labels works. Lines can be defined as:
The best to test the functionality is to see lines.html page.