Comments (14)
Hi again
Sorry i haven't worked that much with Roads api
Try check the Response.RawJson. That shows what google returns.
from googleapi.
response.RawJson
"{\n \"snappedPoints\": [\n {\n \"location\": {\n \"latitude\": 48.160701920080641,\n \"longitude\": 15.615951312026901\n },\n \"originalIndex\": 0,\n \"placeId\": \"ChIJdb0ylo6HbUcRhty45O33OIc\"\n },\n {\n \"location\": {\n \"latitude\": 48.163834926702592,\n \"longitude\": 15.615102852000513\n },\n \"originalIndex\": 1,\n \"placeId\": \"ChIJY-KcuIiHbUcRcLXeMxGzJlw\"\n },\n {\n \"location\": {\n \"latitude\": 48.162118789614105,\n \"longitude\": 16.483688015927697\n },\n \"originalIndex\": 45,\n \"placeId\": \"ChIJg46bP5CqbUcRK07KzaXoyRs\"\n },\n {\n \"location\": {\n \"latitude\": 48.16213290222106,\n \"longitude\": 16.483567306372223\n },\n \"originalIndex\": 46,\n \"placeId\": \"ChIJg46bP5CqbUcRK07KzaXoyRs\"\n },\n {\n \"location\": {\n \"latitude\": 48.162141252774212,\n \"longitude\": 16.483495880930516\n },\n \"or
iginalIndex\": 47,\n \"placeId\": \"ChIJg46bP5CqbUcRK07KzaXoyRs\"\n }\n ],\n \"warningMessage\": \"Input path is too sparse. You should provide a path where consecutive points are closer to each other. Refer to the 'path' parameter in Google Roads API documentation.\"\n}\n"
I put my Path here (what I pass to the SnapToRoadsRequest.Path)
from googleapi.
But that is what google returns, which seems du be the same as the deserialized response
from googleapi.
from googleapi.
Could be...
But the RawJson and the RawQueryString is good properties to check if you suspect my Api does something wrong.
from googleapi.
Good to know. Thanks.
from googleapi.
Would I have another option to snap the gps points to a road if I don't get as much points as google would need ? my drivers are often in areas with no or less connectivity and it occurs that I get only every few minutes gps coordinates. thanks in advance.
from googleapi.
Not through Google.
You would need to use compass or similar to track the direction and add fake coordinates.
What is your business goal? you need the route or the distance?
from googleapi.
My goal is a realistic route visualization along the real way my drivers drove. From above screenshot you can see that the polylines are straight connections between each point which is by design and d o n t snap on the road. That's what I want to achieve: Snao that polyline on the real road
from googleapi.
Maybe the nearestroad API of the Roads API but as far as I read it is a very fragile stuff. For the SnapToRoads API the GPS waypoint should not exceed a distance of max. 300 meters.
from googleapi.
Yes you can try nearest roads.
Otherwise you can consider using directions api to "fake" the results.
from googleapi.
regarding "directions api to 'fake' the result"
Yes that would be pretty much sufficient ...
PEASE could you give me a sample or starting point for such scenario as in my case, where I have several pre-collected waypoints ? Thanks in advance.
from googleapi.
Sorry i can't help much with that.
I support the GoogleApi, but not concrete business requirements.
I guess you have to experiment a bit.
from googleapi.
Ok thanks
from googleapi.
Related Issues (20)
- Retry policy HOT 2
- Routing API "GeocodingResults" doesn't seem to be a collection? HOT 2
- Status = OK when it shouldn't HOT 2
- .NET 7.0 - iOS - Operation is not supported on this platform. HOT 9
- Calling .Result from QueryAsync either hangs or causes a hard crash HOT 4
- Getting list of adresses when searching a street HOT 3
- Support for Nearby Search (New) HOT 2
- Entity fields returned by TextSearch API are inconsistent with rawjson data HOT 1
- Convert test projects to MS-Test
- .NET 7 target has issue with deps pointed from .NET8 HOT 4
- API Key required when Client ID alone should be sufficient HOT 1
- injecting own functionality HOT 6
- Error when trying to translate a HTML-Text HOT 5
- Inaccuracy in Distance Calculation Using Google Maps API with .NET 8.0 HOT 5
- Issue with language code "bg-Latn" HOT 3
- Enum JsonConverters are not applied
- Method summary for AutoComplete and QueryAutoComplete wrong? HOT 2
- TravelMode.WALKING is only supported in lower case HOT 7
- Problems with Address Validation HOT 1
- maneuver is always None HOT 3
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 googleapi.