Hmm, might not be worth it for me to implement it then otherwise I might end up with a bunch of different files being hosted on the web server, not too entirely bad but currently not worth the recoding investment that would take atm.
I was just considering this b/c of the lack of the map click event to return an overlay or overlaylatlng which required me to create individual listeners for every marker. This would give me the option to create a generic listener again. On Mon, Jun 21, 2010 at 1:37 PM, Chad Killingsworth < [email protected]> wrote: > On Jun 21, 11:32 am, Nathan Raley <[email protected]> wrote: > > Finally found some documentation on kml files, I had to do some digging. > > > > Basically for a simple marker I'd just need to define the kml entry as > > something along the lines of: > > > > <?xml version="1.0" encoding="UTF-8"?> > > <kml xmlns="http://www.opengis.net/kml/2.2"> > > <Placemark> > > <name>Simple placemark</name> > > <description>Attached to the ground. Intelligently places itself > > at the height of the underlying terrain.</description> > > <Point> > > <coordinates>-122.0822035425683,37.42228990140251,0</coordinates> > > </Point> > > </Placemark> > > </kml> > > > > Is this correct? > > Looks like it to me - although I'm no expert at mentally parsing > KML :-) > > >If so is there a way to go about doing this dynamically on > > the fly? The reason I ask is that I am reading a file from my c++ app > and > > my map is basically on an embedded html object. I read the information > from > > the c and was just passing it to the javascript to store and then create > the > > markers then bulk add with marker manager. Is there a way to create this > on > > the fly, or will I need to work this into my c++ program and save another > > file in this format instead? > > I dynamically generate my Kml. Remember though, that Kml files MUST be > served from a public web server. Google's servers actually request the > file and parse it. The client only sees the resulting tiles - not the > Kml file directly. > > You can use whatever server-side language/platform you are most > comfortable with. > > Chad Killingsworth > > > > > > > On Mon, Jun 21, 2010 at 11:27 AM, Nathan Raley <[email protected]> > wrote: > > > So how hard would it be to convert my markers into a kml file to add as > a > > > kml overlay? > > > > > On Mon, Jun 21, 2010 at 10:26 AM, Chad Killingsworth < > > > [email protected]> wrote: > > > > >> On Jun 21, 10:08 am, Nathan Raley <[email protected]> wrote: > > >> > I have a quick question regarding kml layers. > > > > >> > I am reading a file with several coordinates and am currently > generating > > >> > anywhere between 100-2000+ markers on my map, each has a click event > > >> > associated with them now, b/c of the changes between the v2 and v3 > of > > >> the > > >> > api, that returns the position of the marker. > > > > >> > Currently I am using marker manager to add these markers to the map > in > > >> bulk > > >> > and I am managing how many are being shown at different view stages. > > > > >> > Would I get better functionality using kml layers to render the > makers > > >> and > > >> > handle the kml event than I would be using marker manager to handle > the > > >> > markers? > > > > >> From a performance standpoint - definitely yes. > > > > >> > I'm assuming there's no way to bulk add markers to a kml layer by > > >> > using something like marker manager is there? > > > > >> You don't add anything to a KmlLayer once it has been created. You can > > >> add new layers which will add more data to the same rendered tile > > >> layer. > > > > >> Chad Killingsworth > > > > >> -- > > >> You received this message because you are subscribed to the Google > Groups > > >> "Google Maps JavaScript API v3" group. > > >> To post to this group, send email to > > >> [email protected]. > > >> To unsubscribe from this group, send email to > > >> [email protected]<google-maps-js-api-v3%[email protected]><google-maps-js-api-v3%2B > [email protected]> > > >> . > > >> For more options, visit this group at > > >>http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-maps-js-api-v3%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
