I'm not using slippy map. For the project I'm doing I need static
images. I just can't sort out the math to find the veritcal position in
the tile map. I've tried mercator projection but I'm missing something.
I've tried to follow the logic in the javascript of the slippy map, but
without comments and with short var/function names I get lost.
Does anyone have a simple formula such that:
y = ....(lat)?
I've tried things like:
k = 4.0
y = log(tan(y*Math::PI/180.0) + 1/cos(y*Math::PI/180.0))/k
Which is the mercator projection formula (substituting 1/cos for sec)
from wikipedia.
Also tried a Miller cylindrical projection as that seems much more like
what the main tile looks like.
miller=2.30341254337639
y = 1.25 * log(tan(Math::PI/4 + 0.8 * (y*Math::PI/180.0)/2))/miller
No joy there either.
Any ideas?
--
Wayne Walker
[EMAIL PROTECTED] Do you use Linux?!
http://www.bybent.com Get Counted! http://counter.li.org/
Perl - http://www.perl.org/ Perl User Groups - http://www.pm.org/
Jabber: [EMAIL PROTECTED] AIM: lwwalkerbybent
IRC: wwalker on freenode.net
_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev