Is it possible to detect if the visible map display more than one time the earth
For example, if Australia is visible twice or more like in zoom = 0
Regards
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
So the Google Maps displays textures with a resolution of 256 x 256. So at zoom level 0 you need a map canvas of 256+1 pixels wide or greater for the texture to wrap (or repeat). At zoom level 1 this doubles to 512+1, at zoom level 2 1024+1, etc.
This coding example puts a little text under the map to say whether the original width of the world (256 * 2 ^ zoom level) is wrapping based on the width of the canvas. If your canvas is 800 px width, then at zoom levels 0 & 1 your map will wrap, at zoom level 2 (which requires a minimal canvas width of 1024+1) your map is not wrapping.