Skip to content

Commit a575498

Browse files
committed
support responseformat
1 parent 2b055e6 commit a575498

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Overpass/Overpass.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ def _ConstructError(self, msg):
5454
}
5555

5656
def _ConstructQLQuery(self, userquery):
57-
if self.debug:
58-
print "[out:{responseformat}];".format(responseformat=self.responseformat) + userquery + "out body;"
5957
if not userquery.endswith(";"):
6058
userquery += ";"
61-
return "[out:json];" + userquery + "out body;"
59+
fullquery = "[out:{responseformat}];".format(responseformat=self.responseformat) + userquery + "out body;"
60+
if self.debug:
61+
print fullquery
62+
return "[out:{responseformat}];".format(responseformat=self.responseformat) + userquery + "out body;"
6263

6364
def _GetFromOverpass(self, query):
6465
"""This sends the API request to the Overpass instance and

0 commit comments

Comments
 (0)