Advertisement
advictoriam

Untitled

Nov 27th, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. /**
  2.    A map  label has a place name, longitude and latitude
  3. */
  4. public class MapLabels
  5. {  
  6.    private String placeName;
  7.    private double latitude;
  8.    private double longitude;
  9.  
  10.    /**
  11.       Constructs a map label with place name, logitude and latitude
  12.    */
  13.    public MapLabels (String name, double aLat, double aLong)
  14.    {  
  15.      placeName = name;
  16.      latitude = aLat;
  17.      longitude = aLong;
  18.    }
  19.  
  20.    /**
  21.       Gets the string in XML form
  22.       @return the string
  23.    */
  24.    public String toString()
  25.    {  
  26.       String label = "<label name=\"" + placeName + "\" latitude=\"" + latitude + "\" longitude=\"" + longitude + "\"/>";
  27.       return label;
  28.    }  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement