I work in a project in java .. i want to specify the zoom in the overpass query ? because i want to draw the response (xml file) ??
public static Document getNodesViaOverpass(String query) throws IOException, ParserConfigurationException, SAXException {
String hostname = OVERPASS_API;
URL osm = new URL(hostname);
HttpURLConnection connection = (HttpURLConnection) osm.openConnection();
connection.setDoInput(true);
connection.setDoOutput(true);
connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
DataOutputStream printout = new DataOutputStream(connection.getOutputStream());
printout.writeBytes("data=" + URLEncoder.encode(query, "utf-8"));
printout.flush();
printout.close();
DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
return docBuilder.parse(connection.getInputStream());
}