return ri;
}
public RouteProximityInfo getRoute(int idLicenca, RouteStop[] rs, RouteProximityOptions ro, int methodID) throws Exception {
RouteProximityInfo ri = new RouteProximityInfo();
String response = "";
String routeID = _maquina + "_" + Calendar.getInstance().getTimeInMillis();
try {
response = requestRoute(routeID, true, rs, ro, new Extent(), new MapSize(), null, idLicenca, _dataSource, methodID);
ri.setRouteId(routeID);
// ri.setProximityList(getRouteProximity(response, ro.radius,
// idLicenca, ro.routeDetails.getRouteType()));
MapInfo mapInfo = new MapInfo();
mapInfo.setUrl("");
String XMaxYMax = response.substring(response.indexOf("LLMAX=") + 6); // .substring(0,
// response.substring(response.indexOf("LLMAX=")
// +
// 6).indexOf(Pattern.quote("|")));
XMaxYMax = XMaxYMax.substring(0, XMaxYMax.indexOf("|"));
String XMinYMin = response.substring(response.indexOf("LLMIN=") + 6); // .substring(0,
// response.substring(response.indexOf("LLMIN=")
// +
// 6).indexOf(Pattern.quote("%")));
XMinYMin = XMinYMin.substring(0, XMinYMin.indexOf("%"));
mapInfo.setExtent(new Extent());
mapInfo.getExtent().setXMax(Double.parseDouble(XMaxYMax.split(Pattern.quote(","))[1]));
mapInfo.getExtent().setXMin(Double.parseDouble(XMinYMin.split(Pattern.quote(","))[1]));
mapInfo.getExtent().setYMax(Double.parseDouble(XMaxYMax.split(Pattern.quote(","))[0]));
mapInfo.getExtent().setYMin(Double.parseDouble(XMinYMin.split(Pattern.quote(","))[0]));
ri.setMapInfo(mapInfo);
ri.setSegDescription(getSegmentDescriptionAlternative(response, ro.getVehicle().getTollFeeCat(), ro, rs, _dataSource, idLicenca));
ri.setRouteTotals(getTotals(ri.getSegDescription(), ro, rs, totalPedagios));
ri.setRoadType(getRoadType(ri.getSegDescription()));
ri.setRouteSummary(getSummary(ri.getSegDescription(), rs, ro));
} catch (Exception ex) {
Utils.LogError("CC", "RouteProximityInfo getRoute", "Error: " + ex.getMessage());
throw (ex);
}