Comments (6)
The handler is the interface you implement yourself.
from osmapi-overpass.
Is it the class or the map or something else? Maybe you can give an example?
from osmapi-overpass.
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");
from osmapi-overpass.
I get this error (and much more lines similar to that): Duplicate class org.jetbrains.annotations.Async$Execute found in modules jetified-annotations-16.0.1 (org.jetbrains:annotations:16.0.1) and jetified-annotations-java5-18.0 (org.jetbrains:annotations-java5:18.0.0)
Thanks by the way for your help:)
from osmapi-overpass.
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.
from osmapi-overpass.
In build.gradle under android { } I added configurations { cleanedAnnotations compile.exclude group: 'org.jetbrains' , module:'annotations' all*.exclude group: 'xmlpull', module: 'xmlpull' }
The error disappears and my app is starting but crashes right after start. Now I have to figure out if these above lines caused the crash or something else in my code
EDIT: Your example code from above causes the crash
from osmapi-overpass.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osmapi-overpass.