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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:08:51+00:00 2026-05-31T11:08:51+00:00

i m using GPS in my application. i had try lots of for display

  • 0

i m using GPS in my application. i had try lots of for display multiple location on map but till i m not getting any solution. if anybody have solution to overcame my this problem. i had try using this code.
please help me.

Thanx in advance.

        StringBuffer document = new StringBuffer();

        document.append("<location-document>");

        latVec.addElement("19.097971");
        longVec.addElement("72.864761");
        latVec.addElement("19.066985");
        longVec.addElement("72.848969");
        addressVec.addElement("abc");
        addressVec.addElement("wydj");

        for(int j=0;j<latVec.size();j++)
        {                   
            double latlong = Double.parseDouble(latVec.elementAt(j).toString());
            double lonlong = Double.parseDouble(longVec.elementAt(j).toString());

            int lat = (int)latlong*100000;
            int lon = (int)lonlong*100000;
            String addressString = addressVec.elementAt(j).toString();          


            document.append("<location lon='"+ lon +"' lat='"+ lat +"'label='"+ addressString +"' description='"+ addressString +"' />");

        }

        document.append("</location-document>");

        String st = new String(document);

        Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments(MapsArguments.ARG_LOCATION_DOCUMENT, st));
  • 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-31T11:08:52+00:00Added an answer on May 31, 2026 at 11:08 am
    package map;
    import java.util.Vector;
    
    import net.rim.blackberry.api.browser.Browser;
    import net.rim.blackberry.api.browser.BrowserSession;
    import net.rim.device.api.browser.field2.*;
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.Dialog;
    import net.rim.device.api.ui.container.*;
    
    public class NewBrowserFieldDemo extends UiApplication
    {
        public static void main(String[] args)
        {
            BrowserFieldDemo app = new BrowserFieldDemo();
            app.enterEventDispatcher();
        }
        public NewBrowserFieldDemo()
        {
            pushScreen(new MultiplePoints());
        }
    }
    
    
    
    
             class MultiplePoints extends MainScreen{
                String initial = "<!DOCTYPE html>\r\n" +
                        "<html> \r\n" +
                        "<head> \r\n" +
                        "  <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\" /> \r\n" +
                        "  <title>Google Maps Multiple Markers</title> \r\n" +
                        "  <script src=\"http://maps.google.com/maps/api/js?sensor=false\" \r\n" +
                        "          type=\"text/javascript\"></script>\r\n" +
                        "</head> \r\n" +
                        "<body>\r\n" +
                        "  <div id=\"map\" style=\"width: 500px; height: 400px;\"></div>\r\n" +
                        "\r\n" +
                        "  <script type=\"text/javascript\">\r\n" +
                        "    var locations = [";
                String second= " ];\r\n" +
                        "\r\n" +
                        "    var map = new google.maps.Map(document.getElementById('map'), {\r\n" +
                        "      zoom: 8,";
                String centerPoint ="";
                String finalpart = " mapTypeId: google.maps.MapTypeId.ROADMAP\r\n" +
                        "    });\r\n" +
                        "\r\n" +
                        "    var infowindow = new google.maps.InfoWindow();\r\n" +
                        "\r\n" +
                        "    var marker, i;\r\n" +
                        "\r\n" +
                        "    for (i = 0; i < locations.length; i++) {  \r\n" +
                        "      marker = new google.maps.Marker({\r\n" +
                        "        position: new google.maps.LatLng(locations[i][1], locations[i][2]),\r\n" +
                        "        map: map\r\n" +
                        "      });\r\n" +
                        "\r\n" +
                        "      google.maps.event.addListener(marker, 'click', (function(marker, i) {\r\n" +
                        "        return function() {\r\n" +
                        "          infowindow.setContent(locations[i][0]);\r\n" +
                        "          infowindow.open(map, marker);\r\n" +
                        "        }\r\n" +
                        "      })(marker, i));\r\n" +
                        "    }\r\n" +
                        "  </script>\r\n" +
                        "</body>\r\n" +
                        "</html>";
                String[] lt={"12.966085","12.944337","12.925599"};
              String[] lon={"77.533264","77.549400","77.594719"};
              String[] name={"vijyanagar","Banashankari","jaynagar"};
                MultiplePoints(){//StringBuffer html,Vector waypoints,LocationObj center){
                    StringBuffer html=new StringBuffer();
                    html.append(initial);        
                    for(int i=0 ; i<lt.length; i++){
                        //LocationObj source = (LocationObj)waypoints.elementAt(i);
                        //String point = "['"+source.getLabel()+"',"+source.getLatitude()+","+ source.getLongitude()+","+i+"],";
                        String point = "['"+name[i]+"',"+lt[i]+","+ lon[i]+","+i+"],";
                        //System.out.println("Point is"+point);
                        html.append(point);
                    }
                    html.append(second);
                    centerPoint = "  center: new google.maps.LatLng("+lt[0]+","+lon[0]+"),";    
                    html.append(centerPoint);
                    html.append(finalpart);
                    //System.out.println("Plot is"+html.toString());
                    BrowserFieldConfig _bfConfig = new BrowserFieldConfig();        
                  _bfConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
                  _bfConfig.setProperty( BrowserFieldConfig.JAVASCRIPT_ENABLED, Boolean.TRUE );
                 _bfConfig.setProperty(BrowserFieldConfig.USER_AGENT, "MyApplication 1.0");
    
                  BrowserField myBrowserField = new BrowserField(_bfConfig);
    
                  myBrowserField.displayContent(html.toString(), "http://localhost");
                  HorizontalFieldManager horf=new HorizontalFieldManager(HORIZONTAL_SCROLL);
                  horf.add(myBrowserField);
                  add(horf);
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating an application which tracks the users location using GPS, stores the
I am developed a GPS application for getting Latitude and Longitude, by using Emulator
I am working on a GPS data logger and Map viewer application using Microsoft
I had a strange encounter once: The location on the phone's map application and
friends, i have created an application in which i am getting GPS location onCreate
Working on a tracking application using GPS. It is all fine, but sometimes because
I have developed an application to find the user's location using GPS. In this
I am creating an application, which tracks the users location using GPS, stores the
I want using GPS data (I got it from $GPRMC) in an desktop application(that
Am doing a location based app.When using GPS, it provides with street names from

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.