Package com.gads.model

Examples of com.gads.model.LatLng


        NodeList n2 = doc.getElementsByTagName("lng");
        Element nn = (Element)n2.item(0);
        String st1 = nn.getFirstChild().getNodeValue();

        return new LatLng(Double.parseDouble(st),Double.parseDouble(st1));
    }
View Full Code Here


                nl3 = locationNode.getChildNodes();
                Node latNode = nl3.item(getNodeIndex(nl3, "lat"));
                double lat = Double.parseDouble(latNode.getTextContent());
                Node lngNode = nl3.item(getNodeIndex(nl3, "lng"));
                double lng = Double.parseDouble(lngNode.getTextContent());
                listGeopoints.add(new LatLng(lat, lng));

                locationNode = nl2.item(getNodeIndex(nl2, "polyline"));
                nl3 = locationNode.getChildNodes();
                latNode = nl3.item(getNodeIndex(nl3, "points"));
                encoded = latNode.getTextContent();
                ArrayList<LatLng> arr = decodePoly(encoded);
                for(int j = 0 ; j < arr.size() ; j++) {
                  listGeopoints.add(new LatLng(arr.get(j).getLatitude(), arr.get(j).getLongitude()));
                }

                locationNode = nl2.item(getNodeIndex(nl2, "end_location"));
                nl3 = locationNode.getChildNodes();
                latNode = nl3.item(getNodeIndex(nl3, "lat"));
                lat = Double.parseDouble(latNode.getTextContent());
                lngNode = nl3.item(getNodeIndex(nl3, "lng"));
                lng = Double.parseDouble(lngNode.getTextContent());
                listGeopoints.add(new LatLng(lat, lng));
               
                Node distanceNode = nl2.item(getNodeIndex(nl2, "distance"));
                nl3 = distanceNode.getChildNodes();
                Node stepDistNode = nl3.item(getNodeIndex(nl3, "text"));
                distanceStep = stepDistNode.getTextContent();
View Full Code Here

        shift += 5;
      } while (b >= 0x20);
      int dlng = ((result & 1) != 0 ? ~(result >> 1) : (result >> 1));
      lng += dlng;
     
      LatLng position = new LatLng((double)lat / 1E5, (double)lng / 1E5);
      poly.add(position);
    }
    return poly;
  }
View Full Code Here

   * @throws OfflineException
   */
  public void setLocation(String adr) throws MissingAVDException, OfflineException{
    try{
     
      LatLng lt1 = db.getPlace(adr);
     
      if(lt1 == null){
       
        Document doc = parser.getDocument(adr);
        LatLng point = parser.getCoordinates(doc);
        String form = parser.getFormAddress(doc);
       
        db.insert(point, adr, form);
       
        GeoFix geo = new GeoFix(_port);
          geo.connect();
          geo.setFix(point.getLatitude(), point.getLongitude());
      }
      else{
        GeoFix geo = new GeoFix(_port);
          geo.connect();
          geo.setFix(lt1.getLatitude(), lt1.getLongitude());
View Full Code Here

   */
  protected void makeStep(GeoStep step,int milliseconds, GeoFix geo) throws IOException{
   
    for(int i = 0; i < step.getPolylines().size(); i++){
      if(GeoController.pool.isEmpty()) break;// for GeoNavThread
      LatLng point = step.getPolylines().get(i);
      try {
        geo.setFix(point.getLatitude(), point.getLongitude());
        synchronized(this){
        this.wait(milliseconds);
        }
      } catch (InterruptedException e) {
      }
View Full Code Here

TOP

Related Classes of com.gads.model.LatLng

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.