Reputation: 167
I read the Worklight Location Services tutorial, and I have a few questions.
I need more clarity on the difference between WL.Device.Geo.acquirePosition
& WL.Device.startAcquisition
Can WL.Device.Geo.acquirePosition
give you the latitude & longitudes? How do I get the area names, city etc? Do I have to use google maps API?
Can you please elaborate on the below accessPointFilters
configuration in a wifi policy?
Wifi : {
interval : 10000,
accessPointFilters : {
[{ SSID : "Net1" },
{ SSID : "Net2", MAC : "* "} ]
}
}
I have read that in the acquisition policy, if I mention enableHightSecurity
as true
, it uses GPS? If I don't use it, which mechanism will it use?
Geo: {
timeout: 3000,
enableHighAccuracy: true
},
Upvotes: 0
Views: 286
Reputation: 421
Yoel gave a great answer; regarding point #1 for additional clarification - WL.Device.Geo.acquirePosition is a single acquisition; WL.Device.startAcquisition is on-going and allows you to define various kinds of geo-fences.
Upvotes: 1
Reputation: 2118
WL.Device.Geo.acquirePosition - get your current geographic location.
WL.Device.startAcquisition - I think of it more of like doing some kind of geofencing. for more info look at http://www-01.ibm.com/support/knowledgecenter/SSHS8R_6.3.0/com.ibm.worklight.dev.doc/devref/t_creating_a_geofence.html?lang=en
WL.Device.Geo.acquirePosition can give you a position object based on this W3C specification. If you want to get city, state, country and other information like that you can use Google Maps API geocoding or any other geocoding api out there
From the MobileFirst Platform documentation
"{object[]} policy.Wifi.accessPointFilters Optional - An array object that specifies the WiFi access points that you want to detect. Each entry has an SSID name specification, and optionally a MAC specification. The MAC specification can be a wildcard value, represented by an asterisk (), in which case all MACs for this SSID are reported. If no MAC is specified, and this WiFi is visible, then only its SSID is reported; only a single entry appears, regardless of the number of access points that have this SSID. The SSID specification can be a wildcard, represented by an asterisk (), in which case all visible networks are reported. "
You can read more at http://www-01.ibm.com/support/knowledgecenter/SSHS8R_6.3.0/com.ibm.worklight.apiref.doc/html/refjavascript-server/html/WL.Device.html?cp=SSHS8R_6.3.0%2F9-1-0-1-0&lang=en
for more info check http://www-01.ibm.com/support/knowledgecenter/SSHS8R_6.3.0/com.ibm.worklight.apiref.doc/html/refjavascript-server/html/WL.Device.html?cp=SSHS8R_6.3.0%2F9-1-0-1-0
I hope this helps. To get more documentation about IBM MobileFirst Platform foundation V6.3 you can visit the Knowledge Center at http://www-01.ibm.com/support/knowledgecenter/SSHS8R_6.3.0/wl_welcome.html?lang=en
Upvotes: 3