Closed hummingbird-dev closed 7 years ago
Hi @hummingbird-dev ,
You pointed out an interesting issue. For now, the only answer I have should be to modifiy the original map in order to add these margins, ie :
1 / Transform the JS map to SVG map (through the mapael to SVG convertor : https://www.vincentbroute.fr/mapael/svg-to-mapael.php ) 2 / With inkscape, add the margins all around the map 3 / Transform the SVG map back to a JS map : https://www.vincentbroute.fr/mapael/mapael-to-svg.php 4 / Adjust the getCoords() function to take into account the new top and left offsets.
I know this is not a trivial solution, but it should do the work, I'm still seeking for a better one, but feel free to contribute if you get it !
Hi, Thanks for the answer. I will try your solution and let you know if it worked.
@hummingbird-dev did you manage to do it? Or do you need more help?
Unfortunately I was not able to try it yet, I'm quite busy at the moment with some other stuff. However, as soon as will find time I will try it and let you know.
Can you explain me the need for such a thing? Do you want to plot something at the map limit?
Yes, I'm using the jQuery-Mapael maps to plot scientific data taken during ship expeditions on the global oceans. This includes the Arctic, Antarctica as well as regions near the International Date Line.
If I can find some time today, I'll try to import one of these map into Mapael.
Thanks a lot, that would be great. However, I think the "world_countries" map, I'm using, is not a Mercator projection. It looks rather like the equirectangular projection you sent in the first link. Anyway, an equirectangular projection from -180 to 180 and -90 to 90 would be perfect. Thanks again.
See the PR neveldo/mapael-maps/pull/43
Wow, thank you very much.
Thank you :) hope this helps
I've implemented the new map and it works like a charme (see figure).
Well, I don't quite understand what I'm seeing but I'm glad it helps you ;-)
@hummingbird-dev for your information, the map world_countries_with_antarctica.js
was renamed to world_countries_with_antarctica_full_long_and_lat.js
(see PR neveldo/mapael-maps#44)
Thanks.
Thanks for that great plugin. I started to play around with Mapael and found that points plotted far left (approx. <-175) and at the top (approx. >85) are not visible (see figure, where less than the half of the large points is visible). Sure, I can change the viewBox of the svg like $(".map_container").find("svg").attr("viewBox", "-40 -30 1030 530"); which will solve this problem. But this introduces new problems, e.g. with the zoom. Thus I would like to ask if it is possible to have a full view of the map from -180 to 180 and -90 to 90? Thanks.