Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6963867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:51:02+00:00 2026-05-27T15:51:02+00:00

I am trying to draw path between two points on google map using url

  • 0

I am trying to draw path between two points on google map using url below,

http://maps.google.com/maps?f=d&hl=en&saddr=13.005621,77.577531&daddr=13.005621,77.579531&ie=UTF8&0&om=0&output=kml

before it was working properly, but now it shows exception,

 I/System.out(461): Unexpected end of document

doc is returning null why?
my code is bellow,

http://pastebin.com/XvR0rYdQ

thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:51:02+00:00Added an answer on May 27, 2026 at 3:51 pm

    These links help u to code for maps:

    MAPS Tutor
    Maps Location

    Maps Api

    If u want url only then use this :
    http://code.google.com/apis/kml/

    These Is complete source code for maps location .

    Android

    Android G1 screenshot http://img249.imageshack.us/img249/3336/androidmaproute.jpg

    public class MapRouteActivity extends MapActivity {    
     LinearLayout linearLayout;
     MapView mapView;
     private Road mRoad;    
     @Override
     public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      mapView = (MapView) findViewById(R.id.mapview);
      mapView.setBuiltInZoomControls(true);    
      new Thread() {
       @Override
       public void run() {
        double fromLat = 49.85, fromLon = 24.016667; 
        double toLat = 50.45, toLon = 30.523333;
        String url = RoadProvider
          .getUrl(fromLat, fromLon, toLat, toLon);
        InputStream is = getConnection(url);
        mRoad = RoadProvider.getRoute(is);
        mHandler.sendEmptyMessage(0);
       }
      }.start();
     }
    
     Handler mHandler = new Handler() {
      public void handleMessage(android.os.Message msg) {
       TextView textView = (TextView) findViewById(R.id.description);
       textView.setText(mRoad.mName + " " + mRoad.mDescription);
       MapOverlay mapOverlay = new MapOverlay(mRoad, mapView);
       List<Overlay> listOfOverlays = mapView.getOverlays();
       listOfOverlays.clear();
       listOfOverlays.add(mapOverlay);
       mapView.invalidate();
      };
     };
    
     private InputStream getConnection(String url) {
      InputStream is = null;
      try {
       URLConnection conn = new URL(url).openConnection();
       is = conn.getInputStream();
      } catch (MalformedURLException e) {
       e.printStackTrace();
      } catch (IOException e) {
       e.printStackTrace();
      }
      return is;
     }    
     @Override
     protected boolean isRouteDisplayed() {
      return false;
     }
    }
    

    See full code on J2MEMapRouteAndroidEx on Google Code

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to calculate the distance between two map point using Google Map
I am trying to smooth the path I draw between points. Please consider :
Why when I want to draw a polyline using Google maps V3.0 (JavaScript API)
I'm trying to draw US state outlines with the D3 framework (http://mbostock.github.com/d3/) but am
I'm trying to draw a polygon using c# and directx All I get is
I am trying to draw a series of rectangles using OpenGL but some of
I'm trying to draw over the whole screen by using the desktop canvas and
I am trying to draw a textured cube using just 8 vertices and one
I am trying to draw a circle using Windows Form at runtime inside a
basically i am trying to draw the path i.e road path. for that i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.