neveldo / mapael-maps

Vector maps for jQuery Mapael
MIT License
117 stars 139 forks source link

Romania map #17

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hello,

I'm trying to use SVG to Mapael to get the map of Romania. It works but in order to see the country map i have to scroll down. The svg i'm using is this: https://commons.wikimedia.org/wiki/File:Romania_location_map.svg

Can you please help?

Thank you

Indigo744 commented 8 years ago

The SVG file seems fine. It depends on what you did when converting to mapael. Did you follow the tutorial here http://www.vincentbroute.fr/mapael/create-map.php ? Can you provide a JSFiddle example?

ghost commented 8 years ago

I just saved the SVG file and used SVG to Mapael, without any other changes.

ghost commented 8 years ago

Jsfiddle here: http://jsfiddle.net/tn5AF/649/ And i used this svg: http://www.amcharts.com/svg-maps/?map=romania

As you can see the map doesn't begin from under the "Minimal example" text

Indigo744 commented 8 years ago

Please, as ask in the tutorial, open the SVG file in Inkscape as described. You would have seen this:

SVG Map in Inkscape

As you can see, the document boundaries (represented by a rectangle on the top left) are not around the paths. Hence why when converting, you get this huge space.

In order to circumvent the problem, simply follow the tutorial. Open the file in Inkscape and fit the page to content:

The areas in the new document may not fit with the document dimensions. In this case, go to File > Document Properties > Resize page to content, and click on the “Resize page to drawing or selection”.

ghost commented 8 years ago

It worked!

Thank you

Indigo744 commented 8 years ago

As a side note, the map in http://www.amcharts.com/svg-maps/?map=romania use the Mercator projection and not the equirectangular projection.