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 8853763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:43:44+00:00 2026-06-14T13:43:44+00:00

How to connect markers in Google map API using just java, i.e., without using

  • 0

How to connect markers in Google map API using just java, i.e., without using asp.net, php or any other language? I am just a beginner. I have multiple markers on my map which are showing the corresponding places in Google android project.

  • 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-06-14T13:43:45+00:00Added an answer on June 14, 2026 at 1:43 pm

    Create your own Overlay class (instead of using the ItemizedOverlay that’s used to show markers) and implement the draw() method to paint the lines. Add this overlay to your MapView before adding the normal overlay you use to show the markers like so:

    mMapView.getOverlays().add(mPathOverlay);
    mMapView.getOverlays().add(mMarkersOverlay);
    

    A PathOverlay class can look like this. The positions would be the positions of your markers, already converted to GeoPoints.

    public class PathOverlay extends Overlay {
    
        private List<GeoPoint> mPositions;
        private Path mPath;
        private Paint mPathPaint;
        private Point mHelperPoint = new Point();
    
        public PathOverlay(List<GeoPoint> positions) {
            mPositions = positions;
            mPath = new Path();
            mPathPaint = new Paint();
            mPathPaint.setColor(0xDDA4C639);
            mPathPaint.setStyle(Paint.Style.STROKE);
            // add more path styling here
        }
    
        @Override
        public void draw(Canvas canvas, MapView mapView, boolean shadow) {
            if (shadow) {
                return; // path has no shadow
            }
            mPath.reset();
            boolean start = true;
            Point prev = new Point();
            for (Position p : mPositions) {
                mapView.getProjection().toPixels(p.geoPoint, mHelperPoint);
                if (start) {
                    mPath.moveTo(mHelperPoint.x, mHelperPoint.y);
                    prev.set(mHelperPoint.x, mHelperPoint.y);
                    start = false;
                } else {
                    int dx = prev.x - mHelperPoint.x;
                    int dy = prev.y - mHelperPoint.y;
                    mPath.lineTo(mHelperPoint.x, mHelperPoint.y);
                    prev.set(mHelperPoint.x, mHelperPoint.y);
                }
            }
            canvas.drawPath(mPath, mPathPaint);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using google maps api to place markers on a map. The gps
I'm working on google map api v3 code. I saved all my markers in
I made a Google Map with API v3 with this tutorial . The .php
I'm using Facebook Connect along with the Facebook Graph API to fetch user's email
I am using the PHP and AJAX coding below to populate a map showing
I connect to a mysql database using pymysql and after executing a request I
I connect to our Ubuntu production server using PuTTy. I want to reindex a
I've been working for a few weeks now with the Google Maps API v3,
I fixed the problem below by updating the Google maps API version in this
I connect up to a domain API and perform an availability check on only

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.