On May 28, 5:19 pm, Esa <[email protected]> wrote:
> Try in your getUrl()
>
> function getUrl(ll, z){
> ll.x = ll.x % (1 << z);
> ...
>
> ...
> }
>
> There is a meaningless misbehavior but I don't even remember what was
> it.http://koti.mbnet.fi/ojalesa/v3/osm_dual.htm
The "mod" of a negative number is another negative number. If you
cross the International Date Line from right to left, the tile number
will be negative.
Try:
ll.x ^= (ll.x>>z<<z);
to clip off the overflow bits. It will always produce a positive tile
number.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.