Hrm, so in other words my level encoding is not working... back to the
drawing board.  Thank you for the link.  I was using code from
usnaviguide on encoding, which was written in Perl but I've translated
it to PHP.  I'm guessing something got lost in the translation, so
I'll use the PHP code on the page you've provided as a guide to fixing
it.  Thanks much!

On Oct 27, 12:43 pm, "maps.huge.info [Maps API Guru]"
<[email protected]> wrote:
> I checked your map and thanks for the link, otherwise I wouldn't have
> figured it out.
>
> There are usually one of two problems people have with encoded
> polygons/lines. The first comes from a lack of understanding about
> when and how to use them, the second is a JavaScript problem. Your
> problem lies in the first case.
>
> The whole point of using this encoding scheme is to limit what points
> show at a particular zoom. Specifying all one character for your
> encodedLevels string essentially makes the encoding less than useless
> - it actually will cause poorer performance as the API has to
> translate the encoded string back into useful information in order to
> process the object. In your case, just sending coordinate strings
> would be a better option.
>
> I just changed your "EEEE..." encodedLevel string to "PPPP..." and it
> worked fine. Still a waste of time for using an expensive and time
> consuming thing but at least it works. I also suggest adding the
> following two lines of code to your map to make sure you're looking at
> the right thing:
>
>     var bounds = encodedPolygon.getBounds();
>     map.setCenter(bounds.getCenter(), map.getBoundsZoomLevel(bounds));
>
> This will make sure your map is centered and zoomed properly, in the
> chance that you didn't actually have the right encoding of your
> points.
>
> Next, I would suggest reading the following very interesting and
> informative piece on using encoding with the maps:
>
> http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/
>
> Mark essentially wrote the definitive article on the topic, reading it
> with understanding will help you understand the reasoning behind the
> encoded structure and purpose.
>
> -John Coryat
>
> http://maps.huge.info
>
> http://www.usnaviguide.com
>
> http://www.zipmaps.net
>
> And now Android apps:
>
> "Radar Now!"
>
> "What Zip Code?"
--~--~---------~--~----~------------~-------~--~----~
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