0

我使用 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
                }
              };

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

4

1 回答 1

0

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

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

一旦地理围栏被触发,就会被执行。所以在这个函数中你定义你的代码来显示你想要的。

于 2013-11-29T13:53:37.400 回答