Andrew Leach schrieb:
> On Mar 15, 9:07 am, "neil.young" <[email protected]> wrote:
>   
>> a) Querying for routes - OK
>> b) Decoding returned polyline and levels - OK
>> c) Transform polyline geocodes to picture coordinates and drawing the
>> line - OK
>> d) Question: How to interpret the level for each point?
>>     
>
> What the level does is to provide information about whether a
> particular point is "necessary" at a particular zoom. Points are only
> missed out if they will make no material difference to the shape of
> the polyline. The relationship between letters and zoom levels is
> explained by Professor McClure at
> http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/description.html
>
>   
Hmm. Sorry for insisting. I'm not sure with the "particular zoom" claim.

Concerning 
http://code.google.com/intl/en/apis/maps/documentation/polylinealgorithm.html

"An encoded level value of 3 in this case would ensure that a point 
appears in all zoom level, while a level of 0 will ignore points 
specified beyond zoom level 5. The endpoints of a polyline should often 
be set to the largest encoded level, to ensure that the endpoints will 
appear in all zoom levels and the line is drawn correctly."

and further:

Level 0 Zoom levels 0-5
Level 1 Zoom levels 6-10
Level 2 Zoom levels 11-14
Level 3 Zoom levels 15-18

Means to me: In the current realization (numLevels = 4)  a level 
describes not a particular zoom (the encoding method used _could_, but 
it doesn't), but a group of zoom levels.  And from all, what I can see, 
currently the 4 levels subdividing the available zoom stages into 4 
groups (BTW, 18? Why 18?). With every increasing level a point is 
visible in more zoom stages (is "more visible"). I.e. from the spec a 
point at level 3 is visible at all zooms, but a point at level 0 just 
for zooms from 0 to 5. If a point is given level 1, it inherits 0-5 and 
adds zoom 6-10. If a point is at level 2, it inherits from level 0 and 
1. The 3 has it all...This is my interpretation, but the Google spec is 
very unclear on this.

To be more specific: Here is a direction (polyline and levels) returned 
by Google, describing a short drive in Berlin (from Brandenburg Gate to 
Großer Stern):

52.51639, 13.37819, Level 3
52.51625, 13.37821, Level 3
52.51625, 13.37821, Level 3
52.51629, 13.37951, Level 3
52.51629, 13.37951, Level 3
52.51638, 13.38084, Level 3
52.51638, 13.38084, Level 3
52.51674, 13.3807, Level 0            
52.51809, 13.38044, Level 3
52.51809, 13.38044, Level 3
52.51787, 13.37725, Level 0
52.51779, 13.37696, Level 3
52.51779, 13.37696, Level 3
52.51705, 13.37723, Level 0
52.51681, 13.37727, Level 0
52.51668, 13.37722, Level 0
52.5165, 13.37698, Level 0
52.51629, 13.37686, Level 3
52.51629, 13.37686, Level 3
52.516, 13.37197, Level 0
52.51579, 13.36927, Level 0
52.51472, 13.35265, Level 0
52.51468, 13.35193, Level 0
52.51479, 13.35106, Level 3
52.51479, 13.35106, Level 3
52.51491, 13.35095, Level 0
52.5151, 13.3506, Level 0
52.51519, 13.35025, Level 0
52.5152, 13.34995, Level 1
52.51518, 13.34979, Level 0
52.51507, 13.34947, Level 0
52.51474, 13.34912, Level 3


The first "Level 0" after the initial 3s describes a small bend in the 
straight line between "The Adlon" and the left turn at Dorotheenstrasse, 
so I would understand, that this bend isn't necessary to be drawn at 
zooms below 5 (it isn't necessary for all zooms < 10, I would say). The 
last sequence 3 0 0 0 1 0 0 3 forms a curve with a radius of ~100m, I 
bet, this isn't really necessary to be shown, if Europe is in the scope.

But I don't really understand the notation used in the documentation. If 
I'm right with my interpretation, the documentation should better say: 
Every next level adds this and that zoom level(s) to the zoom levels, a 
point is visible in. Am I right with this? If yes, 1 would _not_ mean 
"Visible from 6 to 10" (as implied by the doc) but  visible from 0 to 10.

Sure, you are not the right persons to address this, but interpretations 
welcome.

> Andrew
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to