本文整理了Java中com.graphhopper.util.Helper.firstBig()
方法的一些代码示例,展示了Helper.firstBig()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Helper.firstBig()
方法的具体详情如下:
包路径:com.graphhopper.util.Helper
类名称:Helper
方法名:firstBig
暂无
代码示例来源:origin: graphhopper/graphhopper
public List<Map<String, Object>> createJson() {
List<Map<String, Object>> instrList = new ArrayList<>(instructions.size());
int pointsIndex = 0;
int counter = 0;
for (Instruction instruction : instructions) {
Map<String, Object> instrJson = new HashMap<>();
instrList.add(instrJson);
InstructionAnnotation ia = instruction.getAnnotation();
String text = instruction.getTurnDescription(tr);
if (Helper.isEmpty(text))
text = ia.getMessage();
instrJson.put("text", Helper.firstBig(text));
if (!ia.isEmpty()) {
instrJson.put("annotation_text", ia.getMessage());
instrJson.put("annotation_importance", ia.getImportance());
}
instrJson.put("street_name", instruction.getName());
instrJson.put("time", instruction.getTime());
instrJson.put("distance", Helper.round(instruction.getDistance(), 3));
instrJson.put("sign", instruction.getSign());
instrJson.putAll(instruction.getExtraInfoJSON());
int tmpIndex = pointsIndex + instruction.getLength();
instrJson.put("interval", Arrays.asList(pointsIndex, tmpIndex));
pointsIndex = tmpIndex;
counter++;
}
return instrList;
}
代码示例来源:origin: com.graphhopper/graphhopper-api
public List<Map<String, Object>> createJson() {
List<Map<String, Object>> instrList = new ArrayList<>(instructions.size());
int pointsIndex = 0;
int counter = 0;
for (Instruction instruction : instructions) {
Map<String, Object> instrJson = new HashMap<>();
instrList.add(instrJson);
InstructionAnnotation ia = instruction.getAnnotation();
String text = instruction.getTurnDescription(tr);
if (Helper.isEmpty(text))
text = ia.getMessage();
instrJson.put("text", Helper.firstBig(text));
if (!ia.isEmpty()) {
instrJson.put("annotation_text", ia.getMessage());
instrJson.put("annotation_importance", ia.getImportance());
}
instrJson.put("street_name", instruction.getName());
instrJson.put("time", instruction.getTime());
instrJson.put("distance", Helper.round(instruction.getDistance(), 3));
instrJson.put("sign", instruction.getSign());
instrJson.putAll(instruction.getExtraInfoJSON());
int tmpIndex = pointsIndex + instruction.getLength();
instrJson.put("interval", Arrays.asList(pointsIndex, tmpIndex));
pointsIndex = tmpIndex;
counter++;
}
return instrList;
}
代码示例来源:origin: com.rgi-corp/graphhopper
if (Helper.isEmpty(text))
text = ia.getMessage();
instrJson.put("text", Helper.firstBig(text));
if (!ia.isEmpty()) {
instrJson.put("annotation_text", ia.getMessage());
代码示例来源:origin: com.graphhopper/graphhopper
if (Helper.isEmpty(str))
str = ia.getMessage();
instrJson.put("text", Helper.firstBig(str));
if (!ia.isEmpty())
内容来源于网络,如有侵权,请联系作者删除!