【问题标题】:Which trigger is starting a callback in Worklight geofencing?哪个触发器在 Worklight 地理围栏中启动回调?
【发布时间】:2013-11-29 13:15:05
【问题描述】:

我使用 Worklight 地理围栏 API 来定义地理围栏圈,如下所示:

var Cliente ={
                type: "Enter",
                circle: {
                  longitude: vector[i].longitud,
                  latitude: vector[i].latitud,
                  radius: proximidad // 300m
                },
                confidenceLevel: "high", // ~95% confidence that we are in the circle
                callback: function(deviceCtx) { myFunction(deviceCtx); },
                eventToTransmit: {
                  event: {
                    name: "clientecerca",

                  },
                  transmitImmediately: true
                }
              };

如何获取有关哪个触发器正在运行回调的一些信息?一旦调用回调,我需要在应用程序中显示该地理围栏的信息......

【问题讨论】:

    标签: location ibm-mobilefirst geofencing


    【解决方案1】:

    根据您的代码,您提到了回调方法。所以这个

     callback: function(deviceCtx) { myFunction(deviceCtx); }, 
    

    将在地理围栏触发后执行。所以在这个函数中你定义你的代码来显示你想要的。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-02
      • 2015-11-07
      • 1970-01-01
      • 2016-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多