| | |
| | | */ |
| | | public class ToolUtils { |
| | | |
| | | public static Boolean isLocal = false; |
| | | |
| | | public static String localFilePath = "KmzFile/kmz/"; |
| | | |
| | | public static String kmzPath = "kmz"; |
| | | |
| | | /** |
| | |
| | | return url.substring(kmzIndex + 5); // +5 是为了跳过 "/kmz/" |
| | | } |
| | | |
| | | /** |
| | | * 截取字符串 |
| | | * 参数: "0-89-0" |
| | | */ |
| | | public static Integer subStringDroneType(String str) { |
| | | String[] parts = str.split("-"); |
| | | return Integer.valueOf(parts[1]); |
| | | } |
| | | |
| | | public static Double getDoublePoint(String str,String type) { |
| | | String[] parts = str.split(","); |
| | | if ("lon".equals(type)) { |
| | | return Double.parseDouble(parts[0].trim()); |
| | | } |
| | | if ("lat".equals(type)){ |
| | | return Double.parseDouble(parts[1].trim()); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |