Closed valleyofdawn closed 7 years ago
Here is the algorithm in pseudo code:
The above algorithm is symmetric in terms of x and y meaning it doesn't matter if the route is horizontal or vertical it will always (in the happy flow) combine 16 tiles to create the image. It relays on tiles without cropping them (just resize at the end), which make it very stupid and very simple. Adding margin and cropping it in 1:2 ratio might prove hard to write, of course it is possible but the incentive here is very low, I agree that the outcome is not perfect and may not be polished like other features.
Maybe find a zoom that can contain the track in 4 horizontal by 2 vertical tiles and combine these 8?
Sound like a good idea, I'll see if I can easily write it, but it won't be 1:1.91 ratio, there will still be resize to do (although minimal in comparison to current resize) and this will not help with your margins issue... If it'll work I'll locally I'll upload it to the server since unfortunately I can't create a test site for this kind of change.
Turned out to be a relatively easy fix :-) most of the code was general enough to support adding the Y axis as parameter.
Your route now looks better (the margins are pure luck), thanks for the advise!
I'm not sure if the FB post image will get updated, probably not...
P.S. Sharing using the site on maps that are configured by the user will create an image on those tiles which is a great feature assuming it works (haven't really tested it, but you can see that it works with the MTB tiles).
I'm not sure overlays and POI are worth the time...
Empty routes (route with no points) will generate an image of the visible area using the closest tiles (image creation will take a rectangle route of the currently shared bounding box but will not draw the route, hard to explain, all you need to know is that sharing a map with an empty route will generate an image as well).
@valleyofdawn can we close this issue? I think the sharing is in a good state and high quality.
Just the issue with the crumpled up start and end point and we're done.
בתאריך 13 בנוב׳ 2016 14:49, "Harel M" notifications@github.com כתב:
@valleyofdawn https://github.com/valleyofdawn can we close this issue? I think the sharing is in a good state and high quality.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/IsraelHikingMap/Site/issues/156#issuecomment-260184338, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqEMV28BObaRbPl3h-XQbQFasAmnyEgks5q9wc_gaJpZM4H74zS .
After changes, added white outline, bigger start and end point and thicker line.
Strangely, it is not just the circles that are compressed, it's the line as well. Like some floating pen script.
Guy, leave it be. I'm done playing with it...
An automatic thumbnail of tracks would be nice to have when posting to facebook.