0

To this topic I have found a very good and helpful entry:

Map View draw directions using google Directions API - decoding polylines

But I have a question to the answer of Kenny. He has written a function called decodeZoomLevels(String encodedZoomLevels)

and what paramenter is the encodedZoomLevels?

As my direction API response I get a polyline entry like this:

     .
     .
     .        
      "polyline" : {
                    "points" : "grheHevjqAo@i@WMm@]a@QUGoAKqAG{@Ea@Ge@E]Im@Wa@Ou@Uy@MEI]OAICGEECAGAG@A@A?CBABAFc@HOJeB?}FNiBHaENw@Be@Bc@Ee@Gq@Wo@[w@i@[c@c@q@mAgC_@u@e@{@aA{Ai@k@u@w@c@g@w@gAiAqBMUEIaCsEmBuDqBqEkAyB{@gASWs@s@aBcBc@o@g@{@_@w@c@m@USWOg@O_@E}AGS?UA[COCe@O}@s@q@kA[aAUuASmAS}@So@IOQYc@s@w@u@u@Y"
                 },
     . 
     .
     .

As you can see the polyline entry has only another entry called "points", but wehere is the entry "zoomlevel" as Kenny is describing?

Hope you can help.

Community
  • 1
  • 1
Chris
  • 521
  • 1
  • 5
  • 14

1 Answers1

0

Zoom levels is the array of integers, where each number control the appearance of points in different zoom levels. In other words, if it is present, it can reduce number of points visible in lower zoom levels, but allowing to show more details when zooming in. It is not generated automatically, and I suppose to generate such a feature you need to implement polygon reducing algorithm.

Do you really need it? Read more in google's manual.

dmitry
  • 4,989
  • 5
  • 48
  • 72