A Java library containing a parser and models for the Overpass-Turbo API available here:
The following example shows how to query post boxes:
Map<String, String> tags = new HashMap<String, String>() {
{
put("amenity", "post_box");
}
};
NodesQuery nodesQuery = new NodesQuery(600, 52.516667, 13.383333, tags, true, 13);
Call<OverpassResponse> streamsResponseCall = streamsService.getOverpassResponse(
nodesQuery.getFormattedDataQuery());
// Execute streamsResponse call to send a request to the Overpass-Turbo API.
To deploy the library to your local Maven repository run the following task:
$ ./gradlew publishToMavenLocal
Then, to use the library in your project add the following to
your top level build.gradle
:
allprojects {
repositories {
jcenter()
mavenLocal()
}
}
and to your application module build.gradle
:
dependencies {
compile 'info.metadude.java.library.overpass:overpass-library:${version}'
}
Run the following command to execute all tests:
$ ./gradlew clean test
- WhereWhat Android Wear app, sources
Copyright 2015 - 2016 Tobias Preuss
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.