Thanks, Jamie. If I could possibly understand it --which I doubt, my
javascript being limited mostly to what I can copy and paste-- your
suggestion might work if I was just generating *one* polyline, but I'm
trying to replicate KML functionality. That is, create a bunch of
polylines and polygons that are going to be shown and hidden as a
group, a "category" in an array.

This exercise comes from my problems trying to create tiny polygons
from a KML file: 
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/85500436cbc38279#
I just can't face tearing up the whole map to get a few polylines and
polygons working! I've looked at a hundred different codes from links
in this forum, tried a dozen different ways to simply add a few
polylines and can't get anything *simple,* that will work with my
markers the same way they do, so that I can have my polys listed in my
sidebar and show and hide them as a group/category.

Maybe this will never work! Thanks, though, for considering my
problem.

On Mar 9, 10:44 am, Jamie Hammermann <jhammerm...@gmail.com> wrote:
> This may address issue #1 - I created a 'route' class which has
> functions to generate the polylines.
> Go tohttp://216.27.39.120/caspmaps/click on a point, then 'Detailed
> Route' and you will see the polyline generated on-the fly.  The
> javascript class is inhttp://216.27.39.120/caspmaps/droute.js
>
> Note that the xml (bastardized kml) containing the polyline info is
> loaded onload, but the polyline isn't generated until the class
> function is called.
>
> You may also be able to extend your class to contain marker overlays.
>
> On Mar 9, 8:27 am, BuckyE <ex...@luckypro.biz> wrote:
>
> > Thanks, Grok. I see I'm not explaining my problem correctly. My
> > Questions should probably read more like:
>
> > 1. Write a global function defining how to create polylines/
> > polygons...
> > I've tried to use Mike William'shttp://econym.org.uk/gmap/example_map7.htm
> > as my basic code. But in his, the polylines are created during onload,
> > from a function that exists only there. He's not calling a global
> > function. My test map won't make the polylines. I suspect there's some
> > problem between the variables being called in my two functions (global
> > and local to onload) for polylines.
>
> > 2. In this global function, push them into a categorized array that
> > will also contain marker overlays...
> > I'm hoping that using one categorized array will allow me to build
> > clickable sidebar entries for the various polylines and polygons as a
> > Category, just the way my markers get a Category with a Header in the
> > sidebar. Is this going to mess me up?
>
> > 3. Call the global function in my onload, reading the data from my XML
> > document...
> > When I first set up his map, I had to write the parsing function for
> > lat and lng in a very specific way:
> > "var lat = parseFloat(GXml.value(markers[i].getElementsByTagName("lat")
> > [0]));"
> > No other version of this parse statement will read my XML document
> > correctly. I have no idea why my code needs to be *exactly* that. It
> > took forever to find an example of code that worked for me! Now, I
> > have to somehow merge Mike's
> > "pts[i] = new GLatLng(parseFloat(points[i].getAttribute("lat")),
> >                                    parseFloat(points[i].getAttribute
> > ("lng")));" with my eccentric parsing method. I'm stumbling.
>
> > So any examples of creating polylines and polygons in this simple,
> > brute force way would be greatly appreciated.
>
> > On Mar 9, 12:06 am, Grok Lobster <discgolfm...@gmail.com> wrote:
>
> > > Here's a page that will help you with 
> > > #1,http://discgolfmaps.googlepages.com/Trailblazer.html
>
> > > On Mar 8, 8:16 pm, BuckyE <ex...@luckypro.biz> wrote:
>
> > > > Yes, sadly I"ve read a hundred posts here. None of them that I can see
> > > > give a working example of the code to:
> > > > 1. write a polyline/polygon creating function,
> > > > 2. call it from within the onload function while reading the data from
> > > > XML, and
> > > > 3. push the lines'-gons into a categorized array.
>
> > > > If I could find such code, that would be terrific!
>
> > > > On Mar 8, 1:46 pm, "geocode...@gmail.com" <geocode...@gmail.com>
> > > > wrote:
>
> > > > > On Mar 8, 10:36 am, BuckyE <ex...@luckypro.biz> wrote:
>
> > > > > > Trying now to create a brute force, easy for amateurs solution to 
> > > > > > the
> > > > > > GeoXml Garden Shed Inaccuracy Problem. The newest wrinkle is that 
> > > > > > I'd
> > > > > > like to handle my polylines and polygons the same way I handle my
> > > > > > iconed point markers: by "category." This, mainly because my map
> > > > > > already has a pleasing routine for showing and hiding markers by
> > > > > > category, and I'd prefer not to introduce a new, potentially
> > > > > > confusing, method on the interface.
>
> > > > > > My current map is 
> > > > > > athttp://lovebunnies.luckypro.biz/01_stuff/roman_holiday/romanholidayma...
> > > > > > . The map I've screwed up trying to add polylines as a test is 
> > > > > > athttp://lovebunnies.luckypro.biz/01_stuff/roman_holiday/romanholidayma....
> > > > > > Something about the createmarguttalines function makes a Google 
> > > > > > script
> > > > > > hang, but I have no idea what!
>
> > > > > > Any help would be greatly appreciated. (And I hope I don't find
> > > > > > another oddball problem along the way this time! Sooner or later the
> > > > > > patience of the experts is going to be too sorely tried, I bet.)
>
> > > > > Did you look at the other examples that have been discussed in the
> > > > > group?
>
> > > > >http://groups.google.com/group/Google-Maps-API/search?hl=en&group=Goo...text
> > > > > -
>
> > > > - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to Google-Maps-API@googlegroups.com
To unsubscribe from this group, send email to 
google-maps-api+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to