PHP Classes

I found an error in its class

Recommend this page to a friend!

      ah Map Helper  >  All threads  >  I found an error in its class  >  (Un) Subscribe thread alerts  
Subject:I found an error in its class
Summary:Error reading the zoom
Messages:4
Author:Cleverson Rodrigo Oliveira
Date:2016-05-17 15:24:09
 

  1. I found an error in its class   Reply   Report abuse  
Picture of Cleverson Rodrigo Oliveira Cleverson Rodrigo Oliveira - 2016-05-17 15:24:09
If i use the URL:
google.com.br/maps/@-22.7405789,-47 ...
The class does not identify the zoom and return an error.
Note that the zoom can be a float and the class only identify as integer

  2. Re: I found an error in its class   Reply   Report abuse  
Picture of Axel Hahn Axel Hahn - 2016-05-17 21:27:36 - In reply to message 1 from Cleverson Rodrigo Oliveira
Hi,

thanks for your report.

If I look at
developers.google.com/maps/document ...
here the zoom level (methods getZoom() and setZoom(value)) is a *number* (not a float). Using +/- buttons on lower right changes the zoomlevel +/-1.

Hm. Maybe it is a kind of a undocumented feature to use a float zoom level that "just works" on Google?!

If somebody should be sure about it I would be happy to get a comment.

regards
Axel

  3. Re: I found an error in its class   Reply   Report abuse  
Picture of Cleverson Rodrigo Oliveira Cleverson Rodrigo Oliveira - 2016-05-19 19:28:30 - In reply to message 2 from Axel Hahn
I used the mouse scroll, not the buttons. Perhaps the operation is different.
However, when we provide a tool for users, it is extremely frustrating when returns an error, so we should take every precaution.

  4. Re: I found an error in its class   Reply   Report abuse  
Picture of Axel Hahn Axel Hahn - 2016-05-22 18:49:43 - In reply to message 3 from Cleverson Rodrigo Oliveira
OK, I see it. Thanks for your hint.

I can offer to parse the zoom level as float in the first step.

But OSM cannot handle these zoom levels as float and redirects to an integer zoom level. So the optical results of 2 generated links can differ. This can be an unwanted behavior in some cases.
So I need to add something to use a strict mode or a lazy one and send it in an additional return message/ return code.

I also saw the maximal zoom level differs between map service providers (Yandex: 18; OSM: 19; Google: 21).
This must be added too.

I hope these suggestions fit your needs. Otherwise let me know.

regards,
Axel