sg

Cuma, Kasım 25, 2005

Re: zoomfactor jumps to 17


The reason is that subtraction is unambiguous in Javascript, but the +
operator can mean arithmetic addition or string concatenation. If either
of the objects involved in the + operation is a string, then Javascript
uses string concatenation instead of arithmetic addition.

"3" - 1 gives the result 2 by arithmetic subtraction, but "3" + 1 is
considered to be string concatenation and gives the result "31". If you
try to use the string "31" as a number, it gets converted to the number
31. 31 is out of range for a zoom level and the API changes it to 17.

--
The Blackpool Community Church Javascript Team
http://www.econym.demon.co.uk/googlemaps/

0 Comments:

Yorum Gönder

<< Home


Komik Videolar   islam  şarkı sözleri  yemek tarifleri  gelibolu  huzur   sağlık