neveldo / jQuery-Mapael

jQuery plugin based on raphael.js that allows you to display dynamic vector maps
https://www.vincentbroute.fr/mapael/
MIT License
1.01k stars 195 forks source link

SVG conversion #371

Closed drexel75 closed 6 years ago

drexel75 commented 6 years ago

Hello Vincent, I am wondering if I could convert such a SVG map as the one attached, keeping background colors, rivers, roads and train lines (the enclosed map has been converted from SVG to png). I am not familiar with Inkscape but I can dig into it, if necessary. Can you please tell me if this is feasible and if possible give me some hints to start? Thanks a lot !

departement 95 fond_bi_v 1 svg

neveldo commented 6 years ago

Hello,

The main goal of Mapael is to build choropleth maps, position cities, handle legends, etc. Its aim is not to build some kinds of navigation maps with road, rivers, etc. Maybe there are more appropriate tools to build such kind of maps (maybe through leaflet ?) .

That said, you still can try to build your map with mapael. You can draw the custom paths (for roads, train lines, rivers, etc) through the afterInit hook, in which you can draw wathever you want in SVG through the Raphael.js object, take a look at this example : https://rawgit.com/neveldo/jQuery-Mapael/2.1.0/examples/advanced/afterInit_extend_raphael_paper.html .

I hope it will help you !

drexel75 commented 6 years ago

Hello ! Thank you for your response! I need to investigate this afterInit possibility and check if this addresses my need. I will then add a post with my findings if it can help. Thanks again for your support !

drexel75 commented 6 years ago

Indeed, this works but to integrate each and every element in afterInit hook is quite a job! Thanks again!

neveldo commented 6 years ago

Great, you are welcome, I'm glad it helped you @drexel75 !