On Nov 27, 3:52 pm, Felix Kiechle <[email protected]> wrote: > [By mistake, I posed this question first in the API v2 forum > athttp://groups.google.com/group/google-maps-api/browse_frm/thread/165f...] > > Hi, > > I'm trying to run the "Too Many Markers" Example by Miguel Ángel > Vilela [1] on my server [2] but the kml layer won't work. I guess the > problem is here [3] in the toggleKmlLayer() function. > > I'm writing a service which needs to set a layer of many markers at > runtime. The easiest way would be via a kml file, but i'm using > google app engine so I cannot generate a file, store it and reload from a > static url. Unfortunately I haven't found something like a parseKml(String) > method > in the google maps api yet. > > My next idea was to let my application create a json object, give it > to the client and access it in a similar way as shown in this example > - but unfortunately it doesn't even work copying the files 1 to 1 to > my server... > > Does anybody know why it won't work or has another idea for my > problem (optimally via kml, but I'm losing hope that this will be possible at > runtime). > > Thanks a lot > > Felix Kiechle > > [1]http://gmaps-samples-v3.googlecode.com/svn/trunk/toomanymarkers/tooma... > [2]http://kiechle.e8u.de/linkedService/toomanymarkers.html > [3] var kmlUrl = window.location.href.substring( > 0, 1 + window.location.href.lastIndexOf('/')) + > 'markers.kml'; > > Answer of Lary: > On Nov 26, 1:55 am, Andrew C Leach <[email protected]> wrote: > > > On 26 November 2011 03:01, Felix Kiechle <[email protected]> > > wrote: > > > Hi, > > > I'm trying to run the "Too Many Markers" Example by Miguel Ángel > > > Vilela [1] on my server [2] but the kml layer won't work. I guess the > > > problem is here [3] in the toggleKmlLayer() function. > > It's a Version 3 map, so I suggest posting to the Version 3 > > Grouphttp://groups.google.com/group/google-maps-js-api-v3/ > > However, KmlLayer data must reside on a public server. It's in the > > docs. I'm not convinced that you are creating a public URL to your > > data. > > Or there is no file there or his server doesn't understand .kml > files.http://kiechle.e8u.de/linkedService/markers.kml > -- Larry > > My reply: > Hi Larry, > thank you for your answer and sorry for asking on the wrong place. > > Actually, that's exactly my qestion. So in order to make this example > work I'd have to create a kml file first and save it to http://kiechle.e8u.de/linkedService/markers.kml?
To use KmlLayer to display it, yes. > What's the meaning of parsing this json object then? Parsing what json object? Are you asking about the source that is used for the markerclusterer or marker manager examples? > > And that's exactly what I need to avoid. I'll be working "in the > cloud" (on google app engine) later, so I cannot generate a static > url to a kml file since my whole application is spread over the web. How about using FusionTables? That will accept kml files (and other types) and allow the geographic content to be displayed on a map (tiled) like KmlLayer. There are limits (but they are fairly large). -- Larry > Hence I'm searching for a possibility to generate a map with many markers > out of a json object or a string (containing the kml information). > > Best wishes > > Felix Kiechle -- 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.
