I am working on a service where a user plans his route using the Google Direction Service. GDS returns (if available) alternatives and the users can choose one of these for later usage. This part works: I know how to do the first request including getting alternatives back.
My problem is: how do I rerequest that specific alternative. For instance: if I want to redisplay the route and send the request to Google, it serves me the three alternatives... But I want to show the chosen one. I thought GDS would give the discriminating waypoints it uses to make the alternative, but it doesn't. As far as I see there is nothing discriminating, but I'd like to hear your thoughts on this.
A different approach would be to either remember the summary or the route index or both. I would then use one of those (or both) to select the alternative from the set. But this is only possible if the summary and/or the index does not change. And it is a bit of a cumbersome way.
Another approach is to try to find the discriminating waypoints ourselves, but this seems too hard to handle...
Any thougts on this are welcomed!
Frank
Related
I've been trying to develop speed limit application & have tried many different approaches to get done .
I have used Overpass APIs & it did good but it did not have speed limit information for few of locations around Europe & also installed Velociraptor which uses OSM map & HERE Maps APIs still they failed to get data . Here is screenshot of Velociraptor app :
Yesterday I came across osmbonuspack & it looks promising as it allows us to choose from 3 best routing services available but Author of osmbonuspack told me that unfortunately, the 3 routing services are not returning speed limit information. Refer : Is it possible to get speed limit data using OSMBonusPack?
I have installed Waze application & it has speed limit data for locations around Europe which are not available from above options. So , anyone has a idea how they are getting information OR anyone knows which datasource they are using ?
Any suggestions would be appreciated.
I'm afraid Waze does not use another data source or at the very least not one unique data source that you could use. As a crowd-sourced application it relies on the information entered by map editors via the Waze Map Editor. Some editors might have used some open data sources available for their regions (if permitted by their local organisation), but it's far more likely they've used their local knowledge, Google Street View (Waze has a special license for that) or user reports sent in via the app.
As the map used by Waze is not open data, I'd highly advice against attempting to retrieve the speed data from their map. They have not exposed this information in an open API, which should be a strong indication that reuse of this data is not permitted.
OSM tagging is rich and flexible, but can be quite difficult to interpret.
Typically, max speed information is certainly there (the various routing services are based on it). The point is: how it's defined?
Have a close look here: http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing/Maxspeed
And you will discover that getting maxspeed tag is not enough...
Then, refining your Overpass queries, maybe you will be able to get it everywhere!
Other hint: look at OSRM source code (or ask them), to see how they get this information.
We considered using Google Maps API for our purpose, but it does not have a way to add custom roadblocks. Since our delivery is time-bound, we can't have our shipments face closed gates, roadblocks, and so on. An ideal solution would have been to tell Google to avoid certain routes if they pass through such points - but there is no way to do this, as yet.
Interestingly, this is an acknowledged issue from Google.
The next best solution for our logistics vertical is to go full-blown on the thing: use GPS data (images, longitudes and latitudes) and create a vector map, host it on a server, and have a device navigate on this freshly-created maps.
How would one go about this? What are the resources and tools required to achieve this?
I am working on an application which will have a textview/searchview or a more preferrable way to take a String, make a search of that string and show some results. And whenever the user clicks one of the result it will take user to the another Intent which have a map that points to the clicked results.
I am searching this for days, I read many articles in here, or in Google Developer pages, I know that I need to use Geocoder, and for this I think the best one for my app is this Google API
http://maps.googleapis.com/maps/api/geocode/json?address="+geocodingSearch+"&components=country:TR&sensor=false";
geocodingSearch will be the String that written by user.
*My first question is does sensor=true makes a big difference? Do you prefer to use it? Or do you prefer something else?
*In Google's example it uses region=es in one of them and components=country:ES in another of them. What are the differences between them? Also does it works perfectly, or using borders is better?
*I don't have any problem of parsing JSON answer, but I am not sure about how to show the results. I want it to be seen as the way that search results as in the bottom. It doesn't need to make a search as the user types, but the result part will be better like this. Do I need to use a SearchView or something else?
*And the final question is written in the title. Is it possible to get the nearest results at top in Google API part (I am able to get the Location), I don't want to limit by borders, but getting the nearest results will be better. If this is not possible I will try to sort them by making calculations with LatLong values.
Thanks in advance, and I will be greatful by your helps.
So I am in need of some assistance in trying to determine what I am going to need in order to accomplish a task.
Plain and simple...I am looking at accessing multiple databases some of which may contain over 10,000 records via Android. From what I have seen web services that return JSON is the way to go for something of this nature, but I don't think that fully answers my question or know if this is the preferred way to go about this.
Digging a bit deeper...I have a few apps on the market now, but this will be my first attempt at an enterprise style app, and I have accessed public web services with a lot smaller footprint than what this is going to be. I have little to no experience within the realm of server/network administration which is where I am getting tripped up. This is from the ground up and I have to ability to obtain almost any resources I need to complete this task.
It appears that there is a SQL Server 2008 on the back end if that helps. If I need to provide further details let me know. I am looking at a solution that will handle organizational growth, scalability, authentication and ease of user...so keep that in mind too.
So what is the best practice/preferred method for doing an enterprise application with a substantial data set? What are the big dogs doing, and how? Both on the client side and server side. I am trying not to "screw the pooch" out of the gates on this, and this is one of those measure twice and cut once situations which is why I am trying to garner plenty of input and assistance.
Thanks in advance!
If you don't have an API/service yet, you need to write one on top of your database.
I can think of two approaches, depending upon your use case.
Paging: Setup an API that supports paging, and show the results page by page. The user can't possibly view 10000 records in one go.
Search and suggest: Try creating a suggestion list, when the user starts typing out something. Fetch results that start with the initial characters entered. However, the API should limit the results to a comfortable number, so that you don't have to parse a lot.
Depending on your use case, you could try one of these.
I would like to create a search in my app which acts like the map search in the Google Maps app.
I have creates an an auto complete text view which updates dynamically based on the results of the Geocoder.GetLocationByName() Method.
However the results retrieved from this function are really bad and not at all consistent with the text I pass to it.
Is there a better method of doing this to achieve accurate results?
So it's not the geosearch that's your problem, but the autocompletion, right? Well I assume you need the whole set of possible values in order to obtain a decent auto-completion. Another way would be to take apart the google javascript code that performs the auto-completion and talk to their servers, pretending you're typing into one of "their" fields. However, this isn't only probably against their terms of service but also a bit shaky because they might a) detect and prevent this or b) change their interface in the future.
Your best guess would be to get a list of all cities, streets, etc in question.
hopefully this should be able to do the trick :=)
https://developers.google.com/places/documentation/autocomplete
good luck (testing it myself right now)