bratliff wrote: > On Dec 24, 1:41 pm, "Neil.Young" <[email protected]> wrote: > >> bratliff schrieb: >> >> >> >> >>> On Dec 23, 9:48 pm, "Neil.Young" <[email protected]> wrote: >>> >>>> http://maps.alphadex.de/maps/test.html >>>> >>>> Hopefully this is of use now. More than 50 lines, but surely not too >>>> hard to understand. >>>> Regards >>>> >>> The "polylines" property of the first argument of GPolygon.fromEncoded >>> must be an array. >>> >>> Replace: >>> >>> new GPolygon.fromEncoded({polylines:poly ... }); >>> >>> With: >>> >>> new GPolygon.fromEncoded({polylines:[poly] ... }); >>> >> OK, that does the trick.> Five decimal places of accuracy is enough. The >> API ignores the extra >> >>> precision. >>> >> OK, I think I can limit this> If you use quotes around the property names of >> your object, I believe >> >>> you must use "eval". I may be wrong. It works without the quotes. >>> It fails with the quotes. >>> >>> Unless '__type':'Google+point' serves a useful purpose, it consumes a >>> lot of extra memory. >>> >> The __type things have been added be the .net JSON serializer. Unless I >> don't serialize it manually, I don't have too much influence on that, I >> believe. >> >> Thanks for your help. The "fromencoded" does not perform that fast, as >> the initial sequence does. Can you confirm that? >> > > I agree. > > Using "fromEncoded" GPolys to improve speed is a common > misconception. > fromEncoded works great at enabling much higher detailed polygons to be rendered and perfrom reasonably if you use an appropriate "levels" string which the API uses to simplify rendering when zoomed out. It can be used to enable things like ...
Mark McClures example of the british coastline ... its performance cant be duplicated (save by using tiles in all likelihood). http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/BritishCoastline.html Using encoded polylines wrong is the main way you would get worse performance out of them. Doing something silly like encoding large numbers of 2 point (ie line segment) data or using a levels string which causes it to be fully rendered at all zoom levels will actually slow down performance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
