Let me clear the requirement,

I have to use the Gmap api in java program to get the list of
restuarants from google map along with root map
in xml format not in HTML format. the below mentioned program is to
fetch the restaurants by passing the requirement through URL. But with
url cocept we can not get all the requirements. If at all we get the
out put is in HTML format from which extracting actual data is tough.
so please help me. Am runnig out of time plssssssssssss help
me....................................

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
public class restuarants {

        public static void main(String[] args) {
                // TODO Auto-generated method stub

                        getLatLong();
                }
        private static float latitude;
    private static float longitude;
    private static String details;

    private static final String BASE_GEOCODER_URL = "http://
maps.google.com/";
    private static final String ENCODING = "UTF-8";
    private static final String GOOGLE_MAPS_KEY =
"GOOGLE_MAPS_API_KEY";
    private static final String OUTPUT_FORMAT = "CSV";
    enum MarkerColor {
          red, green, blue
        }
    public static String getLatLong()  {
        details = "Hyderabad+INDIA";

         String GEOCODER_REQUEST=  BASE_GEOCODER_URL+"maps?
f=q&hl=en&q=Restaurants+loc:+2575+Sand+Hill+Road
+94025&ie=UTF8&z=15&om=1&outputtype=xml";
        BufferedReader reader;
                try {
                        reader = new BufferedReader(
                                new InputStreamReader(
                                    new URL(GEOCODER_REQUEST).openStream()));

        String line = null;
        int statusCode = -1;
        while ((line = reader.readLine()) != null) {
               System.out.println(line);

        }
                } catch (MalformedURLException e) {
                        e.printStackTrace();
                } catch (IOException e) {
                        e.printStackTrace();
                }
        return "map";
    }

}


On Feb 9, 2:47 pm, Rossko <[email protected]> wrote:
> > I would like to capture the gmap (like directions, map, list of
> > restuarants )response in XML or CSV or String format
> > and need to send that information to some other client
>
> I think the Google Search API may be want you want.
>    http://code.google.com/apis/ajaxsearch/
> You won't get directions that way though
>
> cheers, Ross K
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to