decode query-string by standard URLDecoder
This commit is contained in:
parent
04e2491f4d
commit
77ee79bdc3
2 changed files with 7 additions and 8 deletions
|
|
@ -73,18 +73,14 @@ public class ServerHandler extends RequestHandler {
|
|||
|
||||
String[] coords = lonLats.split("\\|");
|
||||
if (coords.length < 2)
|
||||
coords = lonLats.split("%7C");
|
||||
if (coords.length < 2)
|
||||
throw new IllegalArgumentException( "we need two lat/lon points at least!" );
|
||||
throw new IllegalArgumentException( "we need two lat/lon points at least!" );
|
||||
|
||||
List<OsmNodeNamed> wplist = new ArrayList<OsmNodeNamed>();
|
||||
for (int i = 0; i < coords.length; i++)
|
||||
{
|
||||
String[] lonLat = coords[i].split(",");
|
||||
if (lonLat.length < 2)
|
||||
lonLat = coords[i].split("%2C");
|
||||
if (lonLat.length < 2)
|
||||
throw new IllegalArgumentException( "we need two lat/lon points at least!" );
|
||||
throw new IllegalArgumentException( "we need two lat/lon points at least!" );
|
||||
wplist.add( readPosition( lonLat[0], lonLat[1], "via" + i ) );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue