-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From where does the "handler" come from? #2
Comments
The handler is the interface you implement yourself. |
Is it the class or the map or something else? Maybe you can give an example? |
For example int nodes = 0;
int ways = 0;
int relations = 0;
overpassMapDataDao.queryElements("[bbox:13.8,35.5,14.9,36.3]; nwr[shop]; out meta;", new MapDataHandler() {
public void handle(BoundingBox bounds) {
// a bounding box was parsed from the overpass response, do something with it or not
}
public void handle(Node node) {
// a node was parsed from the overpass response, do something with it or not
nodes++;
}
public void handle(Way way) {
// a way was parsed from the overpass response, do something with it or not
ways++;
}
public void handle(Relation relation) {
// a relation was parsed from the overpass response, do something with it or not
relations++;
}
});
System.out.println("On Malta, there are " (nodes+ways+relations) + " shops, of these: " + nodes + " nodes, " + ways + " ways and " + relations + " relations"); |
I get this error (and much more lines similar to that): |
Hm I don't remember what was the solution to it. The annotations used in this library collide with the annotations used in Android. In the gradle config, you can exclude certain dependencies to remove the duplicates. I am too busy so I can't help you now, try searching for the problem with google. When you found the solution, please let me know, then I can update the readme. |
In build.gradle under android { } I added |
Android studio does not know the "handler". How can I initilize it?
The text was updated successfully, but these errors were encountered: