Back to project page android-nextbus.
The source code is released under:
MIT License
If you think the Android project android-nextbus listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.andrei.nextbus.library.objects; //from w w w . j a va 2 s .co m import java.util.Map; public class Point { public final double latitude; public final double longitude; public Point (String lat, String lon){ latitude = getDouble (lat); longitude = getDouble (lon); } public Point (Map<String, String> attributes){ latitude = getDouble (attributes.get("lat")); longitude = getDouble (attributes.get("lon")); } private static double getDouble (String value){ try { return Double.parseDouble(value); } catch (Exception e){ e.printStackTrace(); return -1.0D; } } }