Ejemplo n.º 1
0
        /// <summary>
        /// Coroutine to call the FindMarker cloud service.
        /// </summary>
        /// <returns>The marker.</returns>
        /// <param name="descriptor">Descriptor.</param>
        /// <param name="sceneId">Scene identifier.</param>
        /// <param name="callbackOK">Successful callback.</param>
        /// <param name="callbackKO">Error callback.</param>
        public IEnumerator FindMarker(string imageDescriptor,
                                      WSHandler.SuccessCallbackWithResponse <WSMarkerResponse> callbackOK,
                                      WSHandler.ErrorCallback callbackKO)
        {
            Dictionary <string, string> postData = new Dictionary <string, string>();

            postData.Add("contextType", NetUtilites.UNITY_CONTEXT_REQUEST);
            postData.Add("dbCode", String.Join(",", _cloudInfo.getDatabaseNames()));
            postData.Add("descriptor", imageDescriptor);
            postData.Add("deviceId", _deviceId);

            string url = _cloudInfo.GetWebApiUrl() + "/ar/reco/markers/?find";

            return(new WSHandler().CallWS <WSMarkerResponse> (url, postData, callbackOK, callbackKO));
        }