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

  • Home
  • SEARCH
  • 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 6581087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:06:31+00:00 2026-05-25T16:06:31+00:00

through jsonparsing i parse all the string values again i need to display the

  • 0

through jsonparsing i parse all the string values again i need to display the latitude and longitude in the mapview.. where i need to store all the coordinates in a separate array
anyone please help me ..
thanks in advance

  • 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-25T16:06:31+00:00Added an answer on May 25, 2026 at 4:06 pm

    I am not sure how is your func of parseString, I assume that you can get 2 string value of lat and long. The remaining part can be done as followed

            String coordinates[] = {"...","..."};
            double lat = Double.parseDouble(coordinates[0]);
            double lng = Double.parseDouble(coordinates[1]);
    
             p = new GeoPoint(
                (int) (lat * 1E6), 
                (int) (lon * 1E6));
           //mc is MapView object
            mc.animateTo(p);
            mc.setZoom(15); 
    
            mapView.invalidate();
    

    To display it on the map, you need to create an overlay with a bitmap pinpoint in res/ folder

    MarkerOverlay mark = new MarkerOverlay();
     listOfOverlays = mapView.getOverlays();
            listOfOverlays.clear();
             listOfOverlays.add(mark);
            mapView.invalidate();
    

    A class of MapOverlay could be defined as such:

      class MarkerOverlay extends com.google.android.maps.Overlay
        {
          //create a constructor here with p.x and p.y as parameters
    
            @Override
            public boolean draw(Canvas canvas, MapView mapView, 
            boolean shadow, long when) 
            {
                super.draw(canvas, mapView, shadow);                   
    
                Point screenPts = new Point();
                Bitmap bmp = BitmapFactory.decodeResource(
                        getResources(), R.drawable.pushpin);  
    
            GeoPoint point = new GeoPoint(
                                    (int) (p.x * 1E6), 
                                    (int) (p.y * 1E6));
    
                            mapView.getProjection().toPixels(point, screenPts);
                            canvas.drawBitmap(bmp, screenPts.x-16, screenPts.y-32, null); 
                            canvas.drawText(parts[0],screenPts.x-16 , screenPts.y-40, new Paint());
                        }
                    }
                }
    
    
                return true;
            }
        } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Through the website, I need to allow the user to add attachments and store
Through out my application, i wanted to display the value htmlentities(str), since there is
Through the windows API I can get the list of all windows which are
Through Schema API (file mymodule.install in Folder sites\all\modules\mymodule). trigger in mysql: delimiter | CREATE
Through AJAX I receive random string (built at RUNTIME on the server) that contain
I want to parse a JSON string: MyJsonString: { status: ok, count: 2, count_total:
Through my Android program I wrote a file like this: String file = Environment.getExternalStorageDirectory().getAbsolutePath()
Through profiling I've discovered that the sprintf here takes a long time. Is there
Through some bungling in creating and removing publications, I was left with a lot
Through CommandName=Delete I try to delete a line from the ListView control but not

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.