Info about App:
iOS App developed using Xamarin.iOS
Google Maps SDK used within the app for showing directions and alternate
routes from Point A to Point B.
Problem Statement:
Let's say from Point A to Point B , there are 3 routes shown on the map.
ETA as an annotation is shown on the MapView by default for one the routes.
However for the other 2 alternate routes, no ETA information is shown on the map.
What needs to be done with Google Maps SDK implementation to show ETA for all the routes between Point A & Point B.
The Google Maps SDK for iOS does not include the Directions API. So I believe you are using the web service Directions API to get the different routes.
Calculating the ETA:
In order to calculate the ETA for a route you have to iterate through all the legs of a route and sum up the distance.value attribute.
For more infos about the result set from the Directions API request check the documentation here.
Showing the ETA on the mapView:
On the polyline you drew on the map to represent the route, you may add the title attribute with the ETA.
Related
I have a project where I need to get events from the Hikvision camera that I've connected on my network, to my Typescript project's code.
The events in question are face detection and alarm triggered by recognized face.
The events then would go through webhook in the code and call corresponding functions to send the information to my front-end application.
I know there is an internal API (actually ISAPI) built into the camera, and I know that there are at least 2 endpoints called:
/ISAPI/Intelligent/
and
/ISAPI/Event/
There surely are lots of different endpoints under there.
However, I can't find any documentation for this API / ISAPI even from Hikvision's product support website.
There 3 PDF-manuals on the product support page and none of them mention API or endpoints.
Are there any documentation of these API endpoints for Hikvision cameras?
This question does not solve my case (I already know how to authenticate)
Ok, turns out you can setup a webhook on your Express server app and point the camera's http-listening towards the app's webhook endpoint.
The http-listening is done from the camera's internal software that lives at the camera's IP-address.
i was able to add an edge in DSE graph using the native api from java.
but when i try to add the edge using the fluent api in java, it doesnt work.
i went through the documentation for fluent api and there was nothing to show how to add an edge. When i try to add the edge in java it gives a run time error telling Edge cannot be added
is there any way to add an edge using the fluent api from java
want to use the fluent api since it is more readable from the java code
Sample Code:
lets say there is a vertex called user. another vertex called movie. i want an edge between user and movie. this is what i am trying in java. i am able to add the vertex (the code shows adding only one vertex ) and it worked fine. not really sure about the edge part , when i try to add the edge i get the run time error
GraphTraversal<Vertex,Vertex> traversal = g.addV("user").property("name",
"abcd");
GraphStatement graphStatement = DseGraph.statementFromTraversal(traversal);
GraphResultSet grs = dseSession.executeGraph(graphStatement);
Vertex user1 = g.V().has("user","name","abcd").next();
g.V().has("movie","name","movie1").next().addEdge("ratedBy",user1)
It will not work quite that way. As soon as you do this (i.e. call next()):
g.V().has("movie","name","movie1").next().addEdge("ratedBy",user1)
you are no longer using the Traversal API. Everything after that is the Graph API and the Graph API is not supported for remote execution. To be more clear, calling next() emits a Vertex which is not part of the Traversal API. Looking at the javadocs might yield more clarity on the distinction there. The Graph API is for providers (those who implement the TinkerPop interfaces) and are here. The Traversal API is for users and it internally utilizes the Graph API to execute Gremlin against different graph implementations. The Traversal API largely consists of the GraphTraversal and GraphTraversalSource classes shown here.
You should simply execute a single traversal to construct the edge:
g.addV('user').property('name','abcd').as('user').
V().has('movie','name','movie1').
addE('ratedBy').to('user')
Am trying to build a server on NodeJS, I want to create a n api the simply takes two points and uses a google api and creates a route, I got lost in web, any recommendation for tutorials is appreciated
What you need here is a Direction API or Direction Service, it can calculate directions (using a variety of methods of transportation) by using the DirectionsService object. This object communicates with the Google Maps API Directions Service which receives direction requests and returns an efficient path. You may either handle these directions results yourself or use the DirectionsRenderer object to render these results.
The Directions service can return multi-part directions using a series of waypoints. Directions are displayed as a polyline drawing the route on a map.
Here are the sample jsfiddle for it.
http://jsfiddle.net/gHK7s/2/ and http://jsfiddle.net/user2314737/u9no8te4/
Now, to connect it with the Node.js that you want, you can check these SO questions on how to do that.
Using Node.js to connect to a REST API
Cannot connect to Google Directions API with Node.js server
For more information, check this Node.js Client for Google Maps Services
We already have an API key because we use Skobbler maps on other products.
We have another iOS app that uses Apple maps and we would like to know if we can make a http / https request for address search. In this case we do not want to include SKMaps framework.
Is this possible?
Thank you!
Right now this is not possible - the search API is only exposed in the mobile SDKs (not via a web REST API).
is is possible to tell what source changed the temperature through the api, human/scheduled/another client?
I noticed the nest app history lists how the temperature was set and didn't notice anything in the api that says that.
That level of info is not in the API, but like you said the nest app will, show which client actually initiated the change.