I need to create an application that identifies the best path for a person. But it would need to identify the importance of uphill and downhill on the way.
How getting this information of which path would be straight?
This app is for android.
Tanks!
Check out Elevation API
and Distance Matrix API
The distance API may be the only thing you need.
Route information would be obtained by the Directions API
A combination between the 3 may be somewhat necessary, but once you setup an HttpClient to the google server you can just create back-end web service calls to grab the information you need on your android phone.
Related
I have a tracking application and uses osmdroid library. My prolbem is that osmrdroid does not support routing. By the way the application is purely offline. Are there any suggestions that you can provide with regards to a library that supports routing, which can coordinate with the osmdroid map overlay. What I need to do is only calculate shortest path and draw it on the offline map from one point to the next.
I found this link:
http://code.google.com/p/j2memaprouteprovider/source/browse/trunk/J2MEMapRouteAndroidEx/src/org/ci/geo/route/android/MapRouteActivity.java
but I don't know how to integrate it on osmdroid application.
I think in all osmdroid apps the map data come from a code line like this:
map.setTileSource(TileSourceFactory.MAPQUESTOSM);
This means the maps are downloaded as raster tiles, or if you have an offline application the maps are cached as tiles. So you do not have a graph of streets that could be used to calculate a route. So routing isn't supported in osmdroid for a reason.
To do offline route calculation you will need the street network data on your phone. Then you can use a simple wayfinding algorithm to calculate the shortest path. (like Dijkstra)
I'm in the process of starting a new Android project that will:
Display a Google map
Track and record users movements
Display the route on the map
Show local points on interest on the map
My question is what extra tools will I need to accomplish this? I can already get a basic Google Map working with zoom controls and place overlays etc. but my main concern is how I will track the users movements. I was thinking there maybe some sort of fleet management API but I really have no idea.
A link to some sort of tutorial would be great or even just to possible tools.
Use the class http://developer.android.com/reference/android/location/LocationManager.html to obtain the device geographical location
A Caltrans planning grant went towards creating an Android app called CycleTracks that does all of your bulleted items except the last one about points of interest.
You can download the source code here: http://www.sfcta.org/downloads/cycletracks/CycleTracks-android.zip
I haven't looked at the license to see how free you are to use it as a starting point, but I have to imagine it might be helpful just to be able to look at it even if the license is restrictive.
You can read more about it at http://www.sfcta.org/content/view/666/375.
You don't need any extra tools. Use the GPS or radio cells to get the location of the phone. This thread explains how you can get the location:
How do I get the current GPS location programmatically in Android?
If you want to Track the users movement you'll need to run a webservice on a server and have the app report the location of a user at regular intervals.
Be careful though, if you don't tell the user this is what you are doing, and provide an opt out, you could be pulled from the market pretty quickly.
Be sure you aren't recording any sensitive information as well. Usually position, phone type and OS type is allowed but much more could get you in trouble.
I would like to develop a location based application for android. I have been writing some code and succesfully retrieve my current location.
The thing is that i would like to be able to handle another people locations too (of course once registered in my service and accepted the terms of service).
I am not sure wether is legal or not, but, which would be the best way to develop location based applications?
Registering people in my service and handle latitude and longitud myself or maybe should i use the google latitude API? I would like to know the best approach in these cases.
I would build (and I did :)) own service for handling users' location. In case you will try to use google latitude you have to push your users register not only with you, but also with google application....
I am planning to create an application which can track the location of a certain person using open street maps. But I don't know where to start.
Have a look at the sourcecode of osmdroid, an opensource reimplementation of google's maps app using openstreetmap. They even provide a jar you can use! Should get you up to speed in no time. And possibly the official documentation on Location & Maps...
Imagine I want to create game "Rock-paper-scissors" for Google Waves.
I am thinking to implement it as a Wave Gadget.
The idea is simple: all participants send their decisions to my cloud
app (it is an Appengine Java Application), my server part collects
this data and does not share to anybody until all participants
complete their selection. After this the selection is shared to all
participants and the winner is determined.
I can use wave.getViewer().getId() to identify user on the server
during gadgets.io.makeRequest. I works perfectly.
But how can I, on the server side, make sure that the incoming request is
really from this specific wave user? (How can I approve that wave's
participant id is not hacked on the client side? Any wave container
signature allowing determine wave participant id is available?)
What are the best practices for google wave participant authentication
on my appengine side? Please provide examples if possible.
My actual gadget is more complicated but the problem is as described
above.
I would code against an imagined future solution that is baked directly into the Wave protocol or API and hope that nobody spoofs participant IDs. You could also contact the Wave team to make your need for the feature known and see if anyone else is looking for the same.
It looks like there is some OpenAuth integration already built-in for robots:
http://wave-robot-java-client.googlecode.com/svn/trunk/doc/index.html
Would you be able to implement a robot instead of a gadget? Or maybe use a robot for auth and have the gadget interface with your own auth tokens server-side?
As far as I can tell there is no "easy" way of doing this because all the communication with gadgets is directly between the client and the gadget, without Google interference for anything but the gadget's XML description.
The only way I can think off the top of my head is to have your users "log in" to the gadget's iframe with the accounts feature of Google App Engine. This would ensure they are indeed whoever they log in as.
How can I approve that wave's participant id is not hacked on the client side?
How can a user hack his wave patricipant id?
I think there's no problem, wave.getViewer().getId() should be right.
I think you'd want to look into making a wave ROBOT instead of a GADGET. There is a difference.
Robots are wave-aware, gadgets are not.
Wave Robot API: http://code.google.com/apis/wave/extensions/robots/