Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion text API
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mike Williams  
View profile  
 More options Oct 3 2005, 4:56 pm
From: Mike Williams <nos...@econym.demon.co.uk>
Date: Mon, 3 Oct 2005 07:56:31 +0100
Local: Mon, Oct 3 2005 4:56 pm
Subject: Re: text API
If you really don't want to convert your text into XML, then I suggest
you start like this:

Grab the XML example code from my tutorial

   http://www.econym.demon.co.uk/googlemaps/basic3.htm

Then make the following changes to the XML processing bit to convert it
to text processing:

* use request.responseText instead of request.responseXML

* rip out all the getElementsBtTagName and getAttribue stuff and replace
it with the string.split() method:

    var gpsDoc = request.responseText;

    // Split it on 'newline' into an array of lines
    var markers = gpsDoc.split('\n');

    // Loop through the lines
    for (var i = 0; i < markers.length; i++) {

        // If empty don't process
        if (!markers[i]){break}

        // Split each line on ':' into an array of parts
        var part = markers[i].split(':');

        // Grab the parts
        var date = part[0];
        var name = part[1];
        var lng = parseFloat(part[2]);
        var lat = parseFloat(part[3]);

        var marker =  new GMarker(new GPoint(lng,lat));
        map.addOverlay(marker);
    }


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google