Thanks Martin! Will try it in the next few days... On Thu, May 13, 2010 at 3:09 AM, Martin <[email protected]> wrote:
> You could add a form to your map page - with hidden form fields for > each XML value you want to create. > Populate the hidden form fields when the infowindow is opened and > submit the form to a server side script which takes the form values, > creates an XML file and returns it to the browser. > > I use this technique with my GDirections2GPX code to send a string to > a PHP script which returns a GPX filetype to the browser. > > Look at the GDirections2GPX demo map source code and you'll see the > form with a hidden field: > > http://googlemapsapi.martinpearman.co.uk/infusions/google_maps_api/basic_page.php?map_id=12 > > And if you download the GDirections2GPX source you'll find > string2file.php which is the script that the map submits the form to. > It takes the POST'd string, cleans it up with stripslashes() if > necessary and returns the GPX file to the browser. > http://googlemapsapi.martinpearman.co.uk/downloads/GDirections2GPX.zip > > Martin. > > On 13 May, 00:23, sfdude <[email protected]> wrote: > > Thanks Rossko! > > > > Yes, now I realize that I can't write the infoWindow data > > to an XML file on the server, > > using JS or jQuery (since both are client-side languages). > > > > So, I 'll have to try using PHP or ASP (both, server side-langs). > > > > Any code ex. welcome! > > > > Thanks! > > SFdude > > > > On May 12, 6:44 pm, Rossko <[email protected]> wrote: > > > > > > > > > > - The output XML file should be generated at the time the infoWindow > > > > is displayed on screen. > > > > > You should perhaps seehttp:// > articles.sitepoint.com/print/xml-javascript-mozilla > > > scroll down to - > > > " Is it Possible to Write to an XML File? > > > No, it’s not possible to write to an XML file using client-side > > > JavaScript" > > > > > The usual approach is to use client-side javascript to send the data > > > to some server-side service that you also write, that will take care > > > of file creation/updating. > > > > > The technique is illustrated herehttp:// > code.google.com/apis/maps/articles/phpsqlinfo.html > > > even if you don't intend to use a database; then you'd replace > > > database updating code with file editing. > > > > > -- > > > 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]<google-maps-api%[email protected]> > . > > > For more options, visit this group athttp:// > groups.google.com/group/google-maps-api?hl=en. > > > > -- > > 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]<google-maps-api%[email protected]> > . > > For more options, visit this group athttp:// > groups.google.com/group/google-maps-api?hl=en. > > -- > 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]<google-maps-api%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-api?hl=en. > > -- 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.
